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

[AI Foundry Data Management] Enhance .upload_file to accept dataset name and version arguments #40336

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tomomi-code
Copy link

Description

This is a PR for #39901

  • New optional params: dataset_name and dataset_version to the upload_file method.
  • Error handling for the case when the file upload fails.

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.

@Copilot Copilot bot review requested due to automatic review settings April 2, 2025 06:21
@github-actions github-actions bot added AI Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization. labels Apr 2, 2025
Copy link

github-actions bot commented Apr 2, 2025

Thank you for your contribution @tomomi-code! We will review the pull request and get back to you soon.

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 PR enhances the upload_file method by introducing new optional parameters and adds error handling for file upload failures.

  • Updates the upload_file method signature to include new parameters.
  • Modifies the docstring to document these new parameters.
  • Implements a try/except block to catch and re-raise exceptions during file upload.
Comments suppressed due to low confidence (3)

sdk/ai/azure-ai-projects/azure/ai/projects/_patch.py:252

  • The parameter 'file_name' does not match the PR description which indicates 'dataset_name'. Consider renaming it for consistency.
file_name: str = str(uuid.uuid4()),

sdk/ai/azure-ai-projects/azure/ai/projects/_patch.py:253

  • The parameter 'file_version' does not match the PR description which indicates 'dataset_version'. Consider renaming it for consistency.
file_version: str = "1",

sdk/ai/azure-ai-projects/azure/ai/projects/_patch.py:287

  • [nitpick] Consider catching more specific exceptions instead of a blanket Exception to avoid inadvertently suppressing unexpected errors.
try:

@azure-sdk
Copy link
Collaborator

API change check

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

azure-ai-projects

@annatisch annatisch removed customer-reported Issues that are reported by GitHub users external to the Azure organization. Community Contribution Community members are working on the issue labels Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants