Skip to content

Fix silent no-op download of named job outputs in azure-ai-ml - #48954

Draft
mohammadsheraj with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-uri-folder-download-issue
Draft

Fix silent no-op download of named job outputs in azure-ai-ml#48954
mohammadsheraj with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-uri-folder-download-issue

Conversation

Copilot AI commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

MLClient.jobs.download(name=..., output_name=...) downloaded nothing — and raised nothing — for a job's uri_folder/uri_file/mltable outputs. RunHistory reports a job output's type in PascalCase (UriFolder), but after the 1.35.0 msrest → arm_ml_service migration get_job_output_uris_from_dataplane() filtered those types against the new enum whose values are snake_case (uri_folder), so every data output was dropped before the dataplane was ever queried.

>>> client.jobs._runs_operations.get_run_data(job_name).run_metadata.outputs["forecast_data"].type
'UriFolder'
>>> from azure.ai.ml._restclient.arm_ml_service.models import DataType
>>> 'UriFolder' in [o.value for o in DataType]   # pre-fix filter
False

Changes

  • _job_ops_helper.py — added _normalize_asset_type() (lower() + strip _) and precomputed _DATA_ASSET_TYPES / _MODEL_ASSET_TYPES sets; the dataset and model filters now match either wire spelling. Unknown and missing types are still skipped, so no dataplane calls are made for them.
  • _job_ops_helper.py — read the model dataplane response via values_property; model_uris.values resolved to the inherited MutableMapping.values method and raised AttributeError: 'function' object has no attribute 'items'.
  • _model_dataplane_operations.py — build the request as BatchGetResolvedUrisDto(values_property=model_ids); values= raised TypeError: unexpected keyword argument 'values', so model outputs failed even once they passed the filter. Serialized body is unchanged ({"values": [...]}) and now matches DatasetDataplaneOperations.
  • _job_operations.py — when an explicitly requested output_name cannot be resolved, log at warning level instead of debug. Other misses (logs, default artifact store, batch scoring file) stay at debug.
  • Teststest_job_ops_helper.py covers both spellings for data and model outputs, a single named output, unknown/missing types, and the asset ids sent to both dataplane clients (via the real operations classes over mocked service clients); test_job_operations.py covers the new warning.
  • CHANGELOG — entries under 1.36.0.

Notes for reviewers

  • The two model-output bugs are separate from the reported uri_folder symptom but sit in the same resolution path and share the same migration root cause; without them, model outputs would still fail after the filter fix.
  • stream_logs_until_completion's default_output.job_output_type == DataType.URI_FOLDER check was left alone: both sides come from the control plane (JobOutputType.URI_FOLDER == DataType.URI_FOLDER == "uri_folder").
  • azure-ai-ml's dependencies could not be installed in the agent sandbox, so the repo test suite was not run locally; the code paths were exercised against the real generated models through a standalone harness, and CI covers the rest.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
11 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI and others added 2 commits September 10, 2026 04:23
Co-authored-by: mohammadsheraj <221899694+mohammadsheraj@users.noreply.github.com>
Co-authored-by: mohammadsheraj <221899694+mohammadsheraj@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix broken download of URI folder in version 1.35.0 Fix silent no-op download of named job outputs in azure-ai-ml Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Download of URI folder is broken in 1.35.0

2 participants