-
Notifications
You must be signed in to change notification settings - Fork 9
Refactor/Chore: Remove access parameters in client #290
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
base: main
Are you sure you want to change the base?
Conversation
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.
👍 Some of these methods will be removed by @danielpeng1's #289 , but the change to model upload is still needed.
Yeah I'll wait for his PR to be merged, and adjust as needed. Or I could merge this first. |
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.
Thanks, @j279li! Left one minor comment in addition to echoing Julien's.
response = self._base_request_to_hub( | ||
url="/v2/result", method="POST", json={"access": access, **result_json} | ||
) | ||
response = self._base_request_to_hub(url="/v2/result", method="POST", json={**result_json}) |
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.
Suggestion:
response = self._base_request_to_hub(url="/v2/result", method="POST", json={**result_json}) | |
response = self._base_request_to_hub(url="/v2/result", method="POST", json=result_json) |
This PR removes the
AccessType
type, simplifying the API by eliminating theaccess
parameter, which was previously used to specify public or private access when uploading artifacts to the Polaris Hub.Removal of
AccessType
andaccess
parameter:Type and Imports Cleanup:
AccessType
from imports in multiple files, includingpolaris/benchmark/_base.py
,polaris/dataset/_base.py
,polaris/dataset/_dataset.py
,polaris/dataset/_dataset_v2.py
,polaris/evaluate/_results.py
,polaris/hub/client.py
, andpolaris/model/__init__.py
.Parameter Removal in Method Definitions:
access
parameter from method signatures such asupload_to_hub
in various modules (polaris/benchmark/_base.py
, < 8000 code class="notranslate">polaris/dataset/_base.py,polaris/dataset/_dataset.py
,polaris/dataset/_dataset_v2.py
,polaris/evaluate/_results.py
,polaris/hub/client.py
, andpolaris/model/__init__.py
).Documentation Updates:
access
parameter, ensuring the documentation aligns with the updated API.Notion Package: https://www.notion.so/Private-Artifact-Removal-1ec0c0d8de7080cf9b6fdde6b7fc0dd8