Skip to content
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

Add method for registry model create/update with system metadata #40064

Merged
merged 16 commits into from
Apr 2, 2025

Conversation

chaoyu-msft
Copy link
Contributor

@chaoyu-msft chaoyu-msft commented Mar 13, 2025

Description

Please add an informative description that covers that changes made by the pull request and link all relevant issues.

If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@Copilot Copilot bot review requested due to automatic review settings March 13, 2025 15:49
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request introduces a new method to handle model create/update operations with system metadata when operating in a registry context. Key changes include:

  • Adding new imports required for building and converting create/update requests.
  • Updating the create_or_update method to conditionally use the new system metadata operation based on the presence of continuation tokens.
  • Adding a new private helper method (_begin_create_or_update_model_with_system_metadata) to handle the create/update process using system metadata.
Comments suppressed due to low confidence (1)

sdk/ml/azure-ai-ml/azure/ai/ml/operations/_model_operations.py:353

  • [nitpick] Consider defining a named constant for the accepted async status code (202) to improve readability and maintainability.
if response.status_code not in [202]:

@azure-sdk
Copy link
Collaborator

azure-sdk commented Mar 13, 2025

API change check

APIView has identified API level changes in this PR and created following API reviews.

azure-ai-ml

@chaoyu-msft chaoyu-msft force-pushed the chaoyu/create-model-with-system-metadata branch 2 times, most recently from 95f5418 to 7f22b4e Compare March 18, 2025 13:12
@chaoyu-msft chaoyu-msft force-pushed the chaoyu/create-model-with-system-metadata branch from 1fca117 to 656ce92 Compare March 18, 2025 16:14
@chaoyu-msft chaoyu-msft force-pushed the chaoyu/create-model-with-system-metadata branch from 3de05cb to 41b5b4e Compare March 20, 2025 02:12
Copy link
Member

@achauhan-scc achauhan-scc left a comment

Choose a reason for hiding this comment

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

Http interactions are happening inside rest client layer, please follow the same pattern.

@achauhan-scc achauhan-scc self-requested a review April 2, 2025 03:31
@chaoyu-msft chaoyu-msft merged commit 5b61a95 into main Apr 2, 2025
23 checks passed
@chaoyu-msft chaoyu-msft deleted the chaoyu/create-model-with-system-metadata branch April 2, 2025 13:09
weirongw23-msft pushed a commit to weirongw23-msft/azure-sdk-for-python that referenced this pull request Apr 4, 2025
…re#40064)

* Add method for registry model create/update with system metadata

* add e2e test

* fix test

* fix test recording

* fix test recording

* fix test recording

* fix tests

* fix mypy

* run black

* fix pylint

* move request method

* refactor code

* fix tests

* fix compiling

* update recording

* fix black
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants