Skip to content

feat: Model Competitions - Competition Model Services #279

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

Merged
merged 14 commits into from
Apr 7, 2025

Conversation

roselynh100
Copy link
Contributor

@roselynh100 roselynh100 commented Apr 4, 2025

Changelogs

  • Turned CompetitionSpecification into an abstract class, which throws an error if instantiated → must use PredictionBasedCompetition or ModelBasedCompetition instead
    • These implement submit_entry differently (also, users can call competition.submit_predictions instead)
    • Replaced all CompetitionSpecification instances with PredictionBasedCompetition (mostly in tests)
  • New function submit_competition_model allows users to submit a model to a competition
    • A model artifact id must be passed in, and this gets submitted to the competition
  • Updated submit_to_competition.ipynb tutorial with instructions for submitting to a model-based competition

Checklist:

  • Was this PR discussed in an issue? It is recommended to first discuss a new feature into a GitHub issue before opening a PR.
  • Add tests to cover the fixed bug(s) or the newly introduced feature(s) (if appropriate).
  • Update the API documentation if a new function is added, or an existing one is deleted.
  • Write concise and explanatory changelogs above.
  • If possible, assign one of the following labels to the PR: feature, fix, chore, documentation or test (or ask a maintainer to do it for you).

discussion related to that PR

return self

@abc.abstractmethod
def submit_entry(self):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the only new change in CompetitionSpecification !

@roselynh100 roselynh100 changed the title [UNFINISHED] feat: Model Competitions Apr 7, 2025
@roselynh100 roselynh100 changed the title feat: Model Competitions feat: Model Competitions - Competition Model Services Apr 7, 2025
@roselynh100 roselynh100 marked this pull request as ready for review April 7, 2025 17:57
@roselynh100 roselynh100 requested a review from cwognum as a code owner April 7, 2025 17:57
@roselynh100 roselynh100 requested a review from Andrewq11 April 7, 2025 17:57
@roselynh100 roselynh100 self-assigned this Apr 7, 2025
Copy link
Contributor

@Andrewq11 Andrewq11 left a comment

Choose a reason for hiding this comment

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

Excellent work, @roselynh100! I've left a few small comments but overall, it is very well done 🚀

Let me know if you have any questions about them.

@@ -979,3 +1019,6 @@ def upload_model(
progress.log(
f"[green]Your model has been successfully uploaded to the Hub. View it here: {model_url}"
)

# We need this artifact_id when uploading a new model as a competition submission
return Model(**inserted_model).artifact_id
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice call on instantiating this here instead of just pulling the returned artifact ID from the json. Either would work, but this feels safer with the Pydantic.

@roselynh100 roselynh100 merged commit e81c508 into feat/model-competitions Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants