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

[ML][Pipeline] Upgrade schedule operation version #29127

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ def __init__(
self._schedules = ScheduleOperations(
self._operation_scope,
self._operation_config,
self._service_client_10_2022_preview,
self._service_client_12_2022_preview,
self._operation_container,
self._credential,
_service_client_kwargs=kwargs,
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions sdk/ml/azure-ai-ml/tests/schedule/e2etests/test_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,29 @@ def test_load_recurrence_schedule_with_pattern(self, client: MLClient, randstr:
"schedule": {"hours": [10], "minutes": [15], "week_days": ["Monday"]},
}

def test_create_schedule_pipeline_with_output_binding(self, client: MLClient, randstr: Callable[[], str]):
params_override = [{"name": randstr("name")}]
test_path = "./tests/test_configs/schedule/schedule_pipeline_with_output_binding.yml"
schedule = load_schedule(test_path, params_override=params_override)
rest_schedule = client.schedules.begin_create_or_update(schedule).result(
timeout=LROConfigurations.POLLING_TIMEOUT
)
assert rest_schedule.name == schedule.name
rest_job = rest_schedule.create_job._to_dict()
assert rest_job["inputs"] == {
"int_param": "10",
"data_input": {
"mode": "ro_mount",
"type": "uri_file",
"path": "azureml:https://dprepdata.blob.core.windows.net/demo/Titanic.csv",
},
}
assert rest_job["outputs"] == {
"output1": {"mode": "rw_mount", "type": "uri_folder"},
"output2": {"mode": "rw_mount", "type": "uri_folder"},
"output3": {"mode": "rw_mount", "type": "uri_folder"},
}

@pytest.mark.usefixtures(
"enable_pipeline_private_preview_features",
)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
$schema: http://azureml/sdk-2-0/Schedule.json
name: schedule_pipeline_with_output_binding
display_name: Schedule pipeline with output binding
description: Schedule pipeline with output binding

trigger:
type: cron
expression: "15 10 * * 1"
time_zone: "Pacific Standard Time" # optional - default will be UTC

create_job:
job: ../pipeline_jobs/pipeline_job_with_pipeline_component.yml