-
Notifications
You must be signed in to change notification settings - Fork 10
Client: Model artifact remaining changes #271
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
Conversation
… argument 'split'
… of a deepcopy Co-authored-by: Cas Wognum <cwognum@users.noreply.github.com> Co-authored-by: Julien St-Laurent <jstlaurent@users.noreply.github.com>
jstlaurent
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR introduces several enhancements to the Polaris Hub client and related modules. Key changes include new utility methods for listing models, adjustments to benchmark and dataset formatting (now using artifact IDs/slugs), and updates to model upload endpoints.
Reviewed Changes
| File | Description |
|---|---|
| polaris/hub/client.py | Updated imports and renamed endpoints; added list_models method and revised benchmarks/datasets returning artifact IDs. |
| polaris/evaluate/_metadata.py | Added computed field for model_artifact_id and changed field aliases. |
| polaris/dataset/_subset.py | Replaced a deep copy with a shallow copy for subset copying. |
| docs/tutorials/create_a_model.ipynb | Introduced a tutorial for creating and uploading a model. |
| docs/tutorials/create_a_dataset.ipynb | Corrected a typo in unit formatting. |
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
polaris/hub/client.py:420
- [nitpick] The docstring now refers to the benchmark as 'owner/benchmark_slug', but the code uses 'artifactId'. Please confirm that artifactId reliably represents the benchmark slug.
v1_benchmarks = [benchmark["artifactId"] for benchmark in v1_data]
polaris/hub/client.py:949
- The upload_model method now uses a PUT request to update the model at a URL containing model.artifact_id instead of a POST to create a new model. Please ensure that this change in HTTP method and endpoint is intended and covered by tests.
url = f"/v2/model/{model.artifact_id}"
cwognum
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @mercuryseries !
Changelogs
New Features:
list_modelsutility function.model_artifact_idas a computed property inResultsMetadataV2.Improvements:
code_urlas an alias forgithub_urlinResultsMetadataV1.report_urlas an alias forpaper_urlinResultsMetadataV1.Bug Fixes:
get_modelmethod (wrong endpoint URL)._get_v2_benchmarkmethod (TypeError: got multiple values for keyword argument 'split')upload_resultsmethod forresultsparam.Checklist:
feature,fix,chore,documentationortest(or ask a maintainer to do it for you).Demo Videos
Model Landing and Detail Pages / Leaderboard
0_landing_detail_pages.mp4
Create a Model
2_create_model.mp4
Attach a Model to results
3_attach_model_to_results.mp4
List models/Load a specific Model
1_list_models_load_model.mp4