Skip to content

Commit

Permalink
fix: Expose DataAsset class publicly (Azure#34814)
Browse files Browse the repository at this point in the history
* fix: Expose DataAsset class publicly

* doc: Fix DataAsset docstring

* refactor: Make DataAsset params keyword only

* refactor: Remove kwargs from model

* refactor: Remove unused pylint directive

* docs: Update typing in docstring
  • Loading branch information
kdestin committed Mar 19, 2024
1 parent 138fdde commit f535373
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
2 changes: 2 additions & 0 deletions sdk/ml/azure-ai-ml/azure/ai/ml/entities/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
from ._deployment.batch_job import BatchJob
from ._deployment.code_configuration import CodeConfiguration
from ._deployment.container_resource_settings import ResourceSettings
from ._deployment.data_asset import DataAsset
from ._deployment.data_collector import DataCollector
from ._deployment.deployment_collection import DeploymentCollection
from ._deployment.deployment_settings import BatchRetrySettings, OnlineRequestSettings, ProbeSettings
Expand Down Expand Up @@ -449,6 +450,7 @@
"ModelPerformanceRegressionThresholds",
"DataCollector",
"IntellectualProperty",
"DataAsset",
"DeploymentCollection",
"RequestLogging",
"NoneCredentialConfiguration",
Expand Down
19 changes: 7 additions & 12 deletions sdk/ml/azure-ai-ml/azure/ai/ml/entities/_deployment/data_asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------

from typing import Any, Dict, Optional
from typing import Dict, Optional

from azure.ai.ml._schema._deployment.online.data_asset_schema import DataAssetSchema
from azure.ai.ml._utils._experimental import experimental
Expand All @@ -13,25 +13,20 @@
class DataAsset:
"""Data Asset entity
:param data_id: Arm id of registered data asset
:param data_id: str
:param name: Name of data asset
:type name: str
:param path: Path where the data asset is stored.
:type path: str
:param version: Version of data asset.
:type version" int
:keyword Optional[str] data_id: Arm id of registered data asset
:keyword Optional[str] name: Name of data asset
:keyword Optional[str] path: Path where the data asset is stored.
:keyword Optional[int] version: Version of data asset.
"""

def __init__(
self,
*,
data_id: Optional[str] = None,
name: Optional[str] = None,
path: Optional[str] = None,
version: Optional[int] = None,
**kwargs: Any,
): # pylint: disable=unused-argument
):
self.data_id = data_id
self.name = name
self.path = path
Expand Down

0 comments on commit f535373

Please sign in to comment.