Skip to content

Commit

Permalink
[ML][Pipelines] Test: add test to cover validate init/finalize with g…
Browse files Browse the repository at this point in the history
…roup (Azure#28250)

* add test to cover validate init/finalize with group

* fix positional arg and default compute error

* update recording and enable skip test "test_create_pipeline_component_from_job"
  • Loading branch information
zhengfeiwang authored Jan 10, 2023
1 parent 2adc8e1 commit 47e872a
Show file tree
Hide file tree
Showing 6 changed files with 670 additions and 2,277 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,6 @@ def test_helloworld_nested_pipeline_component(self, client: MLClient, randstr: C
}
assert component_dict == expected_dict

@pytest.mark.skip("Running fine locally but failing in pipeline, the recording looks good")
def test_create_pipeline_component_from_job(self, client: MLClient, randstr: Callable[[str], str]):
params_override = [{"name": randstr("component_name_0")}]
pipeline_job = load_job(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,10 @@ def subgraph_init_finalize_job_func():
assert valid_pipeline._validate().passed
assert valid_pipeline.settings.on_init == "init_job"
assert valid_pipeline.settings.on_finalize == "finalize_job"

def test_init_finalize_with_group(self) -> None:
from test_configs.dsl_pipeline.pipeline_component_with_group.pipeline import pipeline_job

assert pipeline_job._validate().passed
assert pipeline_job.settings.on_init == "init_job"
assert pipeline_job.settings.on_finalize == "finalize_job"
Loading

0 comments on commit 47e872a

Please sign in to comment.