[azure-ai-ml] Fix job download and streaming regressions - #48972
Draft
Kshitij Chawla (kshitij-microsoft) wants to merge 1 commit into
Draft
[azure-ai-ml] Fix job download and streaming regressions#48972Kshitij Chawla (kshitij-microsoft) wants to merge 1 commit into
Kshitij Chawla (kshitij-microsoft) wants to merge 1 commit into
Conversation
Normalize job output asset types across RunHistory and ARM contracts, and fall back to RunHistory logs when an identity-based datastore credential cannot sign a SAS. Add regression coverage for both output type spellings and identity-based log streaming.
|
Azure Pipelines: Successfully started running 1 pipeline(s). 10 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
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.
Description
Fixes two
azure-ai-ml1.35.0 regressions introduced when job and datastore consumers moved to the shared TypeSpecarm_ml_serviceclient.Named output download
RunHistory reports output asset types in PascalCase (
UriFolder,UriFile,MLTable), while the shared ARM client exposes snake_case enum values (uri_folder,uri_file,mltable). The exact comparison filtered out valid named outputs, causingMLClient.jobs.download(..., output_name=...)to complete without downloading anything.Asset types are now normalized case- and separator-insensitively before comparison.
Fixes #48941.
Identity-based log streaming
The same enum value change activated the direct-datastore log path for URI-folder outputs. That path generates a short-lived SAS and requires a string account key or SAS token. Identity-based datastores instead provide a
TokenCredential, which caused SAS generation to raise:TypeError: argument should be a bytes-like object or ASCII string, not 'ChainedTokenCredential'Streaming now falls back to the service-provided RunHistory log URLs when the datastore credential cannot sign a SAS. Key- and SAS-based datastores continue using the direct path.
Testing
python -m pytest tests/job_common/unittests/test_job_ops_helper.py -q -p no:warnings6 passed, 15 skippedTokenCredential, and missing datastore credentials.Notes
The changes are limited to hand-written
azure-ai-mloperations code, tests, and changelog. No generated code or service wire contract is changed.