Skip to content

Commit

Permalink
appending endpoint,deployment and collection name to destination path (
Browse files Browse the repository at this point in the history
  • Loading branch information
TajiHarrisMicrosoft authored Feb 27, 2023
1 parent 4e357f5 commit aaec274
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -350,14 +350,17 @@ def _get_local_endpoint_mode(self, vscode_debug):
def _register_collection_data_assets(self, deployment: OnlineDeployment) -> None:
for collection in deployment.data_collector.collections:
data_name = f"{deployment.endpoint_name}-{deployment.name}-{collection}"
short_form_path = (
f"{deployment.data_collector.destination.path}/{deployment.endpoint_name}/{deployment.name}/{collection}" # pylint: disable=line-too-long
if deployment.data_collector.destination and deployment.data_collector.destination.path
else f"{DEFAULT_MDC_PATH}/{deployment.endpoint_name}/{deployment.name}/{collection}"
)
data_object = Data(
name=data_name,
path=deployment.data_collector.destination.path
if deployment.data_collector.destination and deployment.data_collector.destination.path
else f"{DEFAULT_MDC_PATH}/{deployment.endpoint_name}/{deployment.name}/{collection}",
path=short_form_path,
is_anonymous=True,
)
result = self._all_operations._all_operations[AzureMLResourceType.DATA].create_or_update(data_object)
deployment.data_collector.collections[collection].data = DataAsset(
data_id=result.id, path=result.path, name=result.name, version=result.version
path=short_form_path, name=result.name, version=result.version
)

0 comments on commit aaec274

Please sign in to comment.