Skip to content

Commit

Permalink
Data Collector Data field string fix (Azure#34739)
Browse files Browse the repository at this point in the history
* data field for data collector should pass in a data id for the rest call

* update import order
  • Loading branch information
TajiHarrisMicrosoft authored Mar 13, 2024
1 parent f12a5b9 commit 04ad332
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ class DeploymentCollectionSchema(metaclass=PatchedSchemaMeta):
enabled = StringTransformedEnum(required=True, allowed_values=[Boolean.TRUE, Boolean.FALSE])
data = UnionField(
[
fields.Str(),
NestedField(DataAssetSchema),
fields.Str(),
]
)
client_id = fields.Str()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------

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

from azure.ai.ml._restclient.v2023_04_01_preview.models import Collection as RestCollection
from azure.ai.ml._schema._deployment.online.deployment_collection_schema import DeploymentCollectionSchema
from azure.ai.ml._utils._experimental import experimental
from azure.ai.ml.constants._common import BASE_PATH_CONTEXT_KEY
from .data_asset import DataAsset


@experimental
Expand All @@ -27,7 +28,7 @@ def __init__(
self,
*,
enabled: Optional[str] = None,
data: Optional[str] = None,
data: Optional[Union[str, DataAsset]] = None,
client_id: Optional[str] = None,
**kwargs: Any
):
Expand Down

0 comments on commit 04ad332

Please sign in to comment.