Skip to content

Commit ddc8161

Browse files
committed
include value in model tag ingestion
1 parent eb88a71 commit ddc8161

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

metadata-ingestion/src/datahub/ingestion/source/mlflow.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,7 @@ def _get_ml_model_properties_workunit(
584584
if model_version.user_id
585585
else None
586586
)
587+
model_version_tags = [f"{k}:{v}" for k, v in model_version.tags.items()]
587588

588589
ml_model_properties = MLModelPropertiesClass(
589590
customProperties=model_version.tags,
@@ -599,8 +600,7 @@ def _get_ml_model_properties_workunit(
599600
),
600601
hyperParams=hyperparams,
601602
trainingMetrics=training_metrics,
602-
# mlflow tags are dicts, but datahub tags are lists. currently use only keys from mlflow tags
603-
tags=list(model_version.tags.keys()),
603+
tags=model_version_tags,
604604
groups=[ml_model_group_urn],
605605
trainingJobs=training_jobs,
606606
)

metadata-ingestion/tests/integration/mlflow/mlflow_mcps_golden.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@
362362
}
363363
],
364364
"tags": [
365-
"model_version_id"
365+
"model_version_id:1"
366366
],
367367
"groups": [
368368
"urn:li:mlModelGroup:(urn:li:dataPlatform:mlflow,test-model,PROD)"

0 commit comments

Comments
 (0)