Using Tournesol dataset with Solidago¶
An instance of TournesolDataset
can be used as a pipeline input in Solidago.
from solidago.pipeline.inputs import TournesolDataset
# Download the latest dataset from Tournesol API.
pipeline_input = TournesolDataset.download()
# Read a local file
pipeline_input = TournesolDataset("path/to/dataset.zip")
TournesolDataset
¶
Bases: PipelineInput
Initilialize a Pipeline input, by loading a tournesol dataset (.zip format) from a local file, or a URL.
entity_id_to_video_id
¶
entity_id_to_video_id = Series(
sorted(set(video_a) | set(video_b) | set(video)),
name="video_id",
)
video_id_to_entity_id
¶
get_individual_scores
¶
get_individual_scores(
user_id: Optional[int] = None,
criterion: Optional[str] = None,
with_n_comparisons=False,
) -> DataFrame