Skip to content

Commit

Permalink
[ML][Pipeline] Upgrade schedule operation version (#29127)
Browse files Browse the repository at this point in the history
* Upgrade schedule operation version

* Add test with output

Signed-off-by: Brynn Yin <[email protected]>

---------

Signed-off-by: Brynn Yin <[email protected]>
  • Loading branch information
brynn-code authored Mar 3, 2023
1 parent c7fee36 commit f4fab8e
Show file tree
Hide file tree
Showing 12 changed files with 6,118 additions and 5,062 deletions.
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

0 comments on commit f4fab8e

Please sign in to comment.