Submit to a Competition
On Polaris, submitting to a competition is very similar to submitting to a benchmark.
The main difference lies in how predictions are prepared and how they are evaluated
import polaris as po
from polaris.hub.client import PolarisHubClient
with PolarisHubClient() as client:
client.login()
Load the Competition¶
As with regular benchmarks, a competition is identified by the owner/slug
id.
competition = po.load_competition("polaris/hello-world-competition")
The Competition API¶
Similar to the benchmark API, the competition exposes two main API endpoints:
get_train_test_split()
, which does exactly the same as for benchmarks.submit_predictions()
, which is used to submit your predictions to a competition.
Note that different from regular benchmarks, competitions don't have an evaluate()
endpoint.
That's because the evaluation happens server side. This gives the competition organizers precise control over how and when the test set and associated results get published, providing a unique opportunity for unbiased evaluation and comparison of different methods.
Submit your predictions¶
Similar to your actual results, you can also provide metadata about your predictions.
competition.submit_predictions(
predictions=predictions,
prediction_name="my-first-predictions",
prediction_owner="my-username",
report_url="https://www.example.com",
# The below metadata is optional, but recommended.
github_url="https://github.com/polaris-hub/polaris",
description="Just testing the Polaris API here!",
tags=["tutorial"],
user_attributes={"Framework": "Scikit-learn", "Method": "Gradient Boosting"}
)
That's it! Just like that you have partaken in your first Polaris competition.
Where are my results?
The results will only be published at predetermined intervals, as detailed in the competition details. Keep an eye on that leaderboard when it goes public and best of luck!
The End.