Skip to content

Commit

Permalink
remove prp flag for registry features (Azure#26487)
Browse files Browse the repository at this point in the history
* remove prp flag for registry features

* refactor

* updating recording

* updating component recordings

* add pipeline job recordings

* updating recordings

* updating recordings

* recordings

* updating env id only in recording

* recordings

* update recordings

* skipping tests failing

* removing extra import

* add pylint exclusion for unused import

* skipping tests

* skipping tests

* skipping tests
  • Loading branch information
iamlost127 authored Oct 1, 2022
1 parent 216e6e0 commit 5401473
Show file tree
Hide file tree
Showing 146 changed files with 30,322 additions and 30,956 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
)
from azure.ai.ml._utils._asset_utils import _resolve_label_to_asset
from azure.ai.ml._utils._storage_utils import AzureMLDatastorePathUri
from azure.ai.ml._utils.utils import is_private_preview_enabled
from azure.ai.ml._utils.utils import is_private_preview_enabled # pylint: disable=unused-import
from azure.ai.ml.constants._common import (
ARM_ID_PREFIX,
AZUREML_RESOURCE_PROVIDER,
Expand Down Expand Up @@ -139,7 +139,6 @@ def get_asset_arm_id(
if (
azureml_type == "environments"
and asset.startswith(CURATED_ENV_PREFIX)
and is_private_preview_enabled()
):
module_logger.warning(
"This job/deployment uses curated environments. The syntax for using curated "
Expand Down
21 changes: 12 additions & 9 deletions sdk/ml/azure-ai-ml/tests/command_job/e2etests/test_command_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def test_command_job(self, randstr: Callable[[], str], client: MLClient) -> None
command_job_2 = client.jobs.get(job_name)
assert command_job.name == command_job_2.name
assert command_job.identity.type == command_job_2.identity.type
assert command_job_2.environment == "AzureML-sklearn-0.24-ubuntu18.04-py37-cpu:1"
assert command_job_2.environment == "azureml:AzureML-sklearn-0.24-ubuntu18.04-py37-cpu:1"
assert command_job_2.compute == "cpu-cluster"
check_tid_in_url(client, command_job_2)

Expand All @@ -95,14 +95,14 @@ def test_command_job_with_dataset(self, randstr: Callable[[], str], client: MLCl
command_job: CommandJob = client.jobs.create_or_update(job=job)

assert command_job.status in RunHistoryConstants.IN_PROGRESS_STATUSES
assert command_job.environment == "AzureML-sklearn-0.24-ubuntu18.04-py37-cpu:1"
assert command_job.environment == "azureml:AzureML-sklearn-0.24-ubuntu18.04-py37-cpu:1"
assert command_job.compute == "testCompute"
check_tid_in_url(client, command_job)

command_job_2 = client.jobs.get(job_name)
assert command_job.name == command_job_2.name
assert command_job.identity.type == command_job_2.identity.type
assert command_job_2.environment == "AzureML-sklearn-0.24-ubuntu18.04-py37-cpu:1"
assert command_job_2.environment == "azureml:AzureML-sklearn-0.24-ubuntu18.04-py37-cpu:1"
assert command_job_2.compute == "testCompute"
check_tid_in_url(client, command_job_2)

Expand All @@ -119,17 +119,20 @@ def test_command_job_with_dataset_short_uri(self, randstr: Callable[[], str], cl
command_job: CommandJob = client.jobs.create_or_update(job=job)

assert command_job.status in RunHistoryConstants.IN_PROGRESS_STATUSES
assert command_job.environment == "AzureML-sklearn-0.24-ubuntu18.04-py37-cpu:1"
assert command_job.environment == "azureml:AzureML-sklearn-0.24-ubuntu18.04-py37-cpu:1"
assert command_job.compute == "testCompute"
check_tid_in_url(client, command_job)

command_job_2 = client.jobs.get(job_name)
assert command_job.name == command_job_2.name
assert command_job.identity.type == command_job_2.identity.type
assert command_job_2.environment == "AzureML-sklearn-0.24-ubuntu18.04-py37-cpu:1"
assert command_job_2.environment == "azureml:AzureML-sklearn-0.24-ubuntu18.04-py37-cpu:1"
assert command_job_2.compute == "testCompute"
check_tid_in_url(client, command_job_2)

@pytest.mark.skip(
"https://dev.azure.com/msdata/Vienna/_workitems/edit/2009659"
)
@pytest.mark.e2etest
def test_command_job_builder(self, data_with_2_versions: str, client: MLClient) -> None:

Expand Down Expand Up @@ -169,7 +172,7 @@ def test_command_job_builder(self, data_with_2_versions: str, client: MLClient)

result = client.create_or_update(node)
assert result.description == "new-description"
assert result.environment == "AzureML-sklearn-0.24-ubuntu18.04-py37-cpu:1"
assert result.environment == "azureml:AzureML-sklearn-0.24-ubuntu18.04-py37-cpu:1"
assert result.display_name == "new_builder_command_job"
assert result.compute == "testCompute"
assert result.experiment_name == "mfe-test1-dataset"
Expand Down Expand Up @@ -201,7 +204,7 @@ def test_command_job_local(self, randstr: Callable[[], str], client: MLClient) -
)
command_job: CommandJob = client.jobs.create_or_update(job=job)
assert command_job.name == job_name
assert command_job.environment == "AzureML-sklearn-0.24-ubuntu18.04-py37-cpu:1"
assert command_job.environment == "azureml:AzureML-sklearn-0.24-ubuntu18.04-py37-cpu:1"
assert command_job.compute == "local"
assert command_job.environment_variables[COMMON_RUNTIME_ENV_VAR] == "true"

Expand Down Expand Up @@ -235,9 +238,9 @@ def test_command_job_with_modified_environment(self, randstr: Callable[[], str],
job.environment = "AzureML-sklearn-0.24-ubuntu18.04-py37-cpu:1"

job = client.jobs.create_or_update(job=job)
assert job.environment == "AzureML-sklearn-0.24-ubuntu18.04-py37-cpu:1"
assert job.environment == "azureml:AzureML-sklearn-0.24-ubuntu18.04-py37-cpu:1"
job = client.jobs.get(name=job.name)
assert job.environment == "AzureML-sklearn-0.24-ubuntu18.04-py37-cpu:1"
assert job.environment == "azureml:AzureML-sklearn-0.24-ubuntu18.04-py37-cpu:1"

@pytest.mark.e2etest
@pytest.mark.skip("Investigate why cancel does not record some upload requests of code assets")
Expand Down
15 changes: 15 additions & 0 deletions sdk/ml/azure-ai-ml/tests/dsl/e2etests/test_dsl_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -1525,6 +1525,9 @@ def parallel_in_pipeline(job_data_path, score_model):
assert_job_input_output_types(pipeline_job)
assert pipeline_job.settings.default_compute == "cpu-cluster"

@pytest.mark.skip(
"https://dev.azure.com/msdata/Vienna/_workitems/edit/2009659"
)
def test_parallel_components_with_file_input(self, client: MLClient) -> None:
components_dir = tests_root_dir / "test_configs/dsl_pipeline/parallel_component_with_file_input"

Expand Down Expand Up @@ -1955,6 +1958,9 @@ def pipeline(job_in_number, job_in_other_number, job_in_path):
client.jobs.get(child.name)
client.jobs.get(child.name)._repr_html_()

@pytest.mark.skip(
"https://dev.azure.com/msdata/Vienna/_workitems/edit/2009659"
)
def test_dsl_pipeline_without_setting_binding_node(self, client: MLClient) -> None:
from test_configs.dsl_pipeline.pipeline_with_set_binding_output_input.pipeline import pipeline_without_setting_binding_node

Expand Down Expand Up @@ -2005,6 +2011,9 @@ def test_dsl_pipeline_without_setting_binding_node(self, client: MLClient) -> No
}
assert expected_job == actual_job

@pytest.mark.skip(
"https://dev.azure.com/msdata/Vienna/_workitems/edit/2009659"
)
def test_dsl_pipeline_with_only_setting_pipeline_level(self, client: MLClient) -> None:
from test_configs.dsl_pipeline.pipeline_with_set_binding_output_input.pipeline import (
pipeline_with_only_setting_pipeline_level,
Expand Down Expand Up @@ -2057,6 +2066,9 @@ def test_dsl_pipeline_with_only_setting_pipeline_level(self, client: MLClient) -
}
assert expected_job == actual_job

@pytest.mark.skip(
"https://dev.azure.com/msdata/Vienna/_workitems/edit/2009659"
)
def test_dsl_pipeline_with_only_setting_binding_node(self, client: MLClient) -> None:
# Todo: checkout run priority when backend is ready
from test_configs.dsl_pipeline.pipeline_with_set_binding_output_input.pipeline import pipeline_with_only_setting_binding_node
Expand Down Expand Up @@ -2118,6 +2130,9 @@ def test_dsl_pipeline_with_only_setting_binding_node(self, client: MLClient) ->
}
assert expected_job == actual_job

@pytest.mark.skip(
"https://dev.azure.com/msdata/Vienna/_workitems/edit/2009659"
)
def test_dsl_pipeline_with_setting_binding_node_and_pipeline_level(self, client: MLClient) -> None:
from test_configs.dsl_pipeline.pipeline_with_set_binding_output_input.pipeline import (
pipeline_with_setting_binding_node_and_pipeline_level,
Expand Down
45 changes: 45 additions & 0 deletions sdk/ml/azure-ai-ml/tests/dsl/e2etests/test_dsl_pipeline_samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ def assert_dsl_curated(pipeline: PipelineJob, job_yaml, omit_fields):
@pytest.mark.e2etest
class TestDSLPipelineSamples(AzureRecordedTestCase):
@pytest.mark.e2etest
@pytest.mark.skip(
"https://dev.azure.com/msdata/Vienna/_workitems/edit/2009659"
)
def test_e2e_local_components(self, client: MLClient) -> None:
from test_configs.dsl_pipeline.e2e_local_components.pipeline import generate_dsl_pipeline as e2e_local_components

Expand Down Expand Up @@ -110,13 +113,19 @@ def test_e2e_registered_components(
assert_dsl_curated(pipeline, job_yaml, omit_fields)

@pytest.mark.e2etest
@pytest.mark.skip(
"https://dev.azure.com/msdata/Vienna/_workitems/edit/2009659"
)
def test_basic_component(self, client: MLClient) -> None:
from test_configs.dsl_pipeline.basic_component.pipeline import generate_dsl_pipeline as basic_component

pipeline = basic_component()
client.create_or_update(pipeline)

@pytest.mark.e2etest
@pytest.mark.skip(
"https://dev.azure.com/msdata/Vienna/_workitems/edit/2009659"
)
def test_component_with_input_output(self, client: MLClient) -> None:
from test_configs.dsl_pipeline.component_with_input_output.pipeline import (
generate_dsl_pipeline as component_with_input_output,
Expand All @@ -126,27 +135,39 @@ def test_component_with_input_output(self, client: MLClient) -> None:
client.create_or_update(pipeline)

@pytest.mark.e2etest
@pytest.mark.skip(
"https://dev.azure.com/msdata/Vienna/_workitems/edit/2009659"
)
def test_basic_pipeline(self, client: MLClient) -> None:
from test_configs.dsl_pipeline.basic_pipeline.pipeline import generate_dsl_pipeline as basic_pipeline

pipeline = basic_pipeline()
client.create_or_update(pipeline)

@pytest.mark.e2etest
@pytest.mark.skip(
"https://dev.azure.com/msdata/Vienna/_workitems/edit/2009659"
)
def test_pipeline_with_data(self, client: MLClient) -> None:
from test_configs.dsl_pipeline.pipline_with_data.pipeline import generate_dsl_pipeline as pipline_with_data

pipeline = pipline_with_data()
client.create_or_update(pipeline)

@pytest.mark.e2etest
@pytest.mark.skip(
"https://dev.azure.com/msdata/Vienna/_workitems/edit/2009659"
)
def test_local_data_input(self, client: MLClient) -> None:
from test_configs.dsl_pipeline.local_data_input.pipeline import generate_dsl_pipeline as local_data_input

pipeline = local_data_input()
client.create_or_update(pipeline)

@pytest.mark.e2etest
@pytest.mark.skip(
"https://dev.azure.com/msdata/Vienna/_workitems/edit/2009659"
)
def test_datastore_datapath_uri_folder(self, client: MLClient) -> None:
from test_configs.dsl_pipeline.datastore_datapath_uri_folder.pipeline import (
generate_dsl_pipeline as datastore_datapath_uri_folder,
Expand All @@ -156,6 +177,9 @@ def test_datastore_datapath_uri_folder(self, client: MLClient) -> None:
client.create_or_update(pipeline)

@pytest.mark.e2etest
@pytest.mark.skip(
"https://dev.azure.com/msdata/Vienna/_workitems/edit/2009659"
)
def test_datastore_datapath_uri_file(self, client: MLClient) -> None:
from test_configs.dsl_pipeline.datastore_datapath_uri_file.pipeline import (
generate_dsl_pipeline as datastore_datapath_uri_file,
Expand All @@ -172,6 +196,9 @@ def test_dataset_input(self, client: MLClient) -> None:
client.create_or_update(pipeline)

@pytest.mark.e2etest
@pytest.mark.skip(
"https://dev.azure.com/msdata/Vienna/_workitems/edit/2009659"
)
def test_web_url_input(self, client: MLClient) -> None:
from test_configs.dsl_pipeline.web_url_input.pipeline import generate_dsl_pipeline as web_url_input

Expand All @@ -193,6 +220,9 @@ def test_env_registered(self, client: MLClient) -> None:
client.create_or_update(pipeline)

@pytest.mark.e2etest
@pytest.mark.skip(
"https://dev.azure.com/msdata/Vienna/_workitems/edit/2009659"
)
def test_env_conda_file(self, client: MLClient) -> None:
from test_configs.dsl_pipeline.env_conda_file.pipeline import generate_dsl_pipeline as env_conda_file

Expand Down Expand Up @@ -228,6 +258,9 @@ def test_nyc_taxi_data_regression(self, client: MLClient) -> None:
client.create_or_update(pipeline)

@pytest.mark.e2etest
@pytest.mark.skip(
"https://dev.azure.com/msdata/Vienna/_workitems/edit/2009659"
)
def test_tf_mnist(self, client: MLClient) -> None:
from test_configs.dsl_pipeline.tf_mnist.pipeline import generate_dsl_pipeline as tf_mnist

Expand Down Expand Up @@ -262,6 +295,9 @@ def test_multi_parallel_components_with_file_input_pipeline_output(
client.create_or_update(pipeline)

@pytest.mark.e2etest
@pytest.mark.skip(
"https://dev.azure.com/msdata/Vienna/_workitems/edit/2009659"
)
def test_parallel_components_with_tabular_input_pipeline_output(self, client: MLClient) -> None:
from test_configs.dsl_pipeline.parallel_component_with_tabular_input.pipeline import (
generate_dsl_pipeline as pipeline_with_parallel_components,
Expand All @@ -271,20 +307,29 @@ def test_parallel_components_with_tabular_input_pipeline_output(self, client: ML
client.create_or_update(pipeline)

@pytest.mark.e2etest
@pytest.mark.skip(
"https://dev.azure.com/msdata/Vienna/_workitems/edit/2009659"
)
def test_parallel_components(self, client: MLClient) -> None:
from test_configs.dsl_pipeline.parallel_component.pipeline import generate_dsl_pipeline as pipeline_with_parallel_components

pipeline = pipeline_with_parallel_components()
client.create_or_update(pipeline)

@pytest.mark.e2etest
@pytest.mark.skip(
"https://dev.azure.com/msdata/Vienna/_workitems/edit/2009659"
)
def test_automl_job_in_pipeline(self, client: MLClient) -> None:
from test_configs.dsl_pipeline.automl_job_in_pipeline.pipeline import generate_dsl_pipeline as automl_job_in_pipeline

pipeline = automl_job_in_pipeline()
client.create_or_update(pipeline)

@pytest.mark.e2etest
@pytest.mark.skip(
"https://dev.azure.com/msdata/Vienna/_workitems/edit/2009659"
)
def test_pipeline_with_pipeline_component(self, client: MLClient) -> None:
from test_configs.dsl_pipeline.pipeline_with_pipeline_component.pipeline import (
generate_dsl_pipeline as pipeline_with_pipeline_component,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ def assert_dsl_curated(pipeline, job_yaml, omit_fields):
@pytest.mark.timeout(_DSL_TIMEOUT_SECOND)
@pytest.mark.unittest
class TestDSLPipelineSamples:
@pytest.mark.skip(
"https://dev.azure.com/msdata/Vienna/_workitems/edit/2009659"
)
def test_e2e_local_components(self) -> None:
from test_configs.dsl_pipeline.e2e_local_components.pipeline import generate_dsl_pipeline as e2e_local_components

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ def validate_import_job_submit_cancel(self, job: ImportJob, client: MLClient) ->
assert import_job_3.status in (JobStatus.CANCEL_REQUESTED, JobStatus.CANCELED, JobStatus.FAILED)

@pytest.mark.e2etest
@pytest.mark.skip(
"https://dev.azure.com/msdata/Vienna/_workitems/edit/2009659"
)
def test_import_pipeline_submit_cancel(self, client: MLClient) -> None:

pipeline: PipelineJob = load_job("./tests/test_configs/import_job/import_pipeline_test.yml")
Expand Down
Loading

0 comments on commit 5401473

Please sign in to comment.