[azure-ai-ml] Fix internal pipeline Command dropping interactive services during serialization#48238
[azure-ai-ml] Fix internal pipeline Command dropping interactive services during serialization#48238ayushhgarg-work wants to merge 4 commits into
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). 9 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Pull request overview
Fixes internal pipeline Command nodes dropping interactive services during REST serialization and deserialization.
Changes:
- Adds service resolution and REST round-trip support.
- Adds regression coverage for SSH and JupyterLab services.
- Documents the fix in the changelog.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
azure/ai/ml/_internal/entities/command.py |
Preserves interactive services during REST conversion. |
tests/internal/unittests/test_pipeline_job.py |
Tests serialization and typed deserialization. |
CHANGELOG.md |
Records the bug fix. |
[Pilot] PR Pipeline Failure AnalysisA CI pipeline failed on this pull request. Here is an automated analysis of what went wrong and how to get the build green. What failedThe macOS Python 3.11 CI job (
The These appear to be test failures, not build or infrastructure failures. Recommended next steps
Raw pipeline analysis (azsdk ci analyze)
|
Description
Fixes an issue where the internal pipeline
Commandnode (azure.ai.ml._internal.entities.command.Command) silently dropped node-level interactiveservices(SSH, JupyterLab, TensorBoard, VS Code, etc.) during serialization. Because theservicesfield was never emitted into the pipeline REST request, the backend received no service definitions, Designer did not create the Interactive services run setting, and Singularity/Aether jobs produced no ssh/jupyterlab/vscode endpoints.Root cause
Command._to_rest_objectin the internal entities module serialized onlylimitsandresources, unlike the publicCommandserializer (azure.ai.ml.entities._builders.command.Command) which already serializesservices. The internal node also had noservicesproperty, so the field could not survive serialization even when set on the node instance.Changes
servicesproperty/setter (using_resolve_job_services) and__init__handling to the internalCommand, mirroring the publicCommand.Command._to_rest_objectnow serializesservicesviaget_rest_dict_for_node_attrs(only when present, so behavior is unchanged when no services are set).Command._from_rest_object_to_init_paramsnow rehydratesservicesback into typedJobServiceobjects for round-trip parity.Distributed(subclass of the internalCommand) inherits the fix automatically.test_interactive_services_in_internal_command_node.Related work items
Testing
{"my_ssh": {"job_service_type": "SSH"}, "my_jupyter": {"job_service_type": "JupyterLab"}}.JobServiceobjects.test_artifacts_in_additional_includes, which fails due to a missingazure-devopsaz CLI extension in the local environment).All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines