Skip to content

Commit de47b3d

Browse files
authored
Fix SDK review comments (Azure#30297)
1 parent 3e974c0 commit de47b3d

File tree

6 files changed

+22
-5
lines changed

6 files changed

+22
-5
lines changed

sdk/ml/azure-ai-ml/azure/ai/ml/entities/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from ._assets._artifacts.model import Model
1717
from ._assets.asset import Asset
1818
from ._assets.environment import BuildContext, Environment
19+
from ._assets.intellectual_property import IntellectualProperty
1920
from ._assets.workspace_asset_reference import WorkspaceAssetReference as WorkspaceModelReference
2021
from ._builders import Command, Parallel, Pipeline, Spark, Sweep
2122
from ._component.command_component import CommandComponent
@@ -65,6 +66,7 @@
6566
ManagedOnlineDeployment,
6667
OnlineDeployment,
6768
)
69+
from ._deployment.data_collector import DataCollector
6870
from ._deployment.model_batch_deployment import ModelBatchDeployment
6971
from ._deployment.model_batch_deployment_settings import ModelBatchDeploymentSettings
7072
from ._deployment.pipeline_component_batch_deployment import PipelineComponentBatchDeployment
@@ -152,6 +154,7 @@
152154
from ._assets._artifacts._package.base_environment_source import BaseEnvironment
153155
from ._assets._artifacts._package.model_package import (
154156
ModelPackage,
157+
ModelPackageInput,
155158
PackageInputPathId,
156159
PackageInputPathUrl,
157160
PackageInputPathVersion,
@@ -371,6 +374,7 @@
371374
"EndpointAuthKeys",
372375
"EndpointAuthToken",
373376
"ModelPackage",
377+
"ModelPackageInput",
374378
"AzureMLOnlineInferencingServer",
375379
"AzureMLBatchInferencingServer",
376380
"TritonInferencingServer",
@@ -400,4 +404,6 @@
400404
"PredictionDriftMetricThreshold",
401405
"FeatureAttributionDriftMetricThreshold",
402406
"CustomMonitoringMetricThreshold",
407+
"DataCollector",
408+
"IntellectualProperty",
403409
]

sdk/ml/azure-ai-ml/azure/ai/ml/entities/_assets/_artifacts/_package/inferencing_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ class CustomInferencingServer:
163163
:ivar type: The type of the inferencing server.
164164
"""
165165

166-
def __init__(self, inference_configuration: OnlineInferenceConfiguration = None, **kwargs):
166+
def __init__(self, *, inference_configuration: OnlineInferenceConfiguration = None, **kwargs):
167167
self.type = "custom"
168168
self.inference_configuration = inference_configuration
169169

sdk/ml/azure-ai-ml/azure/ai/ml/entities/_assets/_artifacts/_package/model_package.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class PackageInputPathId:
4545
:type resource_id: str
4646
"""
4747

48-
def __init__(self, input_path_type: Optional[str] = None, resource_id: Optional[str] = None):
48+
def __init__(self, *, input_path_type: Optional[str] = None, resource_id: Optional[str] = None):
4949
self.input_path_type = input_path_type
5050
self.resource_id = resource_id
5151

sdk/ml/azure-ai-ml/azure/ai/ml/entities/_deployment/data_collector.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
from typing import Dict, Optional
77

88
from azure.ai.ml._schema._deployment.online.data_collector_schema import DataCollectorSchema
9+
from azure.ai.ml._utils._experimental import experimental
910
from azure.ai.ml.constants._common import BASE_PATH_CONTEXT_KEY
1011
from azure.ai.ml.entities._deployment.request_logging import RequestLogging
1112
from azure.ai.ml.entities._deployment.deployment_collection import DeploymentCollection
1213
from azure.ai.ml._restclient.v2023_04_01_preview.models import DataCollector as RestDataCollector
1314

1415

16+
@experimental
1517
class DataCollector:
1618
"""Data Capture deployment entity.
1719

sdk/ml/azure-ai-ml/azure/ai/ml/entities/_deployment/online_deployment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ class ManagedOnlineDeployment(OnlineDeployment):
636636
code_configuration is present, defaults to None
637637
:paramtype scoring_script_path: typing.Optional[typing.Union[str, os.PathLike]]
638638
:keyword data_collector: Data collector, defaults to None
639-
:paramtype data_collectors: typing.Optional[typing.List[~azure.ai.ml.entities.DataCollector]]
639+
:paramtype data_collector: typing.Optional[typing.List[~azure.ai.ml.entities.DataCollector]]
640640
"""
641641

642642
def __init__(

sdk/ml/azure-ai-ml/azure/ai/ml/operations/_data_operations.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,16 @@ def _get_latest_version(self, name: str) -> Data:
566566

567567
@monitor_with_activity(logger, "data.Share", ActivityType.PUBLICAPI)
568568
@experimental
569-
def share(self, name, version, *, share_with_name, share_with_version, registry_name) -> Data:
569+
def share(
570+
self,
571+
name,
572+
version,
573+
*,
574+
share_with_name,
575+
share_with_version,
576+
registry_name,
577+
**kwargs,
578+
) -> Data:
570579
"""Share a data asset from workspace to registry.
571580
572581
:param name: Name of data asset.
@@ -585,7 +594,7 @@ def share(self, name, version, *, share_with_name, share_with_version, registry_
585594

586595
# Get workspace info to get workspace GUID
587596
workspace = self._service_client.workspaces.get(
588-
resource_group_name=self._resource_group_name, workspace_name=self._workspace_name
597+
resource_group_name=self._resource_group_name, workspace_name=self._workspace_name, **kwargs
589598
)
590599
workspace_guid = workspace.workspace_id
591600
workspace_location = workspace.location

0 commit comments

Comments
 (0)