Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[solidago] Update docstrings and add simple API for Pipeline #1971

Merged
merged 11 commits into from
Jun 3, 2024

Conversation

amatissart
Copy link
Member

@amatissart amatissart commented May 16, 2024

Description

A first step before introducing mkdocs to build Solidago documentation.
Based on #1970

This branch introduces some new helpers to use the solidago pipeline:

  • get_pipeline_objects() is replaced with get_pipeline_kwargs(criterion) and is generic for any TournesolInput
  • pipeline.run(input, criterion) to avoid initializing the pipeline arguments manually

It makes running the pipeline easier than ever:

import logging

from solidago.pipeline import Pipeline
from solidago.pipeline.inputs import TournesolInputFromPublicDataset

logging.basicConfig(level=logging.INFO)

public_dataset = TournesolInputFromPublicDataset.download()
pipeline = Pipeline()

(users, voting_rights, user_models, global_model) = pipeline.run(
    input=public_dataset,
    criterion="largely_recommended",
)

Checklist

  • I added the related issue(s) id in the related issues section (if any)
    • if not, delete the related issues section
  • I described my changes and my decisions in the PR description
  • I read the development guidelines of the CONTRIBUTING.md
  • The tests pass and have been updated if relevant
  • The code quality check pass

Copy link
Contributor

@lenhoanglnh lenhoanglnh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@amatissart
Copy link
Member Author

@lenhoanglnh Is it ok to merge this PR now into #1970 , or should we wait to avoid potential conflicts with your experiments on "neurips24"?

@GresilleSiffle GresilleSiffle added Solidago Tournesol algorithms library Backend Back-end code of Tournesol labels May 23, 2024
@amatissart amatissart merged commit 0032c86 into neurips24 Jun 3, 2024
9 checks passed
@amatissart amatissart deleted the solidago-pipeline-docs-1 branch June 3, 2024 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend Back-end code of Tournesol Solidago Tournesol algorithms library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants