From d1faa05265c76e01f1d502c765f510ea73201d04 Mon Sep 17 00:00:00 2001 From: TonyJ1 <41344586+TonyJ1@users.noreply.github.com> Date: Thu, 16 Feb 2023 09:57:22 -0800 Subject: [PATCH 01/13] [ML] Migrate from 2022_12_01_preview API to 2023_02_01_preview API --- .../azure/ai/ml/_internal/entities/command.py | 4 +-- sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py | 4 +-- .../azure/ai/ml/entities/_builders/command.py | 8 ++--- .../ai/ml/entities/_builders/parallel.py | 2 +- .../azure/ai/ml/entities/_builders/spark.py | 10 +++--- .../ai/ml/entities/_builders/spark_func.py | 2 +- .../azure/ai/ml/entities/_credentials.py | 12 +++---- .../ml/entities/_job/_input_output_helpers.py | 36 +++++++++---------- .../azure/ai/ml/entities/_job/command_job.py | 4 +-- .../azure/ai/ml/entities/_job/distribution.py | 10 +++--- .../azure/ai/ml/entities/_job/job.py | 4 +-- .../ai/ml/entities/_job/pipeline/_io/mixin.py | 4 +-- .../_job/pipeline/_pipeline_job_helpers.py | 8 ++--- .../ml/entities/_job/pipeline/pipeline_job.py | 4 +-- .../azure/ai/ml/entities/_job/spark_job.py | 4 +-- .../_job/spark_resource_configuration.py | 2 +- .../ai/ml/entities/_job/to_rest_functions.py | 2 +- .../ai/ml/entities/_schedule/schedule.py | 10 +++--- .../azure/ai/ml/entities/_schedule/trigger.py | 10 +++--- .../azure-ai-ml/azure/ai/ml/entities/_util.py | 2 +- .../ai/ml/operations/_compute_operations.py | 4 +-- .../azure/ai/ml/operations/_job_operations.py | 26 +++++++------- .../test_automl_image_classification.py | 2 +- ..._automl_image_classification_multilabel.py | 2 +- ...test_automl_image_instance_segmentation.py | 2 +- .../test_automl_image_object_detection.py | 2 +- .../unittests/test_classification_job.py | 2 +- .../unittests/test_forecasting_job.py | 2 +- .../unittests/test_regression_job.py | 2 +- ...test_text_classification_multilabel_job.py | 2 +- .../automl_job/unittests/test_text_ner_job.py | 2 +- .../unittests/test_command_job_schema.py | 4 +-- sdk/ml/azure-ai-ml/tests/conftest.py | 5 +++ .../unittests/test_ml_client.py | 2 +- .../unittests/test_job_operations.py | 26 +++++++------- .../unittests/test_pipeline_job_entity.py | 2 +- .../unittests/test_spark_job_entity.py | 6 ++-- .../unittests/test_sweep_job_schema.py | 12 +++---- 38 files changed, 126 insertions(+), 121 deletions(-) diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_internal/entities/command.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_internal/entities/command.py index 3e0c04948988..301dfdfd0cf8 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_internal/entities/command.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_internal/entities/command.py @@ -10,8 +10,8 @@ from azure.ai.ml._internal._schema.component import NodeType from azure.ai.ml._internal.entities.component import InternalComponent from azure.ai.ml._internal.entities.node import InternalBaseNode -from azure.ai.ml._restclient.v2022_12_01_preview.models import CommandJobLimits as RestCommandJobLimits -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobResourceConfiguration as RestJobResourceConfiguration +from azure.ai.ml._restclient.v2023_02_01_preview.models import CommandJobLimits as RestCommandJobLimits +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobResourceConfiguration as RestJobResourceConfiguration from azure.ai.ml._schema import PathAwareSchema from azure.ai.ml._schema.core.fields import DistributionField from azure.ai.ml.entities import CommandJobLimits, JobResourceConfiguration diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py index 7983eacaa73f..178e4829c652 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py @@ -38,7 +38,7 @@ # from azure.ai.ml._telemetry.logging_handler import get_appinsights_log_handler from azure.ai.ml._user_agent import USER_AGENT -from azure.ai.ml._utils._experimental import experimental +from azure.ai.ml._utils._experimefrom azure.ai.ml._restclient.v2023_02_01_preview importntal import experimental from azure.ai.ml._utils._http_utils import HttpPipeline from azure.ai.ml._utils._registry_utils import RegistryDiscovery from azure.ai.ml._utils.utils import _is_https_url @@ -417,7 +417,7 @@ def __init__( self._jobs = JobOperations( self._operation_scope, self._operation_config, - self._service_client_12_2022_preview, + self._service_client_02_2023_preview, self._operation_container, self._credential, _service_client_kwargs=kwargs, diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_builders/command.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_builders/command.py index e539da721970..7d3f998e7c34 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_builders/command.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_builders/command.py @@ -13,10 +13,10 @@ from marshmallow import INCLUDE, Schema -from azure.ai.ml._restclient.v2022_12_01_preview.models import CommandJob as RestCommandJob -from azure.ai.ml._restclient.v2022_12_01_preview.models import CommandJobLimits as RestCommandJobLimits -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobBase -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobResourceConfiguration as RestJobResourceConfiguration +from azure.ai.ml._restclient.v2023_02_01_preview.models import CommandJob as RestCommandJob +from azure.ai.ml._restclient.v2023_02_01_preview.models import CommandJobLimits as RestCommandJobLimits +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobBase +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobResourceConfiguration as RestJobResourceConfiguration from azure.ai.ml._schema.core.fields import NestedField, UnionField from azure.ai.ml._schema.job.command_job import CommandJobSchema from azure.ai.ml._schema.job.identity import AMLTokenIdentitySchema, ManagedIdentitySchema, UserIdentitySchema diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_builders/parallel.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_builders/parallel.py index 2ed43f48d9fe..a90a7384b4c0 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_builders/parallel.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_builders/parallel.py @@ -13,7 +13,7 @@ from marshmallow import Schema -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobResourceConfiguration as RestJobResourceConfiguration +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobResourceConfiguration as RestJobResourceConfiguration from azure.ai.ml.constants._common import ARM_ID_PREFIX from azure.ai.ml.constants._component import NodeType from azure.ai.ml.entities._component.component import Component diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_builders/spark.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_builders/spark.py index 698cb298e89b..c0c341e98f0d 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_builders/spark.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_builders/spark.py @@ -12,11 +12,11 @@ from marshmallow import INCLUDE, Schema -from azure.ai.ml._restclient.v2022_12_01_preview.models import IdentityConfiguration -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobBase as JobBaseData -from azure.ai.ml._restclient.v2022_12_01_preview.models import SparkJob as RestSparkJob -from azure.ai.ml._restclient.v2022_12_01_preview.models import SparkJobEntry as RestSparkJobEntry -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import IdentityConfiguration +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobBase as JobBaseData +from azure.ai.ml._restclient.v2023_02_01_preview.models import SparkJob as RestSparkJob +from azure.ai.ml._restclient.v2023_02_01_preview.models import SparkJobEntry as RestSparkJobEntry +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( SparkResourceConfiguration as RestSparkResourceConfiguration, ) from azure.ai.ml._schema.job.identity import AMLTokenIdentitySchema, ManagedIdentitySchema, UserIdentitySchema diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_builders/spark_func.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_builders/spark_func.py index a5aafc85d06f..91786d3647cd 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_builders/spark_func.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_builders/spark_func.py @@ -6,7 +6,7 @@ import os from typing import Callable, Dict, List, Optional, Tuple, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import AmlToken, ManagedIdentity, UserIdentity +from azure.ai.ml._restclient.v2023_02_01_preview.models import AmlToken, ManagedIdentity, UserIdentity from azure.ai.ml.constants._common import AssetTypes from azure.ai.ml.constants._component import ComponentSource from azure.ai.ml.entities import Environment diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_credentials.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_credentials.py index b157a19b4b39..f4126dc7d273 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_credentials.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_credentials.py @@ -43,12 +43,12 @@ ServicePrincipalDatastoreSecrets as RestServicePrincipalDatastoreSecrets, ) from azure.ai.ml._restclient.v2022_05_01.models import UserAssignedIdentity as RestUserAssignedIdentityConfiguration -from azure.ai.ml._restclient.v2022_12_01_preview.models import AmlToken as RestAmlToken -from azure.ai.ml._restclient.v2022_12_01_preview.models import IdentityConfiguration as RestJobIdentityConfiguration -from azure.ai.ml._restclient.v2022_12_01_preview.models import IdentityConfigurationType -from azure.ai.ml._restclient.v2022_12_01_preview.models import ManagedIdentity as RestJobManagedIdentity -from azure.ai.ml._restclient.v2022_12_01_preview.models import ManagedServiceIdentity as RestRegistryManagedIdentity -from azure.ai.ml._restclient.v2022_12_01_preview.models import UserIdentity as RestUserIdentity +from azure.ai.ml._restclient.v2023_02_01_preview.models import AmlToken as RestAmlToken +from azure.ai.ml._restclient.v2023_02_01_preview.models import IdentityConfiguration as RestJobIdentityConfiguration +from azure.ai.ml._restclient.v2023_02_01_preview.models import IdentityConfigurationType +from azure.ai.ml._restclient.v2023_02_01_preview.models import ManagedIdentity as RestJobManagedIdentity +from azure.ai.ml._restclient.v2023_02_01_preview.models import ManagedServiceIdentity as RestRegistryManagedIdentity +from azure.ai.ml._restclient.v2023_02_01_preview.models import UserIdentity as RestUserIdentity from azure.ai.ml._utils.utils import camel_to_snake, snake_to_pascal from azure.ai.ml.constants._common import CommonYamlFields, IdentityType from azure.ai.ml.entities._mixins import DictMixin, RestTranslatableMixin, YamlTranslatableMixin diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/_input_output_helpers.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/_input_output_helpers.py index 0b3e76fb30b4..2a5c4227eb7f 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/_input_output_helpers.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/_input_output_helpers.py @@ -6,24 +6,24 @@ import re from typing import Any, Dict, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import CustomModelJobInput as RestCustomModelJobInput -from azure.ai.ml._restclient.v2022_12_01_preview.models import CustomModelJobOutput as RestCustomModelJobOutput -from azure.ai.ml._restclient.v2022_12_01_preview.models import InputDeliveryMode -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobInput as RestJobInput -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobInputType -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobOutput as RestJobOutput -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobOutputType, LiteralJobInput -from azure.ai.ml._restclient.v2022_12_01_preview.models import MLFlowModelJobInput as RestMLFlowModelJobInput -from azure.ai.ml._restclient.v2022_12_01_preview.models import MLFlowModelJobOutput as RestMLFlowModelJobOutput -from azure.ai.ml._restclient.v2022_12_01_preview.models import MLTableJobInput as RestMLTableJobInput -from azure.ai.ml._restclient.v2022_12_01_preview.models import MLTableJobOutput as RestMLTableJobOutput -from azure.ai.ml._restclient.v2022_12_01_preview.models import OutputDeliveryMode -from azure.ai.ml._restclient.v2022_12_01_preview.models import TritonModelJobInput as RestTritonModelJobInput -from azure.ai.ml._restclient.v2022_12_01_preview.models import TritonModelJobOutput as RestTritonModelJobOutput -from azure.ai.ml._restclient.v2022_12_01_preview.models import UriFileJobInput as RestUriFileJobInput -from azure.ai.ml._restclient.v2022_12_01_preview.models import UriFileJobOutput as RestUriFileJobOutput -from azure.ai.ml._restclient.v2022_12_01_preview.models import UriFolderJobInput as RestUriFolderJobInput -from azure.ai.ml._restclient.v2022_12_01_preview.models import UriFolderJobOutput as RestUriFolderJobOutput +from azure.ai.ml._restclient.v2023_02_01_preview.models import CustomModelJobInput as RestCustomModelJobInput +from azure.ai.ml._restclient.v2023_02_01_preview.models import CustomModelJobOutput as RestCustomModelJobOutput +from azure.ai.ml._restclient.v2023_02_01_preview.models import InputDeliveryMode +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobInput as RestJobInput +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobInputType +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobOutput as RestJobOutput +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobOutputType, LiteralJobInput +from azure.ai.ml._restclient.v2023_02_01_preview.models import MLFlowModelJobInput as RestMLFlowModelJobInput +from azure.ai.ml._restclient.v2023_02_01_preview.models import MLFlowModelJobOutput as RestMLFlowModelJobOutput +from azure.ai.ml._restclient.v2023_02_01_preview.models import MLTableJobInput as RestMLTableJobInput +from azure.ai.ml._restclient.v2023_02_01_preview.models import MLTableJobOutput as RestMLTableJobOutput +from azure.ai.ml._restclient.v2023_02_01_preview.models import OutputDeliveryMode +from azure.ai.ml._restclient.v2023_02_01_preview.models import TritonModelJobInput as RestTritonModelJobInput +from azure.ai.ml._restclient.v2023_02_01_preview.models import TritonModelJobOutput as RestTritonModelJobOutput +from azure.ai.ml._restclient.v2023_02_01_preview.models import UriFileJobInput as RestUriFileJobInput +from azure.ai.ml._restclient.v2023_02_01_preview.models import UriFileJobOutput as RestUriFileJobOutput +from azure.ai.ml._restclient.v2023_02_01_preview.models import UriFolderJobInput as RestUriFolderJobInput +from azure.ai.ml._restclient.v2023_02_01_preview.models import UriFolderJobOutput as RestUriFolderJobOutput from azure.ai.ml._utils.utils import is_data_binding_expression from azure.ai.ml.constants import AssetTypes, InputOutputModes, JobType from azure.ai.ml.constants._component import IOConstants diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/command_job.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/command_job.py index 1bc997e50967..8b7b31435f93 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/command_job.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/command_job.py @@ -9,8 +9,8 @@ from pathlib import Path from typing import Dict, Optional, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import CommandJob as RestCommandJob -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobBase +from azure.ai.ml._restclient.v2023_02_01_preview.models import CommandJob as RestCommandJob +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobBase from azure.ai.ml._schema.job.command_job import CommandJobSchema from azure.ai.ml._utils.utils import map_single_brackets_and_warn from azure.ai.ml.constants import JobType diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/distribution.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/distribution.py index 20e697bfba70..474357d34ad3 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/distribution.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/distribution.py @@ -6,13 +6,13 @@ from typing import Dict, Optional, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( DistributionConfiguration as RestDistributionConfiguration, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models import DistributionType as RestDistributionType -from azure.ai.ml._restclient.v2022_12_01_preview.models import Mpi as RestMpi -from azure.ai.ml._restclient.v2022_12_01_preview.models import PyTorch as RestPyTorch -from azure.ai.ml._restclient.v2022_12_01_preview.models import TensorFlow as RestTensorFlow +from azure.ai.ml._restclient.v2023_02_01_preview.models import DistributionType as RestDistributionType +from azure.ai.ml._restclient.v2023_02_01_preview.models import Mpi as RestMpi +from azure.ai.ml._restclient.v2023_02_01_preview.models import PyTorch as RestPyTorch +from azure.ai.ml._restclient.v2023_02_01_preview.models import TensorFlow as RestTensorFlow from azure.ai.ml.constants import DistributionType from azure.ai.ml.entities._mixins import RestTranslatableMixin diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/job.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/job.py index 98eee626494d..c04a102a0f8f 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/job.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/job.py @@ -14,8 +14,8 @@ from typing import IO, AnyStr, Dict, Optional, Type, Union from azure.ai.ml._restclient.runhistory.models import Run -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobBase, JobService -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobType as RestJobType +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobBase, JobService +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobType as RestJobType from azure.ai.ml._utils._html_utils import make_link, to_html from azure.ai.ml._utils.utils import dump_yaml_to_file from azure.ai.ml.constants._common import BASE_PATH_CONTEXT_KEY, PARAMS_OVERRIDE_KEY, CommonYamlFields diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/pipeline/_io/mixin.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/pipeline/_io/mixin.py index 4b4e50bcecb9..574293efaf09 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/pipeline/_io/mixin.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/pipeline/_io/mixin.py @@ -5,8 +5,8 @@ import copy from typing import Dict, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobInput as RestJobInput -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobOutput as RestJobOutput +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobInput as RestJobInput +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobOutput as RestJobOutput from azure.ai.ml.constants._component import ComponentJobConstants from azure.ai.ml.entities._inputs_outputs import GroupInput, Input, Output from azure.ai.ml.entities._util import copy_output_setting diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/pipeline/_pipeline_job_helpers.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/pipeline/_pipeline_job_helpers.py index 49f9d543b506..8935f726c7b5 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/pipeline/_pipeline_job_helpers.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/pipeline/_pipeline_job_helpers.py @@ -4,10 +4,10 @@ import re from typing import Dict, List, Tuple, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import InputDeliveryMode -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobInput as RestJobInput -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobOutput as RestJobOutput -from azure.ai.ml._restclient.v2022_12_01_preview.models import Mpi, PyTorch, TensorFlow +from azure.ai.ml._restclient.v2023_02_01_preview.models import InputDeliveryMode +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobInput as RestJobInput +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobOutput as RestJobOutput +from azure.ai.ml._restclient.v2023_02_01_preview.models import Mpi, PyTorch, TensorFlow from azure.ai.ml.constants._component import ComponentJobConstants from azure.ai.ml.entities._inputs_outputs import Input, Output from azure.ai.ml.entities._job._input_output_helpers import ( diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/pipeline/pipeline_job.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/pipeline/pipeline_job.py index 31cf583fc4a1..7438391f0711 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/pipeline/pipeline_job.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/pipeline/pipeline_job.py @@ -10,8 +10,8 @@ from pathlib import Path from typing import Dict, List, Optional, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobBase -from azure.ai.ml._restclient.v2022_12_01_preview.models import PipelineJob as RestPipelineJob +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobBase +from azure.ai.ml._restclient.v2023_02_01_preview.models import PipelineJob as RestPipelineJob from azure.ai.ml._schema import PathAwareSchema from azure.ai.ml._schema.pipeline.pipeline_job import PipelineJobSchema from azure.ai.ml._utils._arm_id_utils import get_resource_name_from_arm_id_safe diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/spark_job.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/spark_job.py index e245634d7565..ec028f3bcf1d 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/spark_job.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/spark_job.py @@ -10,8 +10,8 @@ from marshmallow import INCLUDE -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobBase -from azure.ai.ml._restclient.v2022_12_01_preview.models import SparkJob as RestSparkJob +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobBase +from azure.ai.ml._restclient.v2023_02_01_preview.models import SparkJob as RestSparkJob from azure.ai.ml._schema.job.identity import AMLTokenIdentitySchema, ManagedIdentitySchema, UserIdentitySchema from azure.ai.ml._schema.job.parameterized_spark import CONF_KEY_MAP, SparkConfSchema from azure.ai.ml._schema.job.spark_job import SparkJobSchema diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/spark_resource_configuration.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/spark_resource_configuration.py index ecb79bcb9993..c06fc91f39c1 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/spark_resource_configuration.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/spark_resource_configuration.py @@ -4,7 +4,7 @@ from typing import Optional -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( SparkResourceConfiguration as RestSparkResourceConfiguration, ) from azure.ai.ml.entities._mixins import DictMixin, RestTranslatableMixin diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/to_rest_functions.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/to_rest_functions.py index 074272ebf99e..d81bfc764cb1 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/to_rest_functions.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/to_rest_functions.py @@ -7,7 +7,7 @@ from functools import singledispatch from pathlib import Path -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobBase as JobBaseData +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobBase as JobBaseData from azure.ai.ml.constants._common import DEFAULT_EXPERIMENT_NAME from azure.ai.ml.entities._builders.command import Command from azure.ai.ml.entities._builders.pipeline import Pipeline diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_schedule/schedule.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_schedule/schedule.py index e54048aca37d..2584d5f85f50 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_schedule/schedule.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_schedule/schedule.py @@ -7,11 +7,11 @@ from pathlib import Path from typing import IO, AnyStr, Dict, Optional, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobBase as RestJobBase -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobScheduleAction -from azure.ai.ml._restclient.v2022_12_01_preview.models import PipelineJob as RestPipelineJob -from azure.ai.ml._restclient.v2022_12_01_preview.models import Schedule as RestSchedule -from azure.ai.ml._restclient.v2022_12_01_preview.models import ScheduleProperties +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobBase as RestJobBase +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobScheduleAction +from azure.ai.ml._restclient.v2023_02_01_preview.models import PipelineJob as RestPipelineJob +from azure.ai.ml._restclient.v2023_02_01_preview.models import Schedule as RestSchedule +from azure.ai.ml._restclient.v2023_02_01_preview.models import ScheduleProperties from azure.ai.ml._schema.schedule.schedule import ScheduleSchema from azure.ai.ml._utils.utils import camel_to_snake, dump_yaml_to_file, is_private_preview_enabled from azure.ai.ml.constants import JobType diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_schedule/trigger.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_schedule/trigger.py index 1d406a4a5414..d2deb04df5c9 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_schedule/trigger.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_schedule/trigger.py @@ -7,11 +7,11 @@ from datetime import datetime from typing import List, Optional, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import CronTrigger as RestCronTrigger -from azure.ai.ml._restclient.v2022_12_01_preview.models import RecurrenceSchedule as RestRecurrencePattern -from azure.ai.ml._restclient.v2022_12_01_preview.models import RecurrenceTrigger as RestRecurrenceTrigger -from azure.ai.ml._restclient.v2022_12_01_preview.models import TriggerBase as RestTriggerBase -from azure.ai.ml._restclient.v2022_12_01_preview.models import TriggerType as RestTriggerType +from azure.ai.ml._restclient.v2023_02_01_preview.models import CronTrigger as RestCronTrigger +from azure.ai.ml._restclient.v2023_02_01_preview.models import RecurrenceSchedule as RestRecurrencePattern +from azure.ai.ml._restclient.v2023_02_01_preview.models import RecurrenceTrigger as RestRecurrenceTrigger +from azure.ai.ml._restclient.v2023_02_01_preview.models import TriggerBase as RestTriggerBase +from azure.ai.ml._restclient.v2023_02_01_preview.models import TriggerType as RestTriggerType from azure.ai.ml._utils.utils import camel_to_snake, snake_to_camel from azure.ai.ml.constants import TimeZone from azure.ai.ml.entities._mixins import RestTranslatableMixin diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_util.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_util.py index 42b8553e086e..21a12665e5cf 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_util.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_util.py @@ -13,7 +13,7 @@ from marshmallow.exceptions import ValidationError from azure.ai.ml._restclient.v2022_02_01_preview.models import JobInputType as JobInputType02 -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobInputType as JobInputType10 +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobInputType as JobInputType10 from azure.ai.ml._schema._datastore import ( AzureBlobSchema, AzureDataLakeGen1Schema, diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_compute_operations.py b/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_compute_operations.py index c80487191f5d..53a81637d9ac 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_compute_operations.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_compute_operations.py @@ -6,7 +6,7 @@ from typing import Any, Dict, Iterable, Optional -from azure.ai.ml._restclient.v2022_12_01_preview import AzureMachineLearningWorkspaces as ServiceClient122022Preview +from azure.ai.ml._restclient.v2023_02_01_preview import AzureMachineLearningWorkspaces as ServiceClient022023Preview from azure.ai.ml._scope_dependent_operations import OperationConfig, OperationScope, _ScopeDependentOperations # from azure.ai.ml._telemetry import ActivityType, monitor_with_activity @@ -33,7 +33,7 @@ def __init__( self, operation_scope: OperationScope, operation_config: OperationConfig, - service_client: ServiceClient122022Preview, + service_client: ServiceClient022023Preview, **kwargs: Dict, ): super(ComputeOperations, self).__init__(operation_scope, operation_config) diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_job_operations.py b/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_job_operations.py index decc500fbe11..ac8564885cc4 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_job_operations.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_job_operations.py @@ -26,10 +26,10 @@ from azure.ai.ml._restclient.dataset_dataplane import AzureMachineLearningWorkspaces as ServiceClientDatasetDataplane from azure.ai.ml._restclient.model_dataplane import AzureMachineLearningWorkspaces as ServiceClientModelDataplane from azure.ai.ml._restclient.runhistory import AzureMachineLearningWorkspaces as ServiceClientRunHistory -from azure.ai.ml._restclient.v2022_12_01_preview import AzureMachineLearningWorkspaces as ServiceClient122022Preview -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobBase -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobType as RestJobType -from azure.ai.ml._restclient.v2022_12_01_preview.models import ListViewType, UserIdentity +from azure.ai.ml._restclient.v2023_02_01_preview import AzureMachineLearningWorkspaces as ServiceClient022023Preview +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobBase +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobType as RestJobType +from azure.ai.ml._restclient.v2023_02_01_preview.models import ListViewType, UserIdentity from azure.ai.ml._scope_dependent_operations import ( OperationConfig, OperationsContainer, @@ -137,15 +137,15 @@ def __init__( self, operation_scope: OperationScope, operation_config: OperationConfig, - service_client_12_2022_preview: ServiceClient122022Preview, + service_client_02_2023_preview: ServiceClient022023Preview, all_operations: OperationsContainer, credential: TokenCredential, **kwargs: Any, ): super(JobOperations, self).__init__(operation_scope, operation_config) # ops_logger.update_info(kwargs) - self._operation_2022_12_preview = service_client_12_2022_preview.jobs - self._service_client = service_client_12_2022_preview + self._operation_2023_02_preview = service_client_02_2023_preview.jobs + self._service_client = service_client_02_2023_preview self._all_operations = all_operations self._stream_logs_until_completion = stream_logs_until_completion # Dataplane service clients are lazily created as they are needed @@ -248,7 +248,7 @@ def list( parent_job = self.get(parent_job_name) return self._runs_operations.get_run_children(parent_job.name) - return self._operation_2022_12_preview.list( + return self._operation_2023_02_preview.list( self._operation_scope.resource_group_name, self._workspace_name, cls=lambda objs: [self._handle_rest_errors(obj) for obj in objs], @@ -322,7 +322,7 @@ def begin_cancel(self, name: str) -> LROPoller[None]: :rtype: ~azure.core.polling.LROPoller[None] :raise: ResourceNotFoundError if can't find a job matching provided name. """ - return self._operation_2022_12_preview.begin_cancel( + return self._operation_2023_02_preview.begin_cancel( id=name, resource_group_name=self._operation_scope.resource_group_name, workspace_name=self._workspace_name, @@ -521,7 +521,7 @@ def create_or_update( ): self._set_headers_with_user_aml_token(kwargs) - result = self._operation_2022_12_preview.create_or_update( + result = self._operation_2023_02_preview.create_or_update( id=rest_job_resource.name, # type: ignore resource_group_name=self._operation_scope.resource_group_name, workspace_name=self._workspace_name, @@ -555,7 +555,7 @@ def create_or_update( if snapshot_id is not None: job_object.properties.properties["ContentSnapshotId"] = snapshot_id - result = self._operation_2022_12_preview.create_or_update( + result = self._operation_2023_02_preview.create_or_update( id=rest_job_resource.name, # type: ignore resource_group_name=self._operation_scope.resource_group_name, workspace_name=self._workspace_name, @@ -575,7 +575,7 @@ def _archive_or_restore(self, name: str, is_archived: bool): raise PipelineChildJobError(job_id=job_object.id) job_object.properties.is_archived = is_archived - self._operation_2022_12_preview.create_or_update( + self._operation_2023_02_preview.create_or_update( id=job_object.name, resource_group_name=self._operation_scope.resource_group_name, workspace_name=self._workspace_name, @@ -817,7 +817,7 @@ def _get_batch_job_scoring_output_uri(self, job_name: str) -> Optional[str]: return uri def _get_job(self, name: str) -> JobBase: - return self._operation_2022_12_preview.get( + return self._operation_2023_02_preview.get( id=name, resource_group_name=self._operation_scope.resource_group_name, workspace_name=self._workspace_name, diff --git a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_classification.py b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_classification.py index 4dad8888c972..25a9f37c3f7b 100644 --- a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_classification.py +++ b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_classification.py @@ -12,7 +12,7 @@ SamplingAlgorithmType, StochasticOptimizer, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models import UserIdentity as RestUserIdentity +from azure.ai.ml._restclient.v2023_02_01_preview.models import UserIdentity as RestUserIdentity from azure.ai.ml.automl import image_classification from azure.ai.ml.constants._common import AssetTypes from azure.ai.ml.entities._inputs_outputs import Input diff --git a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_classification_multilabel.py b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_classification_multilabel.py index 059444a0a3e7..9e685bc70c35 100644 --- a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_classification_multilabel.py +++ b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_classification_multilabel.py @@ -12,7 +12,7 @@ SamplingAlgorithmType, StochasticOptimizer, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models import UserIdentity as RestUserIdentity +from azure.ai.ml._restclient.v2023_02_01_preview.models import UserIdentity as RestUserIdentity from azure.ai.ml.automl import image_classification_multilabel from azure.ai.ml.constants._common import AssetTypes from azure.ai.ml.entities._inputs_outputs import Input diff --git a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_instance_segmentation.py b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_instance_segmentation.py index 0421280419bf..9a14f56143b5 100644 --- a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_instance_segmentation.py +++ b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_instance_segmentation.py @@ -13,7 +13,7 @@ SamplingAlgorithmType, StochasticOptimizer, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models import UserIdentity as RestUserIdentity +from azure.ai.ml._restclient.v2023_02_01_preview.models import UserIdentity as RestUserIdentity from azure.ai.ml._restclient.v2022_10_01_preview.models import ValidationMetricType from azure.ai.ml.automl import image_instance_segmentation from azure.ai.ml.constants._common import AssetTypes diff --git a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_object_detection.py b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_object_detection.py index c43f5f2b5776..0513ce831bda 100644 --- a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_object_detection.py +++ b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_object_detection.py @@ -13,7 +13,7 @@ SamplingAlgorithmType, StochasticOptimizer, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models import UserIdentity as RestUserIdentity +from azure.ai.ml._restclient.v2023_02_01_preview.models import UserIdentity as RestUserIdentity from azure.ai.ml._restclient.v2022_10_01_preview.models import ValidationMetricType from azure.ai.ml.automl import image_object_detection from azure.ai.ml.constants._common import AssetTypes diff --git a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_classification_job.py b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_classification_job.py index 52c91ff75213..c18c8e3f902c 100644 --- a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_classification_job.py +++ b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_classification_job.py @@ -7,7 +7,7 @@ from azure.ai.ml import UserIdentityConfiguration from azure.ai.ml._restclient.v2022_10_01_preview.models import CustomNCrossValidations, MLTableJobInput -from azure.ai.ml._restclient.v2022_12_01_preview.models import UserIdentity as RestUserIdentity +from azure.ai.ml._restclient.v2023_02_01_preview.models import UserIdentity as RestUserIdentity from azure.ai.ml.automl import ClassificationModels, ClassificationPrimaryMetrics, classification from azure.ai.ml.constants._common import AssetTypes from azure.ai.ml.entities._inputs_outputs import Input diff --git a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_forecasting_job.py b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_forecasting_job.py index 9f1a530cb6f8..b74e708d7c68 100644 --- a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_forecasting_job.py +++ b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_forecasting_job.py @@ -6,7 +6,7 @@ from azure.ai.ml import UserIdentityConfiguration from azure.ai.ml._restclient.v2022_10_01_preview.models import MLTableJobInput -from azure.ai.ml._restclient.v2022_12_01_preview.models import UserIdentity as RestUserIdentity +from azure.ai.ml._restclient.v2023_02_01_preview.models import UserIdentity as RestUserIdentity from azure.ai.ml.automl import ( ForecastingModels, ForecastingPrimaryMetrics, diff --git a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_regression_job.py b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_regression_job.py index 39d7782b6f15..bce98258e37f 100644 --- a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_regression_job.py +++ b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_regression_job.py @@ -6,7 +6,7 @@ from azure.ai.ml import UserIdentityConfiguration from azure.ai.ml._restclient.v2022_10_01_preview.models import MLTableJobInput -from azure.ai.ml._restclient.v2022_12_01_preview.models import UserIdentity as RestUserIdentity +from azure.ai.ml._restclient.v2023_02_01_preview.models import UserIdentity as RestUserIdentity from azure.ai.ml.automl import RegressionModels, RegressionPrimaryMetrics, regression from azure.ai.ml.constants._common import AssetTypes from azure.ai.ml.entities._inputs_outputs import Input diff --git a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_text_classification_multilabel_job.py b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_text_classification_multilabel_job.py index 90d0e97e147e..276255ac83d4 100644 --- a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_text_classification_multilabel_job.py +++ b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_text_classification_multilabel_job.py @@ -17,7 +17,7 @@ SamplingAlgorithmType, TextClassificationMultilabel, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models import UserIdentity as RestUserIdentity +from azure.ai.ml._restclient.v2023_02_01_preview.models import UserIdentity as RestUserIdentity from azure.ai.ml._restclient.v2022_10_01_preview.models._azure_machine_learning_workspaces_enums import ( ClassificationPrimaryMetrics, ) diff --git a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_text_ner_job.py b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_text_ner_job.py index f4b8e2edbeb6..e0de20c14f92 100644 --- a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_text_ner_job.py +++ b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_text_ner_job.py @@ -16,7 +16,7 @@ TaskType, TextNer, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models import UserIdentity as RestUserIdentity +from azure.ai.ml._restclient.v2023_02_01_preview.models import UserIdentity as RestUserIdentity from azure.ai.ml._restclient.v2022_10_01_preview.models._azure_machine_learning_workspaces_enums import ( ClassificationPrimaryMetrics, ) diff --git a/sdk/ml/azure-ai-ml/tests/command_job/unittests/test_command_job_schema.py b/sdk/ml/azure-ai-ml/tests/command_job/unittests/test_command_job_schema.py index 20f1918fe57a..4dbfee737aaf 100644 --- a/sdk/ml/azure-ai-ml/tests/command_job/unittests/test_command_job_schema.py +++ b/sdk/ml/azure-ai-ml/tests/command_job/unittests/test_command_job_schema.py @@ -5,13 +5,13 @@ from marshmallow.exceptions import ValidationError from azure.ai.ml import load_job -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( InputDeliveryMode, JobInputType, JobOutputType, OutputDeliveryMode, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models import UriFolderJobOutput as RestUriFolderJobOutput +from azure.ai.ml._restclient.v2023_02_01_preview.models import UriFolderJobOutput as RestUriFolderJobOutput from azure.ai.ml._schema import CommandJobSchema from azure.ai.ml._utils.utils import is_valid_uuid, load_yaml from azure.ai.ml.constants._common import ANONYMOUS_ENV_NAME, BASE_PATH_CONTEXT_KEY, AssetTypes, InputOutputModes diff --git a/sdk/ml/azure-ai-ml/tests/conftest.py b/sdk/ml/azure-ai-ml/tests/conftest.py index 39bef1a6b3f8..c390648b24e3 100644 --- a/sdk/ml/azure-ai-ml/tests/conftest.py +++ b/sdk/ml/azure-ai-ml/tests/conftest.py @@ -225,6 +225,11 @@ def mock_aml_services_2022_12_01_preview(mocker: MockFixture) -> Mock: return mocker.patch("azure.ai.ml._restclient.v2022_12_01_preview") +@pytest.fixture +def mock_aml_services_2023_02_01_preview(mocker: MockFixture) -> Mock: + return mocker.patch("azure.ai.ml._restclient.v2023_02_01_preview") + + @pytest.fixture def mock_aml_services_run_history(mocker: MockFixture) -> Mock: return mocker.patch("azure.ai.ml._restclient.runhistory") diff --git a/sdk/ml/azure-ai-ml/tests/internal_utils/unittests/test_ml_client.py b/sdk/ml/azure-ai-ml/tests/internal_utils/unittests/test_ml_client.py index a1e78f481e5e..1662c5d3a80c 100644 --- a/sdk/ml/azure-ai-ml/tests/internal_utils/unittests/test_ml_client.py +++ b/sdk/ml/azure-ai-ml/tests/internal_utils/unittests/test_ml_client.py @@ -115,7 +115,7 @@ def test_mfe_url_overwrite(self, mock_get_mfe_url_override, mock_credential): assert ml_client.workspaces._operation._client._base_url == mock_url assert ml_client.compute._operation._client._base_url == mock_url - assert ml_client.jobs._operation_2022_12_preview._client._base_url == mock_url + assert ml_client.jobs._operation_2023_02_preview._client._base_url == mock_url assert ml_client.jobs._kwargs["enforce_https"] is False # @patch("azure.ai.ml._ml_client.RegistryOperations", Mock()) diff --git a/sdk/ml/azure-ai-ml/tests/job_common/unittests/test_job_operations.py b/sdk/ml/azure-ai-ml/tests/job_common/unittests/test_job_operations.py index 847a8a7c38b0..bc69ba7b3c96 100644 --- a/sdk/ml/azure-ai-ml/tests/job_common/unittests/test_job_operations.py +++ b/sdk/ml/azure-ai-ml/tests/job_common/unittests/test_job_operations.py @@ -102,7 +102,7 @@ def mock_runs_operation( def mock_job_operation( mock_workspace_scope: OperationScope, mock_operation_config: OperationConfig, - mock_aml_services_2022_12_01_preview: Mock, + mock_aml_services_2023_02_01_preview: Mock, mock_aml_services_run_history: Mock, mock_machinelearning_client: Mock, mock_code_operation: Mock, @@ -119,7 +119,7 @@ def mock_job_operation( yield JobOperations( operation_scope=mock_workspace_scope, operation_config=mock_operation_config, - service_client_12_2022_preview=mock_aml_services_2022_12_01_preview, + service_client_02_2023_preview=mock_aml_services_2023_02_01_preview, service_client_run_history=mock_aml_services_run_history, all_operations=mock_machinelearning_client._operation_container, credential=Mock(spec_set=DefaultAzureCredential), @@ -133,26 +133,26 @@ class TestJobOperations: def test_list(self, mock_job_operation: JobOperations) -> None: mock_job_operation.list() expected = (mock_job_operation._resource_group_name, mock_job_operation._workspace_name) - assert expected in mock_job_operation._operation_2022_12_preview.list.call_args + assert expected in mock_job_operation._operation_2023_02_preview.list.call_args @patch.dict(os.environ, {AZUREML_PRIVATE_FEATURES_ENV_VAR: "True"}) def test_list_private_preview(self, mock_job_operation: JobOperations) -> None: mock_job_operation.list() expected = (mock_job_operation._resource_group_name, mock_job_operation._workspace_name) - assert expected in mock_job_operation._operation_2022_12_preview.list.call_args + assert expected in mock_job_operation._operation_2023_02_preview.list.call_args @patch.object(Job, "_from_rest_object") def test_get(self, mock_method, mock_job_operation: JobOperations) -> None: mock_method.return_value = Command(component=None) mock_job_operation.get("randon_name") - mock_job_operation._operation_2022_12_preview.get.assert_called_once() + mock_job_operation._operation_2023_02_preview.get.assert_called_once() @patch.object(Job, "_from_rest_object") @patch.dict(os.environ, {AZUREML_PRIVATE_FEATURES_ENV_VAR: "True"}) def test_get_private_preview_flag_returns_latest(self, mock_method, mock_job_operation: JobOperations) -> None: mock_method.return_value = Command(component=None) mock_job_operation.get("random_name") - mock_job_operation._operation_2022_12_preview.get.assert_called_once() + mock_job_operation._operation_2023_02_preview.get.assert_called_once() def test_stream_command_job(self, mock_job_operation: JobOperations) -> None: # setup @@ -163,7 +163,7 @@ def test_stream_command_job(self, mock_job_operation: JobOperations) -> None: mock_job_operation.stream("random_name") # check - mock_job_operation._operation_2022_12_preview.get.assert_called_once() + mock_job_operation._operation_2023_02_preview.get.assert_called_once() mock_job_operation._get_workspace_url.assert_called_once() mock_job_operation._stream_logs_until_completion.assert_called_once() assert mock_job_operation._runs_operations_client._operation._client._base_url == "TheWorkSpaceUrl" @@ -176,7 +176,7 @@ def test_submit_command_job(self, mock_method, mock_job_operation: JobOperations mock_job_operation.create_or_update(job=job) git_props = get_git_properties() assert git_props.items() <= job.properties.items() - mock_job_operation._operation_2022_12_preview.create_or_update.assert_called_once() + mock_job_operation._operation_2023_02_preview.create_or_update.assert_called_once() mock_job_operation._credential.get_token.assert_called_once_with("https://ml.azure.com/.default") @patch.object(Job, "_from_rest_object") @@ -192,7 +192,7 @@ def test_user_identity_get_aml_token(self, mock_method, mock_job_operation: JobO token=jwt.encode({"aud": aml_resource_id}, key="utf-8"), expires_on=1234 ) mock_job_operation.create_or_update(job=job) - mock_job_operation._operation_2022_12_preview.create_or_update.assert_called_once() + mock_job_operation._operation_2023_02_preview.create_or_update.assert_called_once() mock_job_operation._credential.get_token.assert_called_once_with(azure_ml_scopes[0]) with patch.object(mock_job_operation._credential, "get_token") as mock_get_token: @@ -217,15 +217,15 @@ def test_command_job_resolver_with_virtual_cluster(self, mock_job_operation: Job def test_archive(self, mock_method, mock_job_operation: JobOperations) -> None: mock_method.return_value = Command(component=None) mock_job_operation.archive(name="random_name") - mock_job_operation._operation_2022_12_preview.get.assert_called_once() - mock_job_operation._operation_2022_12_preview.create_or_update.assert_called_once() + mock_job_operation._operation_2023_02_preview.get.assert_called_once() + mock_job_operation._operation_2023_02_preview.create_or_update.assert_called_once() @patch.object(Job, "_from_rest_object") def test_restore(self, mock_method, mock_job_operation: JobOperations) -> None: mock_method.return_value = Command(component=None) mock_job_operation.restore(name="random_name") - mock_job_operation._operation_2022_12_preview.get.assert_called_once() - mock_job_operation._operation_2022_12_preview.create_or_update.assert_called_once() + mock_job_operation._operation_2023_02_preview.get.assert_called_once() + mock_job_operation._operation_2023_02_preview.create_or_update.assert_called_once() @pytest.mark.parametrize( "corrupt_job_data", diff --git a/sdk/ml/azure-ai-ml/tests/pipeline_job/unittests/test_pipeline_job_entity.py b/sdk/ml/azure-ai-ml/tests/pipeline_job/unittests/test_pipeline_job_entity.py index 8d19ab53d42e..868024eec4b2 100644 --- a/sdk/ml/azure-ai-ml/tests/pipeline_job/unittests/test_pipeline_job_entity.py +++ b/sdk/ml/azure-ai-ml/tests/pipeline_job/unittests/test_pipeline_job_entity.py @@ -9,7 +9,7 @@ from test_utilities.utils import omit_with_wildcard, verify_entity_load_and_dump from azure.ai.ml import MLClient, dsl, load_component, load_job -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobBase as RestJob +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobBase as RestJob from azure.ai.ml._schema.automl import AutoMLRegressionSchema from azure.ai.ml._utils.utils import dump_yaml_to_file, load_yaml from azure.ai.ml.automl import classification diff --git a/sdk/ml/azure-ai-ml/tests/spark_job/unittests/test_spark_job_entity.py b/sdk/ml/azure-ai-ml/tests/spark_job/unittests/test_spark_job_entity.py index a53c91468f5a..ffc3e69a6a71 100644 --- a/sdk/ml/azure-ai-ml/tests/spark_job/unittests/test_spark_job_entity.py +++ b/sdk/ml/azure-ai-ml/tests/spark_job/unittests/test_spark_job_entity.py @@ -1,9 +1,9 @@ import pytest from azure.ai.ml import Input, Output -from azure.ai.ml._restclient.v2022_12_01_preview.models import AmlToken, JobBase -from azure.ai.ml._restclient.v2022_12_01_preview.models import SparkJob as RestSparkJob -from azure.ai.ml._restclient.v2022_12_01_preview.models import SparkJobPythonEntry +from azure.ai.ml._restclient.v2023_02_01_preview.models import AmlToken, JobBase +from azure.ai.ml._restclient.v2023_02_01_preview.models import SparkJob as RestSparkJob +from azure.ai.ml._restclient.v2023_02_01_preview.models import SparkJobPythonEntry from azure.ai.ml.entities import SparkJob from azure.ai.ml.entities._builders.spark_func import spark from azure.ai.ml.entities._job.job_name_generator import generate_job_name diff --git a/sdk/ml/azure-ai-ml/tests/sweep_job/unittests/test_sweep_job_schema.py b/sdk/ml/azure-ai-ml/tests/sweep_job/unittests/test_sweep_job_schema.py index 6dd9c739f939..57d3830f8b73 100644 --- a/sdk/ml/azure-ai-ml/tests/sweep_job/unittests/test_sweep_job_schema.py +++ b/sdk/ml/azure-ai-ml/tests/sweep_job/unittests/test_sweep_job_schema.py @@ -6,12 +6,12 @@ import yaml from azure.ai.ml import load_job -from azure.ai.ml._restclient.v2022_12_01_preview.models import AmlToken as RestAmlToken -from azure.ai.ml._restclient.v2022_12_01_preview.models import InputDeliveryMode, JobInputType, JobOutputType -from azure.ai.ml._restclient.v2022_12_01_preview.models import ManagedIdentity as RestManagedIdentity -from azure.ai.ml._restclient.v2022_12_01_preview.models import OutputDeliveryMode -from azure.ai.ml._restclient.v2022_12_01_preview.models import UriFolderJobOutput as RestUriFolderJobOutput -from azure.ai.ml._restclient.v2022_12_01_preview.models import UserIdentity as RestUserIdentity +from azure.ai.ml._restclient.v2023_02_01_preview.models import AmlToken as RestAmlToken +from azure.ai.ml._restclient.v2023_02_01_preview.models import InputDeliveryMode, JobInputType, JobOutputType +from azure.ai.ml._restclient.v2023_02_01_preview.models import ManagedIdentity as RestManagedIdentity +from azure.ai.ml._restclient.v2023_02_01_preview.models import OutputDeliveryMode +from azure.ai.ml._restclient.v2023_02_01_preview.models import UriFolderJobOutput as RestUriFolderJobOutput +from azure.ai.ml._restclient.v2023_02_01_preview.models import UserIdentity as RestUserIdentity from azure.ai.ml._schema import SweepJobSchema from azure.ai.ml.constants._common import BASE_PATH_CONTEXT_KEY, AssetTypes, InputOutputModes from azure.ai.ml.entities import ( From b2a33da4cc1adea86dc1e6bea0a37b680ffeb229 Mon Sep 17 00:00:00 2001 From: TonyJ1 <41344586+TonyJ1@users.noreply.github.com> Date: Thu, 16 Feb 2023 10:43:00 -0800 Subject: [PATCH 02/13] Fix ml_client --- sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py index 178e4829c652..e3c21fa696f3 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py @@ -38,7 +38,7 @@ # from azure.ai.ml._telemetry.logging_handler import get_appinsights_log_handler from azure.ai.ml._user_agent import USER_AGENT -from azure.ai.ml._utils._experimefrom azure.ai.ml._restclient.v2023_02_01_preview importntal import experimental +from azure.ai.ml._utils._experimental import experimental from azure.ai.ml._utils._http_utils import HttpPipeline from azure.ai.ml._utils._registry_utils import RegistryDiscovery from azure.ai.ml._utils.utils import _is_https_url From e113d69691013571b695b3b618c061df95e02788 Mon Sep 17 00:00:00 2001 From: TonyJ1 <41344586+TonyJ1@users.noreply.github.com> Date: Thu, 16 Feb 2023 15:26:19 -0800 Subject: [PATCH 03/13] Hardcode MFE url to master for testing the gates --- sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py index e3c21fa696f3..c90f5ec6eaf6 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py @@ -284,7 +284,10 @@ def __init__( self._service_client_02_2023_preview = ServiceClient022023Preview( credential=self._credential, subscription_id=self._operation_scope._subscription_id, - base_url=base_url, + # base_url=base_url, + # TODO: Below hardcode is just for testing the gates + # TODO: REMOVE before the merge + base_url="https://master.api.azureml-test.ms/mferp/managementfrontend", **kwargs, ) From e5f8d45f19f8a1aa1a6b15b570bad8074457a474 Mon Sep 17 00:00:00 2001 From: TonyJ1 <41344586+TonyJ1@users.noreply.github.com> Date: Fri, 24 Feb 2023 17:43:26 -0800 Subject: [PATCH 04/13] TEMP change to sanitize MFE url --- sdk/ml/azure-ai-ml/tests/conftest.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sdk/ml/azure-ai-ml/tests/conftest.py b/sdk/ml/azure-ai-ml/tests/conftest.py index ea0593bb4f15..c540293686fa 100644 --- a/sdk/ml/azure-ai-ml/tests/conftest.py +++ b/sdk/ml/azure-ai-ml/tests/conftest.py @@ -22,6 +22,7 @@ add_general_regex_sanitizer, add_general_string_sanitizer, add_remove_header_sanitizer, + add_uri_string_sanitizer, is_live, set_bodiless_matcher, set_custom_default_matcher, @@ -98,6 +99,9 @@ def add_sanitizers(test_proxy, fake_datastore_key): regex='\\/az-ml-artifacts\\/([^/\\s"]{36})\\/', group_for_replace="1", ) + add_uri_string_sanitizer( + target="https://master.api.azureml-test.ms/mferp/managementfrontend/", value="https://management.azure.com/" + ) identity_json_paths = [ ".systemData.createdBy", From 6f0d4033a02e2aa0f055130a4a8aed58c8861069 Mon Sep 17 00:00:00 2001 From: Tony Ponwin Jeparatnam <41344586+TonyJ1@users.noreply.github.com> Date: Thu, 2 Mar 2023 00:54:09 -0800 Subject: [PATCH 05/13] Automl --- .../ai/ml/_schema/automl/automl_vertical.py | 2 +- .../_schema/automl/featurization_settings.py | 2 +- .../ml/_schema/automl/forecasting_settings.py | 6 ++-- .../image_vertical/image_classification.py | 2 +- .../image_model_distribution_settings.py | 2 +- .../image_vertical/image_model_settings.py | 2 +- .../image_vertical/image_object_detection.py | 2 +- .../nlp_vertical/nlp_fixed_parameters.py | 2 +- .../nlp_vertical/nlp_parameter_subspace.py | 2 +- .../nlp_vertical/text_classification.py | 2 +- .../text_classification_multilabel.py | 2 +- .../_schema/automl/nlp_vertical/text_ner.py | 2 +- .../automl/table_vertical/classification.py | 2 +- .../automl/table_vertical/forecasting.py | 2 +- .../automl/table_vertical/regression.py | 2 +- .../automl/table_vertical/table_vertical.py | 2 +- .../ai/ml/_schema/automl/training_settings.py | 2 +- .../azure/ai/ml/automl/_automl_image.py | 2 +- .../ai/ml/entities/_job/automl/automl_job.py | 2 +- .../_job/automl/image/automl_image.py | 2 +- .../image/automl_image_classification_base.py | 2 +- .../automl_image_object_detection_base.py | 2 +- .../automl/image/image_classification_job.py | 8 ++--- .../image_classification_multilabel_job.py | 8 ++--- .../image_classification_search_space.py | 2 +- .../image/image_instance_segmentation_job.py | 6 ++-- .../_job/automl/image/image_limit_settings.py | 2 +- .../_job/automl/image/image_model_settings.py | 6 ++-- .../image/image_object_detection_job.py | 6 ++-- .../image_object_detection_search_space.py | 2 +- .../_job/automl/image/image_sweep_settings.py | 4 +-- .../_job/automl/nlp/automl_nlp_job.py | 2 +- .../automl/nlp/nlp_featurization_settings.py | 2 +- .../_job/automl/nlp/nlp_fixed_parameters.py | 2 +- .../_job/automl/nlp/nlp_limit_settings.py | 2 +- .../_job/automl/nlp/nlp_search_space.py | 2 +- .../_job/automl/nlp/nlp_sweep_settings.py | 4 +-- .../automl/nlp/text_classification_job.py | 8 ++--- .../nlp/text_classification_multilabel_job.py | 6 ++-- .../entities/_job/automl/nlp/text_ner_job.py | 8 ++--- .../_job/automl/stack_ensemble_settings.py | 4 +-- .../_job/automl/tabular/automl_tabular.py | 2 +- .../_job/automl/tabular/classification_job.py | 6 ++-- .../automl/tabular/featurization_settings.py | 6 ++-- .../_job/automl/tabular/forecasting_job.py | 6 ++-- .../automl/tabular/forecasting_settings.py | 6 ++-- .../_job/automl/tabular/limit_settings.py | 2 +- .../_job/automl/tabular/regression_job.py | 8 ++--- .../entities/_job/automl/training_settings.py | 14 ++++---- .../_job/job_resource_configuration.py | 2 +- .../ai/ml/entities/_job/spark_job_entry.py | 2 +- .../_job/sweep/early_termination_policy.py | 10 +++--- .../ai/ml/entities/_job/sweep/sweep_job.py | 6 ++-- .../ml/entities/_workspace/compute_runtime.py | 2 +- .../ai/ml/entities/_workspace/diagnose.py | 10 +++--- .../_workspace/feature_store_settings.py | 2 +- .../ai/ml/entities/_workspace/networking.py | 2 +- .../ai/ml/entities/_workspace/workspace.py | 8 ++--- .../ml/entities/_workspace/workspace_keys.py | 2 +- .../ai/ml/operations/_workspace_operations.py | 4 +-- .../_workspace_outbound_rule_operations.py | 2 +- .../test_automl_image_classification.py | 2 +- ..._automl_image_classification_multilabel.py | 2 +- .../test_automl_image_object_detection.py | 2 +- .../unittests/test_automl_image_schema.py | 30 ++++++++-------- .../test_automl_image_sweep_setting.py | 12 +++---- .../unittests/test_automl_nlp_schema.py | 22 ++++++------ .../test_automl_nlp_sweep_settings.py | 12 +++---- .../unittests/test_automl_tabular_schema.py | 36 +++++++++---------- .../unittests/test_forecasting_settings.py | 6 ++-- .../test_tabular_featurization_settings.py | 4 +-- .../unittests/test_tabular_limit_settings.py | 2 +- ...est_tabular_n_cross_validation_settings.py | 2 +- .../unittests/test_text_classification_job.py | 8 ++--- .../command_job/e2etests/test_command_job.py | 2 +- .../unittests/test_pipeline_job_schema.py | 10 +++--- .../unittests/test_spark_job_schema.py | 2 +- .../unittests/test_workspace_operations.py | 2 +- 78 files changed, 195 insertions(+), 195 deletions(-) diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/automl_vertical.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/automl_vertical.py index 51908289ddb7..16e0966ee49a 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/automl_vertical.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/automl_vertical.py @@ -2,7 +2,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- -from azure.ai.ml._restclient.v2022_12_01_preview.models import LogVerbosity +from azure.ai.ml._restclient.v2023_02_01_preview.models import LogVerbosity from azure.ai.ml._schema.automl.automl_job import AutoMLJobSchema from azure.ai.ml._schema.core.fields import NestedField, StringTransformedEnum, UnionField from azure.ai.ml._schema.job.input_output_entry import MLTableInputSchema diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/featurization_settings.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/featurization_settings.py index f74f2cdd6d3b..c126b4773442 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/featurization_settings.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/featurization_settings.py @@ -7,7 +7,7 @@ from marshmallow import fields as flds from marshmallow import post_load -from azure.ai.ml._restclient.v2022_12_01_preview.models import BlockedTransformers +from azure.ai.ml._restclient.v2023_02_01_preview.models import BlockedTransformers from azure.ai.ml._schema.core.fields import NestedField, StringTransformedEnum, UnionField from azure.ai.ml._schema.core.schema import PatchedSchemaMeta from azure.ai.ml._utils.utils import camel_to_snake diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/forecasting_settings.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/forecasting_settings.py index 804907ba597b..0a70a4f3a379 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/forecasting_settings.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/forecasting_settings.py @@ -6,8 +6,8 @@ from marshmallow import fields, post_load -from azure.ai.ml._restclient.v2022_12_01_preview.models import FeatureLags as FeatureLagsMode -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import FeatureLags as FeatureLagsMode +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( ForecastHorizonMode, SeasonalityMode, ShortSeriesHandlingConfiguration, @@ -15,7 +15,7 @@ TargetLagsMode, TargetRollingWindowSizeMode, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models import UseStl as STLMode +from azure.ai.ml._restclient.v2023_02_01_preview.models import UseStl as STLMode from azure.ai.ml._schema.core.fields import StringTransformedEnum, UnionField from azure.ai.ml._schema.core.schema import PatchedSchemaMeta diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/image_vertical/image_classification.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/image_vertical/image_classification.py index c5357e447fc1..67b373e8d0f3 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/image_vertical/image_classification.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/image_vertical/image_classification.py @@ -8,7 +8,7 @@ from marshmallow import fields, post_load -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( ClassificationMultilabelPrimaryMetrics, ClassificationPrimaryMetrics, TaskType, diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/image_vertical/image_model_distribution_settings.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/image_vertical/image_model_distribution_settings.py index fc05b1991eba..59538920826f 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/image_vertical/image_model_distribution_settings.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/image_vertical/image_model_distribution_settings.py @@ -6,7 +6,7 @@ from marshmallow import fields, post_dump, post_load, pre_load -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( LearningRateScheduler, ModelSize, StochasticOptimizer, diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/image_vertical/image_model_settings.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/image_vertical/image_model_settings.py index d00b4d8073dd..0091fc227bb3 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/image_vertical/image_model_settings.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/image_vertical/image_model_settings.py @@ -6,7 +6,7 @@ from marshmallow import fields, post_load -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( LearningRateScheduler, ModelSize, StochasticOptimizer, diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/image_vertical/image_object_detection.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/image_vertical/image_object_detection.py index a555197ffa22..2f25a6509fe9 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/image_vertical/image_object_detection.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/image_vertical/image_object_detection.py @@ -8,7 +8,7 @@ from marshmallow import fields, post_load -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( InstanceSegmentationPrimaryMetrics, ObjectDetectionPrimaryMetrics, TaskType, diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/nlp_vertical/nlp_fixed_parameters.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/nlp_vertical/nlp_fixed_parameters.py index 327dfae36c01..050528be93d9 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/nlp_vertical/nlp_fixed_parameters.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/nlp_vertical/nlp_fixed_parameters.py @@ -6,7 +6,7 @@ from marshmallow import fields, post_load -from azure.ai.ml._restclient.v2022_12_01_preview.models import NlpLearningRateScheduler +from azure.ai.ml._restclient.v2023_02_01_preview.models import NlpLearningRateScheduler from azure.ai.ml._schema.core.fields import StringTransformedEnum from azure.ai.ml._schema.core.schema import PatchedSchemaMeta from azure.ai.ml._utils.utils import camel_to_snake, snake_to_kebab diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/nlp_vertical/nlp_parameter_subspace.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/nlp_vertical/nlp_parameter_subspace.py index 3e78e9d1645f..7212d371b80b 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/nlp_vertical/nlp_parameter_subspace.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/nlp_vertical/nlp_parameter_subspace.py @@ -6,7 +6,7 @@ from marshmallow import fields, post_dump, post_load, pre_load -from azure.ai.ml._restclient.v2022_12_01_preview.models import NlpLearningRateScheduler +from azure.ai.ml._restclient.v2023_02_01_preview.models import NlpLearningRateScheduler from azure.ai.ml._schema._sweep.search_space import ( ChoiceSchema, NormalSchema, diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/nlp_vertical/text_classification.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/nlp_vertical/text_classification.py index 1d65bc22431b..b8842672683e 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/nlp_vertical/text_classification.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/nlp_vertical/text_classification.py @@ -8,7 +8,7 @@ from marshmallow import post_load -from azure.ai.ml._restclient.v2022_12_01_preview.models import ClassificationPrimaryMetrics, TaskType +from azure.ai.ml._restclient.v2023_02_01_preview.models import ClassificationPrimaryMetrics, TaskType from azure.ai.ml._schema.automl.nlp_vertical.nlp_vertical import NlpVerticalSchema from azure.ai.ml._schema.core.fields import StringTransformedEnum, fields from azure.ai.ml._utils.utils import camel_to_snake diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/nlp_vertical/text_classification_multilabel.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/nlp_vertical/text_classification_multilabel.py index 8a016cc0b749..2d539c2672dc 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/nlp_vertical/text_classification_multilabel.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/nlp_vertical/text_classification_multilabel.py @@ -8,7 +8,7 @@ from marshmallow import post_load -from azure.ai.ml._restclient.v2022_12_01_preview.models import ClassificationMultilabelPrimaryMetrics, TaskType +from azure.ai.ml._restclient.v2023_02_01_preview.models import ClassificationMultilabelPrimaryMetrics, TaskType from azure.ai.ml._schema.automl.nlp_vertical.nlp_vertical import NlpVerticalSchema from azure.ai.ml._schema.core.fields import StringTransformedEnum, fields from azure.ai.ml._utils.utils import camel_to_snake diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/nlp_vertical/text_ner.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/nlp_vertical/text_ner.py index 521ab364d4fa..14b5480fecb6 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/nlp_vertical/text_ner.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/nlp_vertical/text_ner.py @@ -8,7 +8,7 @@ from marshmallow import post_load -from azure.ai.ml._restclient.v2022_12_01_preview.models import ClassificationPrimaryMetrics, TaskType +from azure.ai.ml._restclient.v2023_02_01_preview.models import ClassificationPrimaryMetrics, TaskType from azure.ai.ml._schema.automl.nlp_vertical.nlp_vertical import NlpVerticalSchema from azure.ai.ml._schema.core.fields import StringTransformedEnum, fields from azure.ai.ml._utils.utils import camel_to_snake diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/table_vertical/classification.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/table_vertical/classification.py index 75567f7044c4..88fa1ababd2f 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/table_vertical/classification.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/table_vertical/classification.py @@ -8,7 +8,7 @@ from marshmallow import fields, post_load -from azure.ai.ml._restclient.v2022_12_01_preview.models import ClassificationPrimaryMetrics, TaskType +from azure.ai.ml._restclient.v2023_02_01_preview.models import ClassificationPrimaryMetrics, TaskType from azure.ai.ml._schema.automl.table_vertical.table_vertical import AutoMLTableVerticalSchema from azure.ai.ml._schema.automl.training_settings import ClassificationTrainingSettingsSchema from azure.ai.ml._schema.core.fields import NestedField, StringTransformedEnum diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/table_vertical/forecasting.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/table_vertical/forecasting.py index e1990936d5b3..e974e61399cf 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/table_vertical/forecasting.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/table_vertical/forecasting.py @@ -8,7 +8,7 @@ from marshmallow import post_load -from azure.ai.ml._restclient.v2022_12_01_preview.models import ForecastingPrimaryMetrics, TaskType +from azure.ai.ml._restclient.v2023_02_01_preview.models import ForecastingPrimaryMetrics, TaskType from azure.ai.ml._schema.automl.forecasting_settings import ForecastingSettingsSchema from azure.ai.ml._schema.automl.table_vertical.table_vertical import AutoMLTableVerticalSchema from azure.ai.ml._schema.automl.training_settings import ForecastingTrainingSettingsSchema diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/table_vertical/regression.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/table_vertical/regression.py index edda66e16499..d9695374ae5e 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/table_vertical/regression.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/table_vertical/regression.py @@ -8,7 +8,7 @@ from marshmallow import post_load -from azure.ai.ml._restclient.v2022_12_01_preview.models import RegressionPrimaryMetrics, TaskType +from azure.ai.ml._restclient.v2023_02_01_preview.models import RegressionPrimaryMetrics, TaskType from azure.ai.ml._schema.automl.table_vertical.table_vertical import AutoMLTableVerticalSchema from azure.ai.ml._schema.automl.training_settings import RegressionTrainingSettingsSchema from azure.ai.ml._schema.core.fields import NestedField, StringTransformedEnum diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/table_vertical/table_vertical.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/table_vertical/table_vertical.py index a5028f915ce6..46ff6ae137ee 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/table_vertical/table_vertical.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/table_vertical/table_vertical.py @@ -4,7 +4,7 @@ # pylint: disable=unused-argument,no-self-use -from azure.ai.ml._restclient.v2022_12_01_preview.models import NCrossValidationsMode +from azure.ai.ml._restclient.v2023_02_01_preview.models import NCrossValidationsMode from azure.ai.ml._schema.automl.automl_vertical import AutoMLVerticalSchema from azure.ai.ml._schema.automl.featurization_settings import TableFeaturizationSettingsSchema from azure.ai.ml._schema.automl.table_vertical.table_vertical_limit_settings import AutoMLTableLimitsSchema diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/training_settings.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/training_settings.py index f5e70bf4bd2c..2822a2e38b07 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/training_settings.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/training_settings.py @@ -6,7 +6,7 @@ from marshmallow import fields, post_load -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( ClassificationModels, ForecastingModels, RegressionModels, diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/automl/_automl_image.py b/sdk/ml/azure-ai-ml/azure/ai/ml/automl/_automl_image.py index 38d100b3092b..1ec7b9a2e62c 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/automl/_automl_image.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/automl/_automl_image.py @@ -6,7 +6,7 @@ from typing import Optional, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( ClassificationMultilabelPrimaryMetrics, ClassificationPrimaryMetrics, InstanceSegmentationPrimaryMetrics, diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/automl_job.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/automl_job.py index fa243d911a4d..30c8a9ec042d 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/automl_job.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/automl_job.py @@ -8,7 +8,7 @@ from abc import ABC, abstractmethod from typing import Any, Dict, Optional, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobBase, MLTableJobInput, ResourceConfiguration, TaskType +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobBase, MLTableJobInput, ResourceConfiguration, TaskType from azure.ai.ml._utils.utils import camel_to_snake from azure.ai.ml.constants import JobType from azure.ai.ml.constants._common import TYPE, AssetTypes diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/automl_image.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/automl_image.py index 59173f11deca..9be074c3aa87 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/automl_image.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/automl_image.py @@ -5,7 +5,7 @@ from abc import ABC from typing import Dict, Optional, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import LogVerbosity, SamplingAlgorithmType +from azure.ai.ml._restclient.v2023_02_01_preview.models import LogVerbosity, SamplingAlgorithmType from azure.ai.ml._utils.utils import camel_to_snake from azure.ai.ml.entities._inputs_outputs import Input from azure.ai.ml.entities._job.automl.automl_vertical import AutoMLVertical diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/automl_image_classification_base.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/automl_image_classification_base.py index e985f0e5d42a..5de5de2052c7 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/automl_image_classification_base.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/automl_image_classification_base.py @@ -6,7 +6,7 @@ from typing import Dict, List, Optional, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import LearningRateScheduler, StochasticOptimizer +from azure.ai.ml._restclient.v2023_02_01_preview.models import LearningRateScheduler, StochasticOptimizer from azure.ai.ml._utils.utils import camel_to_snake from azure.ai.ml.entities._job.automl.image.automl_image import AutoMLImage from azure.ai.ml.entities._job.automl.image.image_classification_search_space import ImageClassificationSearchSpace diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/automl_image_object_detection_base.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/automl_image_object_detection_base.py index 1576225a653b..80fd48f401c0 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/automl_image_object_detection_base.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/automl_image_object_detection_base.py @@ -6,7 +6,7 @@ from typing import Dict, List, Optional, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( LearningRateScheduler, ModelSize, StochasticOptimizer, diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_classification_job.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_classification_job.py index 33cda476ef7c..d6c7e1be2368 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_classification_job.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_classification_job.py @@ -6,10 +6,10 @@ from typing import Dict, Optional, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import AutoMLJob as RestAutoMLJob -from azure.ai.ml._restclient.v2022_12_01_preview.models import ClassificationPrimaryMetrics -from azure.ai.ml._restclient.v2022_12_01_preview.models import ImageClassification as RestImageClassification -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobBase, TaskType +from azure.ai.ml._restclient.v2023_02_01_preview.models import AutoMLJob as RestAutoMLJob +from azure.ai.ml._restclient.v2023_02_01_preview.models import ClassificationPrimaryMetrics +from azure.ai.ml._restclient.v2023_02_01_preview.models import ImageClassification as RestImageClassification +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobBase, TaskType from azure.ai.ml._utils.utils import camel_to_snake, is_data_binding_expression from azure.ai.ml.constants._common import BASE_PATH_CONTEXT_KEY from azure.ai.ml.constants._job.automl import AutoMLConstants diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_classification_multilabel_job.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_classification_multilabel_job.py index 030a21ec03f1..31a7463217c2 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_classification_multilabel_job.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_classification_multilabel_job.py @@ -6,12 +6,12 @@ from typing import Dict, Optional, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import AutoMLJob as RestAutoMLJob -from azure.ai.ml._restclient.v2022_12_01_preview.models import ClassificationMultilabelPrimaryMetrics -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import AutoMLJob as RestAutoMLJob +from azure.ai.ml._restclient.v2023_02_01_preview.models import ClassificationMultilabelPrimaryMetrics +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( ImageClassificationMultilabel as RestImageClassificationMultilabel, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobBase, TaskType +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobBase, TaskType from azure.ai.ml._utils.utils import camel_to_snake, is_data_binding_expression from azure.ai.ml.constants._common import BASE_PATH_CONTEXT_KEY from azure.ai.ml.constants._job.automl import AutoMLConstants diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_classification_search_space.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_classification_search_space.py index 6ba15406cd5b..85ff91254e21 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_classification_search_space.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_classification_search_space.py @@ -6,7 +6,7 @@ from typing import Optional, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import ImageModelDistributionSettingsClassification +from azure.ai.ml._restclient.v2023_02_01_preview.models import ImageModelDistributionSettingsClassification from azure.ai.ml.entities._job.automl.search_space import SearchSpace from azure.ai.ml.entities._job.automl.search_space_utils import _convert_from_rest_object, _convert_to_rest_object from azure.ai.ml.entities._job.sweep.search_space import SweepDistribution diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_instance_segmentation_job.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_instance_segmentation_job.py index 3313f92f5665..4f87d63bdd0b 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_instance_segmentation_job.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_instance_segmentation_job.py @@ -6,11 +6,11 @@ from typing import Dict, Optional, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import AutoMLJob as RestAutoMLJob -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import AutoMLJob as RestAutoMLJob +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( ImageInstanceSegmentation as RestImageInstanceSegmentation, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models import InstanceSegmentationPrimaryMetrics, JobBase, TaskType +from azure.ai.ml._restclient.v2023_02_01_preview.models import InstanceSegmentationPrimaryMetrics, JobBase, TaskType from azure.ai.ml._utils.utils import camel_to_snake, is_data_binding_expression from azure.ai.ml.constants._common import BASE_PATH_CONTEXT_KEY from azure.ai.ml.constants._job.automl import AutoMLConstants diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_limit_settings.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_limit_settings.py index 8be0ece67035..ba21aebf9ef1 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_limit_settings.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_limit_settings.py @@ -4,7 +4,7 @@ from typing import Optional -from azure.ai.ml._restclient.v2022_12_01_preview.models import ImageLimitSettings as RestImageLimitSettings +from azure.ai.ml._restclient.v2023_02_01_preview.models import ImageLimitSettings as RestImageLimitSettings from azure.ai.ml._utils.utils import from_iso_duration_format_mins, to_iso_duration_format_mins from azure.ai.ml.entities._mixins import RestTranslatableMixin diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_model_settings.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_model_settings.py index 6e053186cc15..f7c255976782 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_model_settings.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_model_settings.py @@ -5,13 +5,13 @@ from typing import Optional # pylint: disable=R0902,too-many-locals -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( ImageModelSettingsClassification as RestImageModelSettingsClassification, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( ImageModelSettingsObjectDetection as RestImageModelSettingsObjectDetection, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( LearningRateScheduler, ModelSize, StochasticOptimizer, diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_object_detection_job.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_object_detection_job.py index dec3d0e35525..150c2347a6a3 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_object_detection_job.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_object_detection_job.py @@ -6,9 +6,9 @@ from typing import Dict, Optional, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import AutoMLJob as RestAutoMLJob -from azure.ai.ml._restclient.v2022_12_01_preview.models import ImageObjectDetection as RestImageObjectDetection -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobBase, ObjectDetectionPrimaryMetrics, TaskType +from azure.ai.ml._restclient.v2023_02_01_preview.models import AutoMLJob as RestAutoMLJob +from azure.ai.ml._restclient.v2023_02_01_preview.models import ImageObjectDetection as RestImageObjectDetection +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobBase, ObjectDetectionPrimaryMetrics, TaskType from azure.ai.ml._utils.utils import camel_to_snake, is_data_binding_expression from azure.ai.ml.constants._common import BASE_PATH_CONTEXT_KEY from azure.ai.ml.constants._job.automl import AutoMLConstants diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_object_detection_search_space.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_object_detection_search_space.py index f6d3f401fea3..05586388252c 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_object_detection_search_space.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_object_detection_search_space.py @@ -7,7 +7,7 @@ from typing import Optional, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import ImageModelDistributionSettingsObjectDetection +from azure.ai.ml._restclient.v2023_02_01_preview.models import ImageModelDistributionSettingsObjectDetection from azure.ai.ml.entities import ( Choice, LogNormal, diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_sweep_settings.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_sweep_settings.py index fbf129adc12b..28ffb9a843ea 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_sweep_settings.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/image/image_sweep_settings.py @@ -6,8 +6,8 @@ from typing import Optional, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import ImageSweepSettings as RestImageSweepSettings -from azure.ai.ml._restclient.v2022_12_01_preview.models import SamplingAlgorithmType +from azure.ai.ml._restclient.v2023_02_01_preview.models import ImageSweepSettings as RestImageSweepSettings +from azure.ai.ml._restclient.v2023_02_01_preview.models import SamplingAlgorithmType from azure.ai.ml.entities._job.sweep.early_termination_policy import ( BanditPolicy, EarlyTerminationPolicy, diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/automl_nlp_job.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/automl_nlp_job.py index 4d28060e2edf..a1e440d93e0d 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/automl_nlp_job.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/automl_nlp_job.py @@ -4,7 +4,7 @@ from abc import ABC from typing import Dict, List, Optional, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( LogVerbosity, NlpLearningRateScheduler, SamplingAlgorithmType, diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/nlp_featurization_settings.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/nlp_featurization_settings.py index 6c956987288f..55305b991ba7 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/nlp_featurization_settings.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/nlp_featurization_settings.py @@ -2,7 +2,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( NlpVerticalFeaturizationSettings as RestNlpVerticalFeaturizationSettings, ) from azure.ai.ml.entities._job.automl.featurization_settings import FeaturizationSettings, FeaturizationSettingsType diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/nlp_fixed_parameters.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/nlp_fixed_parameters.py index 5b5631f7cbd0..34b740023224 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/nlp_fixed_parameters.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/nlp_fixed_parameters.py @@ -3,7 +3,7 @@ # --------------------------------------------------------- from typing import Optional -from azure.ai.ml._restclient.v2022_12_01_preview.models import NlpFixedParameters as RestNlpFixedParameters +from azure.ai.ml._restclient.v2023_02_01_preview.models import NlpFixedParameters as RestNlpFixedParameters from azure.ai.ml.entities._mixins import RestTranslatableMixin diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/nlp_limit_settings.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/nlp_limit_settings.py index 47cb8d27d443..a47bc62d50f1 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/nlp_limit_settings.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/nlp_limit_settings.py @@ -4,7 +4,7 @@ from typing import Optional -from azure.ai.ml._restclient.v2022_12_01_preview.models import NlpVerticalLimitSettings as RestNlpLimitSettings +from azure.ai.ml._restclient.v2023_02_01_preview.models import NlpVerticalLimitSettings as RestNlpLimitSettings from azure.ai.ml._utils.utils import from_iso_duration_format_mins, to_iso_duration_format_mins from azure.ai.ml.entities._mixins import RestTranslatableMixin diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/nlp_search_space.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/nlp_search_space.py index 3ee2abb5297f..c6334d0b72b2 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/nlp_search_space.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/nlp_search_space.py @@ -4,7 +4,7 @@ from typing import Optional, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import NlpLearningRateScheduler, NlpParameterSubspace +from azure.ai.ml._restclient.v2023_02_01_preview.models import NlpLearningRateScheduler, NlpParameterSubspace from azure.ai.ml._utils.utils import camel_to_snake from azure.ai.ml.constants import NlpModels from azure.ai.ml.entities._job.automl.search_space import SearchSpace diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/nlp_sweep_settings.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/nlp_sweep_settings.py index 4b3344b67667..cdbd21199a1d 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/nlp_sweep_settings.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/nlp_sweep_settings.py @@ -4,8 +4,8 @@ from typing import Optional, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import NlpSweepSettings as RestNlpSweepSettings -from azure.ai.ml._restclient.v2022_12_01_preview.models import SamplingAlgorithmType +from azure.ai.ml._restclient.v2023_02_01_preview.models import NlpSweepSettings as RestNlpSweepSettings +from azure.ai.ml._restclient.v2023_02_01_preview.models import SamplingAlgorithmType from azure.ai.ml.entities._job.sweep.early_termination_policy import EarlyTerminationPolicy from azure.ai.ml.entities._mixins import RestTranslatableMixin diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/text_classification_job.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/text_classification_job.py index 9655bd693781..d2d7941aebd5 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/text_classification_job.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/text_classification_job.py @@ -6,10 +6,10 @@ from typing import Dict, Optional, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import AutoMLJob as RestAutoMLJob -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobBase, TaskType -from azure.ai.ml._restclient.v2022_12_01_preview.models import TextClassification as RestTextClassification -from azure.ai.ml._restclient.v2022_12_01_preview.models._azure_machine_learning_workspaces_enums import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import AutoMLJob as RestAutoMLJob +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobBase, TaskType +from azure.ai.ml._restclient.v2023_02_01_preview.models import TextClassification as RestTextClassification +from azure.ai.ml._restclient.v2023_02_01_preview.models._azure_machine_learning_workspaces_enums import ( ClassificationPrimaryMetrics, ) from azure.ai.ml._utils.utils import camel_to_snake, is_data_binding_expression diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/text_classification_multilabel_job.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/text_classification_multilabel_job.py index 09893295ca76..226536d5e95e 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/text_classification_multilabel_job.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/text_classification_multilabel_job.py @@ -6,9 +6,9 @@ from typing import Dict, Optional, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import AutoMLJob as RestAutoMLJob -from azure.ai.ml._restclient.v2022_12_01_preview.models import ClassificationMultilabelPrimaryMetrics, JobBase, TaskType -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import AutoMLJob as RestAutoMLJob +from azure.ai.ml._restclient.v2023_02_01_preview.models import ClassificationMultilabelPrimaryMetrics, JobBase, TaskType +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( TextClassificationMultilabel as RestTextClassificationMultilabel, ) from azure.ai.ml._utils.utils import camel_to_snake, is_data_binding_expression diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/text_ner_job.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/text_ner_job.py index b2cac9e2983f..53ce6badc8fc 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/text_ner_job.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/nlp/text_ner_job.py @@ -6,10 +6,10 @@ from typing import Dict, Optional, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import AutoMLJob as RestAutoMLJob -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobBase, TaskType -from azure.ai.ml._restclient.v2022_12_01_preview.models import TextNer as RestTextNER -from azure.ai.ml._restclient.v2022_12_01_preview.models._azure_machine_learning_workspaces_enums import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import AutoMLJob as RestAutoMLJob +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobBase, TaskType +from azure.ai.ml._restclient.v2023_02_01_preview.models import TextNer as RestTextNER +from azure.ai.ml._restclient.v2023_02_01_preview.models._azure_machine_learning_workspaces_enums import ( ClassificationPrimaryMetrics, ) from azure.ai.ml._utils.utils import camel_to_snake, is_data_binding_expression diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/stack_ensemble_settings.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/stack_ensemble_settings.py index 251541115e5b..6f089a3a2932 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/stack_ensemble_settings.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/stack_ensemble_settings.py @@ -6,8 +6,8 @@ from typing import Any, Optional -from azure.ai.ml._restclient.v2022_12_01_preview.models import StackEnsembleSettings as RestStackEnsembleSettings -from azure.ai.ml._restclient.v2022_12_01_preview.models import StackMetaLearnerType +from azure.ai.ml._restclient.v2023_02_01_preview.models import StackEnsembleSettings as RestStackEnsembleSettings +from azure.ai.ml._restclient.v2023_02_01_preview.models import StackMetaLearnerType from azure.ai.ml.entities._mixins import RestTranslatableMixin diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/tabular/automl_tabular.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/tabular/automl_tabular.py index 82df204d4227..b30ee88eb75d 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/tabular/automl_tabular.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/tabular/automl_tabular.py @@ -7,7 +7,7 @@ from abc import ABC from typing import Dict, List, Optional, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( AutoNCrossValidations, BlockedTransformers, CustomNCrossValidations, diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/tabular/classification_job.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/tabular/classification_job.py index b08949085e11..9f5b77c02ac1 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/tabular/classification_job.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/tabular/classification_job.py @@ -6,9 +6,9 @@ from typing import Dict, Optional, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import AutoMLJob as RestAutoMLJob -from azure.ai.ml._restclient.v2022_12_01_preview.models import Classification as RestClassification -from azure.ai.ml._restclient.v2022_12_01_preview.models import ClassificationPrimaryMetrics, JobBase, TaskType +from azure.ai.ml._restclient.v2023_02_01_preview.models import AutoMLJob as RestAutoMLJob +from azure.ai.ml._restclient.v2023_02_01_preview.models import Classification as RestClassification +from azure.ai.ml._restclient.v2023_02_01_preview.models import ClassificationPrimaryMetrics, JobBase, TaskType from azure.ai.ml._utils.utils import camel_to_snake, is_data_binding_expression from azure.ai.ml.constants._common import BASE_PATH_CONTEXT_KEY from azure.ai.ml.constants._job.automl import AutoMLConstants diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/tabular/featurization_settings.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/tabular/featurization_settings.py index c314bbc88697..dd66fc70c644 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/tabular/featurization_settings.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/tabular/featurization_settings.py @@ -7,9 +7,9 @@ import logging from typing import Dict, List, Optional, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import BlockedTransformers -from azure.ai.ml._restclient.v2022_12_01_preview.models import ColumnTransformer as RestColumnTransformer -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import BlockedTransformers +from azure.ai.ml._restclient.v2023_02_01_preview.models import ColumnTransformer as RestColumnTransformer +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( TableVerticalFeaturizationSettings as RestTabularFeaturizationSettings, ) from azure.ai.ml._utils.utils import camel_to_snake diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/tabular/forecasting_job.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/tabular/forecasting_job.py index 640909e7a502..b92330a7569e 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/tabular/forecasting_job.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/tabular/forecasting_job.py @@ -6,9 +6,9 @@ from typing import Dict, List, Optional, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import AutoMLJob as RestAutoMLJob -from azure.ai.ml._restclient.v2022_12_01_preview.models import Forecasting as RestForecasting -from azure.ai.ml._restclient.v2022_12_01_preview.models import ForecastingPrimaryMetrics, JobBase, TaskType +from azure.ai.ml._restclient.v2023_02_01_preview.models import AutoMLJob as RestAutoMLJob +from azure.ai.ml._restclient.v2023_02_01_preview.models import Forecasting as RestForecasting +from azure.ai.ml._restclient.v2023_02_01_preview.models import ForecastingPrimaryMetrics, JobBase, TaskType from azure.ai.ml._utils.utils import camel_to_snake, is_data_binding_expression from azure.ai.ml.constants._common import BASE_PATH_CONTEXT_KEY from azure.ai.ml.constants._job.automl import AutoMLConstants diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/tabular/forecasting_settings.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/tabular/forecasting_settings.py index 42d74438301d..f2106af98936 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/tabular/forecasting_settings.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/tabular/forecasting_settings.py @@ -6,7 +6,7 @@ from typing import List, Optional, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( AutoForecastHorizon, AutoSeasonality, AutoTargetLags, @@ -17,8 +17,8 @@ CustomTargetRollingWindowSize, ForecastHorizonMode, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models import ForecastingSettings as RestForecastingSettings -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import ForecastingSettings as RestForecastingSettings +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( SeasonalityMode, TargetLagsMode, TargetRollingWindowSizeMode, diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/tabular/limit_settings.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/tabular/limit_settings.py index 95d36e0ab329..e7f07b0ba116 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/tabular/limit_settings.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/tabular/limit_settings.py @@ -4,7 +4,7 @@ from typing import Optional -from azure.ai.ml._restclient.v2022_12_01_preview.models import TableVerticalLimitSettings as RestTabularLimitSettings +from azure.ai.ml._restclient.v2023_02_01_preview.models import TableVerticalLimitSettings as RestTabularLimitSettings from azure.ai.ml._utils.utils import from_iso_duration_format_mins, to_iso_duration_format_mins from azure.ai.ml.entities._mixins import RestTranslatableMixin diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/tabular/regression_job.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/tabular/regression_job.py index 611c43e8a094..457e47418b53 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/tabular/regression_job.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/tabular/regression_job.py @@ -6,10 +6,10 @@ from typing import Dict, Optional, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import AutoMLJob as RestAutoMLJob -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobBase -from azure.ai.ml._restclient.v2022_12_01_preview.models import Regression as RestRegression -from azure.ai.ml._restclient.v2022_12_01_preview.models import RegressionPrimaryMetrics, TaskType +from azure.ai.ml._restclient.v2023_02_01_preview.models import AutoMLJob as RestAutoMLJob +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobBase +from azure.ai.ml._restclient.v2023_02_01_preview.models import Regression as RestRegression +from azure.ai.ml._restclient.v2023_02_01_preview.models import RegressionPrimaryMetrics, TaskType from azure.ai.ml._utils.utils import camel_to_snake, is_data_binding_expression from azure.ai.ml.constants._common import BASE_PATH_CONTEXT_KEY from azure.ai.ml.constants._job.automl import AutoMLConstants diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/training_settings.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/training_settings.py index 31f2358a2e02..903efe708430 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/training_settings.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/automl/training_settings.py @@ -6,19 +6,19 @@ from typing import List, Optional, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import ClassificationModels -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import ClassificationModels +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( ClassificationTrainingSettings as RestClassificationTrainingSettings, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models import ForecastingModels -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import ForecastingModels +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( ForecastingTrainingSettings as RestForecastingTrainingSettings, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models import RegressionModels -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import RegressionModels +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( RegressionTrainingSettings as RestRegressionTrainingSettings, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models import TrainingSettings as RestTrainingSettings +from azure.ai.ml._restclient.v2023_02_01_preview.models import TrainingSettings as RestTrainingSettings from azure.ai.ml._utils.utils import camel_to_snake, from_iso_duration_format_mins, to_iso_duration_format_mins from azure.ai.ml.entities._job.automl.stack_ensemble_settings import StackEnsembleSettings from azure.ai.ml.entities._mixins import RestTranslatableMixin diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/job_resource_configuration.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/job_resource_configuration.py index ac1674051558..5b64e6fa8fe9 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/job_resource_configuration.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/job_resource_configuration.py @@ -6,7 +6,7 @@ import logging from typing import Any, Dict, Optional -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobResourceConfiguration as RestJobResourceConfiguration +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobResourceConfiguration as RestJobResourceConfiguration from azure.ai.ml.constants._job.job import JobComputePropertyFields from azure.ai.ml.entities._mixins import DictMixin, RestTranslatableMixin from azure.ai.ml.entities._util import convert_ordered_dict_to_dict diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/spark_job_entry.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/spark_job_entry.py index c1c8cd821a31..a1c9f6820e93 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/spark_job_entry.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/spark_job_entry.py @@ -5,7 +5,7 @@ from typing import Optional, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import SparkJobPythonEntry, SparkJobScalaEntry +from azure.ai.ml._restclient.v2023_02_01_preview.models import SparkJobPythonEntry, SparkJobScalaEntry from azure.ai.ml.entities._mixins import RestTranslatableMixin diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/sweep/early_termination_policy.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/sweep/early_termination_policy.py index ff2675076403..69a09b553eac 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/sweep/early_termination_policy.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/sweep/early_termination_policy.py @@ -3,11 +3,11 @@ # --------------------------------------------------------- from abc import ABC -from azure.ai.ml._restclient.v2022_12_01_preview.models import BanditPolicy as RestBanditPolicy -from azure.ai.ml._restclient.v2022_12_01_preview.models import EarlyTerminationPolicy as RestEarlyTerminationPolicy -from azure.ai.ml._restclient.v2022_12_01_preview.models import EarlyTerminationPolicyType -from azure.ai.ml._restclient.v2022_12_01_preview.models import MedianStoppingPolicy as RestMedianStoppingPolicy -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import BanditPolicy as RestBanditPolicy +from azure.ai.ml._restclient.v2023_02_01_preview.models import EarlyTerminationPolicy as RestEarlyTerminationPolicy +from azure.ai.ml._restclient.v2023_02_01_preview.models import EarlyTerminationPolicyType +from azure.ai.ml._restclient.v2023_02_01_preview.models import MedianStoppingPolicy as RestMedianStoppingPolicy +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( TruncationSelectionPolicy as RestTruncationSelectionPolicy, ) from azure.ai.ml._utils.utils import camel_to_snake diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/sweep/sweep_job.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/sweep/sweep_job.py index 40683154569d..eb49f8463cf2 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/sweep/sweep_job.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/sweep/sweep_job.py @@ -7,9 +7,9 @@ import logging from typing import Any, Dict, Optional, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobBase -from azure.ai.ml._restclient.v2022_12_01_preview.models import SweepJob as RestSweepJob -from azure.ai.ml._restclient.v2022_12_01_preview.models import TrialComponent +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobBase +from azure.ai.ml._restclient.v2023_02_01_preview.models import SweepJob as RestSweepJob +from azure.ai.ml._restclient.v2023_02_01_preview.models import TrialComponent from azure.ai.ml._schema._sweep.sweep_job import SweepJobSchema from azure.ai.ml._utils.utils import map_single_brackets_and_warn from azure.ai.ml.constants import JobType diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/compute_runtime.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/compute_runtime.py index 536ab69dcb81..00f7d42b09a1 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/compute_runtime.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/compute_runtime.py @@ -4,7 +4,7 @@ from typing import Optional -from azure.ai.ml._restclient.v2022_12_01_preview.models import ComputeRuntimeDto as RestComputeRuntimeDto +from azure.ai.ml._restclient.v2023_02_01_preview.models import ComputeRuntimeDto as RestComputeRuntimeDto from azure.ai.ml.entities._mixins import RestTranslatableMixin from azure.ai.ml._utils._experimental import experimental diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/diagnose.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/diagnose.py index 62b7ab597bc7..109162083b9a 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/diagnose.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/diagnose.py @@ -3,15 +3,15 @@ # --------------------------------------------------------- from typing import Any, Dict, List, Optional -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( DiagnoseRequestProperties as RestDiagnoseRequestProperties, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models import DiagnoseResponseResult as RestDiagnoseResponseResult -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import DiagnoseResponseResult as RestDiagnoseResponseResult +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( DiagnoseResponseResultValue as RestDiagnoseResponseResultValue, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models import DiagnoseResult as RestDiagnoseResult -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import DiagnoseResult as RestDiagnoseResult +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( DiagnoseWorkspaceParameters as RestDiagnoseWorkspaceParameters, ) diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/feature_store_settings.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/feature_store_settings.py index 6d2011c9ec84..7ff76147d90b 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/feature_store_settings.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/feature_store_settings.py @@ -6,7 +6,7 @@ from typing import Optional, Any -from azure.ai.ml._restclient.v2022_12_01_preview.models import FeatureStoreSettings as RestFeatureStoreSettings +from azure.ai.ml._restclient.v2023_02_01_preview.models import FeatureStoreSettings as RestFeatureStoreSettings from azure.ai.ml.entities._mixins import RestTranslatableMixin from azure.ai.ml._utils._experimental import experimental from .compute_runtime import ComputeRuntime diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/networking.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/networking.py index f0750ffe9b57..3c3f9371ddb6 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/networking.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/networking.py @@ -4,7 +4,7 @@ from typing import Any, Dict, Optional -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( ManagedNetworkSettings as RestManagedNetwork, FqdnOutboundRule as RestFqdnOutboundRule, PrivateEndpointOutboundRule as RestPrivateEndpointOutboundRule, diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/workspace.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/workspace.py index deafab9d5643..dcbafe276f6b 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/workspace.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/workspace.py @@ -8,10 +8,10 @@ from pathlib import Path from typing import IO, AnyStr, Dict, Optional, Union -from azure.ai.ml._restclient.v2022_12_01_preview.models import ManagedServiceIdentity as RestManagedServiceIdentity -from azure.ai.ml._restclient.v2022_12_01_preview.models import FeatureStoreSettings as RestFeatureStoreSettings -from azure.ai.ml._restclient.v2022_12_01_preview.models import Workspace as RestWorkspace -from azure.ai.ml._restclient.v2022_12_01_preview.models import ManagedNetworkSettings as RestManagedNetwork +from azure.ai.ml._restclient.v2023_02_01_preview.models import ManagedServiceIdentity as RestManagedServiceIdentity +from azure.ai.ml._restclient.v2023_02_01_preview.models import FeatureStoreSettings as RestFeatureStoreSettings +from azure.ai.ml._restclient.v2023_02_01_preview.models import Workspace as RestWorkspace +from azure.ai.ml._restclient.v2023_02_01_preview.models import ManagedNetworkSettings as RestManagedNetwork from azure.ai.ml._schema.workspace.workspace import WorkspaceSchema from azure.ai.ml._utils.utils import dump_yaml_to_file from azure.ai.ml.constants._common import BASE_PATH_CONTEXT_KEY, PARAMS_OVERRIDE_KEY, WorkspaceResourceConstants diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/workspace_keys.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/workspace_keys.py index 3cf298c7c00e..7f9d5231fc36 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/workspace_keys.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/workspace_keys.py @@ -4,7 +4,7 @@ from typing import List, Optional -from azure.ai.ml._restclient.v2022_12_01_preview.models import ListWorkspaceKeysResult +from azure.ai.ml._restclient.v2023_02_01_preview.models import ListWorkspaceKeysResult class ContainerRegistryCredential: diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_workspace_operations.py b/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_workspace_operations.py index 18b98ed96cd9..7a2898626448 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_workspace_operations.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_workspace_operations.py @@ -9,8 +9,8 @@ from azure.ai.ml._arm_deployments import ArmDeploymentExecutor from azure.ai.ml._arm_deployments.arm_helper import get_template -from azure.ai.ml._restclient.v2022_12_01_preview import AzureMachineLearningWorkspaces as ServiceClient122022Preview -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview import AzureMachineLearningWorkspaces as ServiceClient122022Preview +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( EncryptionKeyVaultUpdateProperties, EncryptionUpdateProperties, WorkspaceUpdateParameters, diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_workspace_outbound_rule_operations.py b/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_workspace_outbound_rule_operations.py index 5b25c23d2981..25d553cef0be 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_workspace_outbound_rule_operations.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_workspace_outbound_rule_operations.py @@ -3,7 +3,7 @@ # --------------------------------------------------------- from typing import Dict -from azure.ai.ml._restclient.v2022_12_01_preview import AzureMachineLearningWorkspaces as ServiceClient122022Preview +from azure.ai.ml._restclient.v2023_02_01_preview import AzureMachineLearningWorkspaces as ServiceClient122022Preview from azure.ai.ml._scope_dependent_operations import OperationsContainer, OperationScope # from azure.ai.ml._telemetry import ActivityType, monitor_with_activity diff --git a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_classification.py b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_classification.py index e7daa3e8a0a9..ca443081bbb4 100644 --- a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_classification.py +++ b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_classification.py @@ -5,7 +5,7 @@ import pytest from azure.ai.ml import UserIdentityConfiguration -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( ClassificationPrimaryMetrics, LearningRateScheduler, MLTableJobInput, diff --git a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_classification_multilabel.py b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_classification_multilabel.py index 811b34449d5b..19ccc10482b8 100644 --- a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_classification_multilabel.py +++ b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_classification_multilabel.py @@ -5,7 +5,7 @@ import pytest from azure.ai.ml import UserIdentityConfiguration -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( ClassificationMultilabelPrimaryMetrics, LearningRateScheduler, MLTableJobInput, diff --git a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_object_detection.py b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_object_detection.py index 998bee98e317..d38e40904ef4 100644 --- a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_object_detection.py +++ b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_object_detection.py @@ -5,7 +5,7 @@ import pytest from azure.ai.ml import UserIdentityConfiguration -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( LearningRateScheduler, MLTableJobInput, ModelSize, diff --git a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_schema.py b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_schema.py index 7d30a284797f..27edfd2e0ca8 100644 --- a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_schema.py +++ b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_schema.py @@ -10,45 +10,45 @@ from marshmallow.exceptions import ValidationError from azure.ai.ml import load_job -from azure.ai.ml._restclient.v2022_12_01_preview.models._azure_machine_learning_workspaces_enums import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models._azure_machine_learning_workspaces_enums import ( LearningRateScheduler, ModelSize, StochasticOptimizer, ValidationMetricType, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import AutoMLJob as RestAutoMLJob -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import BanditPolicy as RestBanditPolicy -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import AutoMLJob as RestAutoMLJob +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import BanditPolicy as RestBanditPolicy +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import ( ClassificationMultilabelPrimaryMetrics, ClassificationPrimaryMetrics, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import ( ImageClassification as RestImageClassification, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import ( ImageClassificationMultilabel as RestImageClassificationMultilabel, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import ( ImageInstanceSegmentation as RestImageInstanceSegmentation, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import ImageLimitSettings as RestImageLimitSettings -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import ImageLimitSettings as RestImageLimitSettings +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import ( ImageModelDistributionSettingsClassification as RestImageClassificationSearchSpace, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import ( ImageModelDistributionSettingsObjectDetection as RestImageObjectDetectionSearchSpace, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import ( ImageModelSettingsClassification as RestImageModelSettingsClassification, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import ( ImageModelSettingsObjectDetection as RestImageModelSettingsObjectDetection, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import ( ImageObjectDetection as RestImageObjectDetection, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import ImageSweepSettings as RestImageSweepSettings -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import ImageSweepSettings as RestImageSweepSettings +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import ( InstanceSegmentationPrimaryMetrics, JobBase, LogVerbosity, diff --git a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_sweep_setting.py b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_sweep_setting.py index 3f7d9783037d..d18ff8246125 100644 --- a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_sweep_setting.py +++ b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_image_sweep_setting.py @@ -7,12 +7,12 @@ import pytest -from azure.ai.ml._restclient.v2022_12_01_preview.models import BanditPolicy as RestBanditPolicy -from azure.ai.ml._restclient.v2022_12_01_preview.models import EarlyTerminationPolicyType -from azure.ai.ml._restclient.v2022_12_01_preview.models import ImageSweepSettings as RestImageSweepSettings -from azure.ai.ml._restclient.v2022_12_01_preview.models import MedianStoppingPolicy as RestMedianStoppingPolicy -from azure.ai.ml._restclient.v2022_12_01_preview.models import SamplingAlgorithmType -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import BanditPolicy as RestBanditPolicy +from azure.ai.ml._restclient.v2023_02_01_preview.models import EarlyTerminationPolicyType +from azure.ai.ml._restclient.v2023_02_01_preview.models import ImageSweepSettings as RestImageSweepSettings +from azure.ai.ml._restclient.v2023_02_01_preview.models import MedianStoppingPolicy as RestMedianStoppingPolicy +from azure.ai.ml._restclient.v2023_02_01_preview.models import SamplingAlgorithmType +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( TruncationSelectionPolicy as RestTruncationSelectionPolicy, ) from azure.ai.ml.entities._job.automl.image import ImageSweepSettings diff --git a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_nlp_schema.py b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_nlp_schema.py index 0e31180ad473..facf05e8a297 100644 --- a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_nlp_schema.py +++ b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_nlp_schema.py @@ -6,30 +6,30 @@ import pytest from azure.ai.ml import load_job -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import AutoMLJob as RestAutoMLJob -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import BanditPolicy as RestBanditPolicy -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import AutoMLJob as RestAutoMLJob +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import BanditPolicy as RestBanditPolicy +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import ( ClassificationPrimaryMetrics, JobBase, LogVerbosity, MLTableJobInput, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import NlpFixedParameters as RestNlpFixedParameters -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import NlpFixedParameters as RestNlpFixedParameters +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import ( NlpParameterSubspace as RestNlpParameterSubspace, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import NlpSweepSettings as RestNlpSweepSettings -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import NlpSweepSettings as RestNlpSweepSettings +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import ( NlpVerticalFeaturizationSettings as RestNlpFeaturizationSettings, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import ( NlpVerticalLimitSettings as RestNlpVerticalLimitSettings, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import TextClassification as RestTextClassification -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import TextClassification as RestTextClassification +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import ( TextClassificationMultilabel as RestTextClassificationMultilabel, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import TextNer as RestTextNer +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import TextNer as RestTextNer from azure.ai.ml._scope_dependent_operations import OperationScope from azure.ai.ml._utils.utils import dump_yaml_to_file, load_yaml, to_iso_duration_format_mins from azure.ai.ml.automl import ( diff --git a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_nlp_sweep_settings.py b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_nlp_sweep_settings.py index 198dd1ea307c..00681994bfad 100644 --- a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_nlp_sweep_settings.py +++ b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_nlp_sweep_settings.py @@ -3,12 +3,12 @@ import pytest -from azure.ai.ml._restclient.v2022_12_01_preview.models import BanditPolicy as RestBanditPolicy -from azure.ai.ml._restclient.v2022_12_01_preview.models import EarlyTerminationPolicyType -from azure.ai.ml._restclient.v2022_12_01_preview.models import MedianStoppingPolicy as RestMedianStoppingPolicy -from azure.ai.ml._restclient.v2022_12_01_preview.models import NlpSweepSettings as RestNlpSweepSettings -from azure.ai.ml._restclient.v2022_12_01_preview.models import SamplingAlgorithmType -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import BanditPolicy as RestBanditPolicy +from azure.ai.ml._restclient.v2023_02_01_preview.models import EarlyTerminationPolicyType +from azure.ai.ml._restclient.v2023_02_01_preview.models import MedianStoppingPolicy as RestMedianStoppingPolicy +from azure.ai.ml._restclient.v2023_02_01_preview.models import NlpSweepSettings as RestNlpSweepSettings +from azure.ai.ml._restclient.v2023_02_01_preview.models import SamplingAlgorithmType +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( TruncationSelectionPolicy as RestTruncationSelectionPolicy, ) from azure.ai.ml.automl import NlpSweepSettings diff --git a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_tabular_schema.py b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_tabular_schema.py index e33aaa6e85d6..cca047836173 100644 --- a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_tabular_schema.py +++ b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_automl_tabular_schema.py @@ -9,33 +9,33 @@ from marshmallow.exceptions import ValidationError from azure.ai.ml import load_job -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import AutoMLJob as RestAutoMLJob -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import AutoNCrossValidations -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import Classification as RestClassification -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import ClassificationPrimaryMetrics -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import AutoMLJob as RestAutoMLJob +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import AutoNCrossValidations +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import Classification as RestClassification +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import ClassificationPrimaryMetrics +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import ( ClassificationTrainingSettings as RestClassificationTrainingSettings, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import ColumnTransformer as RestColumnTransformer -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import CustomNCrossValidations -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import Forecasting as RestForecasting -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import ForecastingPrimaryMetrics -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import ColumnTransformer as RestColumnTransformer +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import CustomNCrossValidations +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import Forecasting as RestForecasting +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import ForecastingPrimaryMetrics +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import ( ForecastingSettings as RestForecastingSettings, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import ( ForecastingTrainingSettings as RestForecastingTrainingSettings, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import JobBase, LogVerbosity, MLTableJobInput -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import Regression as RestRegression -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import RegressionPrimaryMetrics -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import JobBase, LogVerbosity, MLTableJobInput +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import Regression as RestRegression +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import RegressionPrimaryMetrics +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import ( RegressionTrainingSettings as RestRegressionTrainingSettings, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import ( TableVerticalFeaturizationSettings as RestTableFeaturizationSettings, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models._models_py3 import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models._models_py3 import ( TableVerticalLimitSettings as RestTableVerticalLimitSettings, ) from azure.ai.ml._schema.automl.table_vertical.regression import AutoMLRegressionSchema @@ -163,7 +163,7 @@ def expected_validation_data_size() -> int: @pytest.fixture def expected_forecasting_settings(mock_workspace_scope: OperationScope) -> RestForecastingSettings: - from azure.ai.ml._restclient.v2022_12_01_preview.models import ( + from azure.ai.ml._restclient.v2023_02_01_preview.models import ( CustomForecastHorizon, CustomTargetLags, CustomTargetRollingWindowSize, diff --git a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_forecasting_settings.py b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_forecasting_settings.py index ce9dd4665dd4..32ef89589782 100644 --- a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_forecasting_settings.py +++ b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_forecasting_settings.py @@ -2,7 +2,7 @@ import pytest -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( AutoForecastHorizon, AutoSeasonality, AutoTargetLags, @@ -12,8 +12,8 @@ CustomTargetLags, CustomTargetRollingWindowSize, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models import ForecastingSettings as RestForecastingSettings -from azure.ai.ml._restclient.v2022_12_01_preview.models import ShortSeriesHandlingConfiguration +from azure.ai.ml._restclient.v2023_02_01_preview.models import ForecastingSettings as RestForecastingSettings +from azure.ai.ml._restclient.v2023_02_01_preview.models import ShortSeriesHandlingConfiguration from azure.ai.ml.entities._job.automl.tabular.forecasting_settings import ForecastingSettings diff --git a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_tabular_featurization_settings.py b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_tabular_featurization_settings.py index 2293832d95a4..c9bb4fba3164 100644 --- a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_tabular_featurization_settings.py +++ b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_tabular_featurization_settings.py @@ -1,7 +1,7 @@ import pytest -from azure.ai.ml._restclient.v2022_12_01_preview.models import ColumnTransformer as RestColumnTransformer -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import ColumnTransformer as RestColumnTransformer +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( TableVerticalFeaturizationSettings as RestTabularFeaturizationSettings, ) from azure.ai.ml.entities._job.automl.tabular import ColumnTransformer, TabularFeaturizationSettings diff --git a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_tabular_limit_settings.py b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_tabular_limit_settings.py index 1089d6381812..e6c52ee52730 100644 --- a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_tabular_limit_settings.py +++ b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_tabular_limit_settings.py @@ -1,6 +1,6 @@ import pytest -from azure.ai.ml._restclient.v2022_12_01_preview.models import TableVerticalLimitSettings as RestTabularLimitSettings +from azure.ai.ml._restclient.v2023_02_01_preview.models import TableVerticalLimitSettings as RestTabularLimitSettings from azure.ai.ml.entities._job.automl.tabular import TabularLimitSettings diff --git a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_tabular_n_cross_validation_settings.py b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_tabular_n_cross_validation_settings.py index a686781aa2fa..1d6696683995 100644 --- a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_tabular_n_cross_validation_settings.py +++ b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_tabular_n_cross_validation_settings.py @@ -2,7 +2,7 @@ import pytest -from azure.ai.ml._restclient.v2022_12_01_preview.models import AutoNCrossValidations, CustomNCrossValidations, JobBase +from azure.ai.ml._restclient.v2023_02_01_preview.models import AutoNCrossValidations, CustomNCrossValidations, JobBase from azure.ai.ml.automl import classification, forecasting, regression from azure.ai.ml.constants._common import AssetTypes from azure.ai.ml.entities._inputs_outputs import Input diff --git a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_text_classification_job.py b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_text_classification_job.py index 6f3f07641f93..cfe461eb5bf8 100644 --- a/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_text_classification_job.py +++ b/sdk/ml/azure-ai-ml/tests/automl_job/unittests/test_text_classification_job.py @@ -1,9 +1,9 @@ import pytest from azure.ai.ml import UserIdentityConfiguration -from azure.ai.ml._restclient.v2022_12_01_preview.models import AutoMLJob as RestAutoMLJob -from azure.ai.ml._restclient.v2022_12_01_preview.models import BanditPolicy as RestBanditPolicy -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import AutoMLJob as RestAutoMLJob +from azure.ai.ml._restclient.v2023_02_01_preview.models import BanditPolicy as RestBanditPolicy +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( JobBase, LogVerbosity, MLTableJobInput, @@ -15,7 +15,7 @@ SamplingAlgorithmType, TextClassification, ) -from azure.ai.ml._restclient.v2022_12_01_preview.models._azure_machine_learning_workspaces_enums import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models._azure_machine_learning_workspaces_enums import ( ClassificationPrimaryMetrics, ) from azure.ai.ml._utils.utils import to_iso_duration_format_mins diff --git a/sdk/ml/azure-ai-ml/tests/command_job/e2etests/test_command_job.py b/sdk/ml/azure-ai-ml/tests/command_job/e2etests/test_command_job.py index b8680c2314e0..97d399f65a4c 100644 --- a/sdk/ml/azure-ai-ml/tests/command_job/e2etests/test_command_job.py +++ b/sdk/ml/azure-ai-ml/tests/command_job/e2etests/test_command_job.py @@ -8,7 +8,7 @@ from azure.ai.ml import Input, MLClient, command, load_environment, load_job from azure.ai.ml._azure_environments import _get_base_url_from_metadata, _resource_to_scopes -from azure.ai.ml._restclient.v2022_12_01_preview.models import ListViewType +from azure.ai.ml._restclient.v2023_02_01_preview.models import ListViewType from azure.ai.ml._utils._arm_id_utils import AMLVersionedArmId from azure.ai.ml.constants._common import COMMON_RUNTIME_ENV_VAR, LOCAL_COMPUTE_TARGET, TID_FMT, AssetTypes from azure.ai.ml.entities import AmlTokenConfiguration diff --git a/sdk/ml/azure-ai-ml/tests/pipeline_job/unittests/test_pipeline_job_schema.py b/sdk/ml/azure-ai-ml/tests/pipeline_job/unittests/test_pipeline_job_schema.py index bbc361a1610a..c4647ac2bf73 100644 --- a/sdk/ml/azure-ai-ml/tests/pipeline_job/unittests/test_pipeline_job_schema.py +++ b/sdk/ml/azure-ai-ml/tests/pipeline_job/unittests/test_pipeline_job_schema.py @@ -12,11 +12,11 @@ from pytest_mock import MockFixture from azure.ai.ml import MLClient, load_job -from azure.ai.ml._restclient.v2022_12_01_preview.models import JobOutput as RestJobOutput -from azure.ai.ml._restclient.v2022_12_01_preview.models import MLTableJobInput -from azure.ai.ml._restclient.v2022_12_01_preview.models import PipelineJob as RestPipelineJob -from azure.ai.ml._restclient.v2022_12_01_preview.models import UriFolderJobInput -from azure.ai.ml._restclient.v2022_12_01_preview.models._azure_machine_learning_workspaces_enums import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import JobOutput as RestJobOutput +from azure.ai.ml._restclient.v2023_02_01_preview.models import MLTableJobInput +from azure.ai.ml._restclient.v2023_02_01_preview.models import PipelineJob as RestPipelineJob +from azure.ai.ml._restclient.v2023_02_01_preview.models import UriFolderJobInput +from azure.ai.ml._restclient.v2023_02_01_preview.models._azure_machine_learning_workspaces_enums import ( LearningRateScheduler, StochasticOptimizer, ) diff --git a/sdk/ml/azure-ai-ml/tests/spark_job/unittests/test_spark_job_schema.py b/sdk/ml/azure-ai-ml/tests/spark_job/unittests/test_spark_job_schema.py index 1048418c7718..143b4c61eded 100644 --- a/sdk/ml/azure-ai-ml/tests/spark_job/unittests/test_spark_job_schema.py +++ b/sdk/ml/azure-ai-ml/tests/spark_job/unittests/test_spark_job_schema.py @@ -4,7 +4,7 @@ import yaml from azure.ai.ml import Input, load_job -from azure.ai.ml._restclient.v2022_12_01_preview.models import InputDeliveryMode, JobOutputType, OutputDeliveryMode +from azure.ai.ml._restclient.v2023_02_01_preview.models import InputDeliveryMode, JobOutputType, OutputDeliveryMode from azure.ai.ml._schema import SparkJobSchema from azure.ai.ml.constants._common import BASE_PATH_CONTEXT_KEY from azure.ai.ml.entities import SparkJob diff --git a/sdk/ml/azure-ai-ml/tests/workspace/unittests/test_workspace_operations.py b/sdk/ml/azure-ai-ml/tests/workspace/unittests/test_workspace_operations.py index 73414d741ef5..29cf8aaa8733 100644 --- a/sdk/ml/azure-ai-ml/tests/workspace/unittests/test_workspace_operations.py +++ b/sdk/ml/azure-ai-ml/tests/workspace/unittests/test_workspace_operations.py @@ -5,7 +5,7 @@ from pytest_mock import MockFixture from azure.ai.ml import MLClient, load_workspace -from azure.ai.ml._restclient.v2022_12_01_preview.models import ( +from azure.ai.ml._restclient.v2023_02_01_preview.models import ( EncryptionKeyVaultUpdateProperties, EncryptionUpdateProperties, ) From 55229d7c03bb9c844d76dcce14a82432d4cb8a00 Mon Sep 17 00:00:00 2001 From: Tony Ponwin Jeparatnam <41344586+TonyJ1@users.noreply.github.com> Date: Thu, 2 Mar 2023 01:12:22 -0800 Subject: [PATCH 06/13] MLClient and Workspace --- sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py | 2 +- .../azure/ai/ml/operations/_workspace_operations.py | 4 ++-- .../ai/ml/operations/_workspace_outbound_rule_operations.py | 4 ++-- .../tests/workspace/unittests/test_workspace_operations.py | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py index ed7ef13f9107..34552da16b16 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py @@ -263,7 +263,7 @@ def __init__( **kwargs, ) - self._rp_service_client = ServiceClient122022Preview( + self._rp_service_client = ServiceClient022023Preview( subscription_id=self._operation_scope._subscription_id, credential=self._credential, base_url=base_url, diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_workspace_operations.py b/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_workspace_operations.py index 7a2898626448..9f08e65a017a 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_workspace_operations.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_workspace_operations.py @@ -9,7 +9,7 @@ from azure.ai.ml._arm_deployments import ArmDeploymentExecutor from azure.ai.ml._arm_deployments.arm_helper import get_template -from azure.ai.ml._restclient.v2023_02_01_preview import AzureMachineLearningWorkspaces as ServiceClient122022Preview +from azure.ai.ml._restclient.v2023_02_01_preview import AzureMachineLearningWorkspaces as ServiceClient022023Preview from azure.ai.ml._restclient.v2023_02_01_preview.models import ( EncryptionKeyVaultUpdateProperties, EncryptionUpdateProperties, @@ -68,7 +68,7 @@ class WorkspaceOperations: def __init__( self, operation_scope: OperationScope, - service_client: ServiceClient122022Preview, + service_client: ServiceClient022023Preview, all_operations: OperationsContainer, credentials: Optional[TokenCredential] = None, **kwargs: Dict, diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_workspace_outbound_rule_operations.py b/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_workspace_outbound_rule_operations.py index 25d553cef0be..82e4c3006195 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_workspace_outbound_rule_operations.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_workspace_outbound_rule_operations.py @@ -3,7 +3,7 @@ # --------------------------------------------------------- from typing import Dict -from azure.ai.ml._restclient.v2023_02_01_preview import AzureMachineLearningWorkspaces as ServiceClient122022Preview +from azure.ai.ml._restclient.v2023_02_01_preview import AzureMachineLearningWorkspaces as ServiceClient022023Preview from azure.ai.ml._scope_dependent_operations import OperationsContainer, OperationScope # from azure.ai.ml._telemetry import ActivityType, monitor_with_activity @@ -21,7 +21,7 @@ class WorkspaceOutboundRuleOperations: def __init__( self, operation_scope: OperationScope, - service_client: ServiceClient122022Preview, + service_client: ServiceClient022023Preview, all_operations: OperationsContainer, credentials: TokenCredential = None, **kwargs: Dict, diff --git a/sdk/ml/azure-ai-ml/tests/workspace/unittests/test_workspace_operations.py b/sdk/ml/azure-ai-ml/tests/workspace/unittests/test_workspace_operations.py index 29cf8aaa8733..c955ce43980e 100644 --- a/sdk/ml/azure-ai-ml/tests/workspace/unittests/test_workspace_operations.py +++ b/sdk/ml/azure-ai-ml/tests/workspace/unittests/test_workspace_operations.py @@ -31,13 +31,13 @@ def mock_credential() -> Mock: @pytest.fixture def mock_workspace_operation( mock_workspace_scope: OperationScope, - mock_aml_services_2022_12_01_preview: Mock, + mock_aml_services_2023_02_01_preview: Mock, mock_machinelearning_client: Mock, mock_credential: Mock, ) -> WorkspaceOperations: yield WorkspaceOperations( operation_scope=mock_workspace_scope, - service_client=mock_aml_services_2022_12_01_preview, + service_client=mock_aml_services_2023_02_01_preview, all_operations=mock_machinelearning_client._operation_container, credentials=mock_credential, ) From 38cf026589c9da19c1e9a08660226c2598a8d5c8 Mon Sep 17 00:00:00 2001 From: Tony Ponwin Jeparatnam <41344586+TonyJ1@users.noreply.github.com> Date: Thu, 2 Mar 2023 02:09:59 -0800 Subject: [PATCH 07/13] Workspace and Networking still depend on 2022-12 --- .../azure/ai/ml/entities/_workspace/networking.py | 2 +- .../azure/ai/ml/entities/_workspace/workspace.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/networking.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/networking.py index 3c3f9371ddb6..f0750ffe9b57 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/networking.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/networking.py @@ -4,7 +4,7 @@ from typing import Any, Dict, Optional -from azure.ai.ml._restclient.v2023_02_01_preview.models import ( +from azure.ai.ml._restclient.v2022_12_01_preview.models import ( ManagedNetworkSettings as RestManagedNetwork, FqdnOutboundRule as RestFqdnOutboundRule, PrivateEndpointOutboundRule as RestPrivateEndpointOutboundRule, diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/workspace.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/workspace.py index dcbafe276f6b..deafab9d5643 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/workspace.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/workspace.py @@ -8,10 +8,10 @@ from pathlib import Path from typing import IO, AnyStr, Dict, Optional, Union -from azure.ai.ml._restclient.v2023_02_01_preview.models import ManagedServiceIdentity as RestManagedServiceIdentity -from azure.ai.ml._restclient.v2023_02_01_preview.models import FeatureStoreSettings as RestFeatureStoreSettings -from azure.ai.ml._restclient.v2023_02_01_preview.models import Workspace as RestWorkspace -from azure.ai.ml._restclient.v2023_02_01_preview.models import ManagedNetworkSettings as RestManagedNetwork +from azure.ai.ml._restclient.v2022_12_01_preview.models import ManagedServiceIdentity as RestManagedServiceIdentity +from azure.ai.ml._restclient.v2022_12_01_preview.models import FeatureStoreSettings as RestFeatureStoreSettings +from azure.ai.ml._restclient.v2022_12_01_preview.models import Workspace as RestWorkspace +from azure.ai.ml._restclient.v2022_12_01_preview.models import ManagedNetworkSettings as RestManagedNetwork from azure.ai.ml._schema.workspace.workspace import WorkspaceSchema from azure.ai.ml._utils.utils import dump_yaml_to_file from azure.ai.ml.constants._common import BASE_PATH_CONTEXT_KEY, PARAMS_OVERRIDE_KEY, WorkspaceResourceConstants From 047580623deb0c2691541dd197f4f39a40bb18fe Mon Sep 17 00:00:00 2001 From: TonyJ1 <41344586+TonyJ1@users.noreply.github.com> Date: Thu, 2 Mar 2023 02:52:37 -0800 Subject: [PATCH 08/13] ComputeRuntimeDTO and FeatureStoreSettings depends on v2022_12_01_preview --- .../azure/ai/ml/entities/_workspace/compute_runtime.py | 2 +- .../azure/ai/ml/entities/_workspace/feature_store_settings.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/compute_runtime.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/compute_runtime.py index 00f7d42b09a1..536ab69dcb81 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/compute_runtime.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/compute_runtime.py @@ -4,7 +4,7 @@ from typing import Optional -from azure.ai.ml._restclient.v2023_02_01_preview.models import ComputeRuntimeDto as RestComputeRuntimeDto +from azure.ai.ml._restclient.v2022_12_01_preview.models import ComputeRuntimeDto as RestComputeRuntimeDto from azure.ai.ml.entities._mixins import RestTranslatableMixin from azure.ai.ml._utils._experimental import experimental diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/feature_store_settings.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/feature_store_settings.py index 7ff76147d90b..6d2011c9ec84 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/feature_store_settings.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/feature_store_settings.py @@ -6,7 +6,7 @@ from typing import Optional, Any -from azure.ai.ml._restclient.v2023_02_01_preview.models import FeatureStoreSettings as RestFeatureStoreSettings +from azure.ai.ml._restclient.v2022_12_01_preview.models import FeatureStoreSettings as RestFeatureStoreSettings from azure.ai.ml.entities._mixins import RestTranslatableMixin from azure.ai.ml._utils._experimental import experimental from .compute_runtime import ComputeRuntime From 3a7be00187baffb1a7cf1a8e07867530aae193b5 Mon Sep 17 00:00:00 2001 From: TonyJ1 <41344586+TonyJ1@users.noreply.github.com> Date: Thu, 2 Mar 2023 09:33:11 -0800 Subject: [PATCH 09/13] Move remaining workspace files to use 2022-12 API --- sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py | 2 +- .../azure/ai/ml/entities/_workspace/diagnose.py | 10 +++++----- .../azure/ai/ml/operations/_workspace_operations.py | 6 +++--- .../operations/_workspace_outbound_rule_operations.py | 4 ++-- .../workspace/unittests/test_workspace_operations.py | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py index c9cdad27669a..00c3cbe0f15e 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py @@ -263,7 +263,7 @@ def __init__( **kwargs, ) - self._rp_service_client = ServiceClient022023Preview( + self._rp_service_client = ServiceClient122022Preview( subscription_id=self._operation_scope._subscription_id, credential=self._credential, base_url=base_url, diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/diagnose.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/diagnose.py index 109162083b9a..62b7ab597bc7 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/diagnose.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/diagnose.py @@ -3,15 +3,15 @@ # --------------------------------------------------------- from typing import Any, Dict, List, Optional -from azure.ai.ml._restclient.v2023_02_01_preview.models import ( +from azure.ai.ml._restclient.v2022_12_01_preview.models import ( DiagnoseRequestProperties as RestDiagnoseRequestProperties, ) -from azure.ai.ml._restclient.v2023_02_01_preview.models import DiagnoseResponseResult as RestDiagnoseResponseResult -from azure.ai.ml._restclient.v2023_02_01_preview.models import ( +from azure.ai.ml._restclient.v2022_12_01_preview.models import DiagnoseResponseResult as RestDiagnoseResponseResult +from azure.ai.ml._restclient.v2022_12_01_preview.models import ( DiagnoseResponseResultValue as RestDiagnoseResponseResultValue, ) -from azure.ai.ml._restclient.v2023_02_01_preview.models import DiagnoseResult as RestDiagnoseResult -from azure.ai.ml._restclient.v2023_02_01_preview.models import ( +from azure.ai.ml._restclient.v2022_12_01_preview.models import DiagnoseResult as RestDiagnoseResult +from azure.ai.ml._restclient.v2022_12_01_preview.models import ( DiagnoseWorkspaceParameters as RestDiagnoseWorkspaceParameters, ) diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_workspace_operations.py b/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_workspace_operations.py index 9f08e65a017a..18b98ed96cd9 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_workspace_operations.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_workspace_operations.py @@ -9,8 +9,8 @@ from azure.ai.ml._arm_deployments import ArmDeploymentExecutor from azure.ai.ml._arm_deployments.arm_helper import get_template -from azure.ai.ml._restclient.v2023_02_01_preview import AzureMachineLearningWorkspaces as ServiceClient022023Preview -from azure.ai.ml._restclient.v2023_02_01_preview.models import ( +from azure.ai.ml._restclient.v2022_12_01_preview import AzureMachineLearningWorkspaces as ServiceClient122022Preview +from azure.ai.ml._restclient.v2022_12_01_preview.models import ( EncryptionKeyVaultUpdateProperties, EncryptionUpdateProperties, WorkspaceUpdateParameters, @@ -68,7 +68,7 @@ class WorkspaceOperations: def __init__( self, operation_scope: OperationScope, - service_client: ServiceClient022023Preview, + service_client: ServiceClient122022Preview, all_operations: OperationsContainer, credentials: Optional[TokenCredential] = None, **kwargs: Dict, diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_workspace_outbound_rule_operations.py b/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_workspace_outbound_rule_operations.py index 82e4c3006195..5b25c23d2981 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_workspace_outbound_rule_operations.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/operations/_workspace_outbound_rule_operations.py @@ -3,7 +3,7 @@ # --------------------------------------------------------- from typing import Dict -from azure.ai.ml._restclient.v2023_02_01_preview import AzureMachineLearningWorkspaces as ServiceClient022023Preview +from azure.ai.ml._restclient.v2022_12_01_preview import AzureMachineLearningWorkspaces as ServiceClient122022Preview from azure.ai.ml._scope_dependent_operations import OperationsContainer, OperationScope # from azure.ai.ml._telemetry import ActivityType, monitor_with_activity @@ -21,7 +21,7 @@ class WorkspaceOutboundRuleOperations: def __init__( self, operation_scope: OperationScope, - service_client: ServiceClient022023Preview, + service_client: ServiceClient122022Preview, all_operations: OperationsContainer, credentials: TokenCredential = None, **kwargs: Dict, diff --git a/sdk/ml/azure-ai-ml/tests/workspace/unittests/test_workspace_operations.py b/sdk/ml/azure-ai-ml/tests/workspace/unittests/test_workspace_operations.py index c955ce43980e..7a57f406165e 100644 --- a/sdk/ml/azure-ai-ml/tests/workspace/unittests/test_workspace_operations.py +++ b/sdk/ml/azure-ai-ml/tests/workspace/unittests/test_workspace_operations.py @@ -5,7 +5,7 @@ from pytest_mock import MockFixture from azure.ai.ml import MLClient, load_workspace -from azure.ai.ml._restclient.v2023_02_01_preview.models import ( +from azure.ai.ml._restclient.v2022_12_01_preview.models import ( EncryptionKeyVaultUpdateProperties, EncryptionUpdateProperties, ) From 20e54be1fca2ba3eb90225749eb37b1edd7e3bd9 Mon Sep 17 00:00:00 2001 From: TonyJ1 <41344586+TonyJ1@users.noreply.github.com> Date: Thu, 2 Mar 2023 09:35:39 -0800 Subject: [PATCH 10/13] Move workspace_keys files to use 2022-12 API --- .../azure/ai/ml/entities/_workspace/workspace_keys.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/workspace_keys.py b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/workspace_keys.py index 7f9d5231fc36..3cf298c7c00e 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/workspace_keys.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/workspace_keys.py @@ -4,7 +4,7 @@ from typing import List, Optional -from azure.ai.ml._restclient.v2023_02_01_preview.models import ListWorkspaceKeysResult +from azure.ai.ml._restclient.v2022_12_01_preview.models import ListWorkspaceKeysResult class ContainerRegistryCredential: From 4e62db47e03d98d9d6e95bcee69c7f212596bc5b Mon Sep 17 00:00:00 2001 From: TonyJ1 <41344586+TonyJ1@users.noreply.github.com> Date: Thu, 2 Mar 2023 09:48:37 -0800 Subject: [PATCH 11/13] Move test_ws_operations to use 2022-12 API --- .../tests/workspace/unittests/test_workspace_operations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/ml/azure-ai-ml/tests/workspace/unittests/test_workspace_operations.py b/sdk/ml/azure-ai-ml/tests/workspace/unittests/test_workspace_operations.py index 7a57f406165e..73414d741ef5 100644 --- a/sdk/ml/azure-ai-ml/tests/workspace/unittests/test_workspace_operations.py +++ b/sdk/ml/azure-ai-ml/tests/workspace/unittests/test_workspace_operations.py @@ -31,13 +31,13 @@ def mock_credential() -> Mock: @pytest.fixture def mock_workspace_operation( mock_workspace_scope: OperationScope, - mock_aml_services_2023_02_01_preview: Mock, + mock_aml_services_2022_12_01_preview: Mock, mock_machinelearning_client: Mock, mock_credential: Mock, ) -> WorkspaceOperations: yield WorkspaceOperations( operation_scope=mock_workspace_scope, - service_client=mock_aml_services_2023_02_01_preview, + service_client=mock_aml_services_2022_12_01_preview, all_operations=mock_machinelearning_client._operation_container, credentials=mock_credential, ) From 7ce6321b41216c62bb73ed900fb0e0390353d54b Mon Sep 17 00:00:00 2001 From: TonyJ1 <41344586+TonyJ1@users.noreply.github.com> Date: Thu, 2 Mar 2023 15:44:25 -0800 Subject: [PATCH 12/13] Remove SAS URI Santizer --- sdk/ml/azure-ai-ml/tests/conftest.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sdk/ml/azure-ai-ml/tests/conftest.py b/sdk/ml/azure-ai-ml/tests/conftest.py index 34657a6bfb70..a1742c33b1b6 100644 --- a/sdk/ml/azure-ai-ml/tests/conftest.py +++ b/sdk/ml/azure-ai-ml/tests/conftest.py @@ -99,12 +99,6 @@ def add_sanitizers(test_proxy, fake_datastore_key): regex='\\/az-ml-artifacts\\/([^/\\s"]{36})\\/', group_for_replace="1", ) - # masks signature in SAS uri - add_general_regex_sanitizer( - value="000000000000000000000000000000000000", - regex='sig=([^/\\s"]{46,52})', - group_for_replace="1", - ) # TODO: REMOVE before the merge add_uri_string_sanitizer( target="https://master.api.azureml-test.ms/mferp/managementfrontend/", value="https://management.azure.com/" From 4fd6d80572f8f7ba338c59364c49bc66c80ea1c1 Mon Sep 17 00:00:00 2001 From: TonyJ1 <41344586+TonyJ1@users.noreply.github.com> Date: Thu, 2 Mar 2023 17:53:02 -0800 Subject: [PATCH 13/13] Remove hardcodes to use master mfe endpoint --- sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py | 5 +---- sdk/ml/azure-ai-ml/tests/conftest.py | 4 ---- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py b/sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py index 00c3cbe0f15e..8cd2abaa8298 100644 --- a/sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py +++ b/sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py @@ -324,10 +324,7 @@ def __init__( self._service_client_02_2023_preview = ServiceClient022023Preview( credential=self._credential, subscription_id=self._operation_scope._subscription_id, - # base_url=base_url, - # TODO: Below hardcode is just for testing the gates - # TODO: REMOVE before the merge - base_url="https://master.api.azureml-test.ms/mferp/managementfrontend", + base_url=base_url, **kwargs, ) diff --git a/sdk/ml/azure-ai-ml/tests/conftest.py b/sdk/ml/azure-ai-ml/tests/conftest.py index a1742c33b1b6..922d9354957e 100644 --- a/sdk/ml/azure-ai-ml/tests/conftest.py +++ b/sdk/ml/azure-ai-ml/tests/conftest.py @@ -99,10 +99,6 @@ def add_sanitizers(test_proxy, fake_datastore_key): regex='\\/az-ml-artifacts\\/([^/\\s"]{36})\\/', group_for_replace="1", ) - # TODO: REMOVE before the merge - add_uri_string_sanitizer( - target="https://master.api.azureml-test.ms/mferp/managementfrontend/", value="https://management.azure.com/" - ) identity_json_paths = [ ".systemData.createdBy",