Client: Model artifact remaining changes#271
Merged
Merged
Conversation
… argument 'split'
mercuryseries
commented
Feb 27, 2025
mercuryseries
commented
Feb 27, 2025
mercuryseries
commented
Feb 27, 2025
mercuryseries
commented
Feb 27, 2025
mercuryseries
commented
Feb 27, 2025
mercuryseries
commented
Feb 27, 2025
… of a deepcopy Co-authored-by: Cas Wognum <cwognum@users.noreply.github.com> Co-authored-by: Julien St-Laurent <jstlaurent@users.noreply.github.com>
mercuryseries
commented
Feb 27, 2025
There was a problem hiding this comment.
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
approved these changes
Apr 15, 2025
cwognum
left a comment
Collaborator
There was a problem hiding this comment.
Thank you, @mercuryseries !
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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