mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-11 08:52:58 +00:00
17 lines
507 B
Python
17 lines
507 B
Python
from datahub.metadata.urns import DomainUrn, MlModelGroupUrn
|
|
from datahub.sdk import DataHubClient
|
|
|
|
client = DataHubClient.from_env()
|
|
|
|
mlmodel_group = client.entities.get(
|
|
MlModelGroupUrn(platform="mlflow", name="recommendation-models", env="PROD")
|
|
)
|
|
|
|
# If you don't know the domain urn, you can look it up:
|
|
# domain_urn = client.resolve.domain(name="marketing")
|
|
|
|
# NOTE: This will overwrite the existing domain
|
|
mlmodel_group.set_domain(DomainUrn(id="marketing"))
|
|
|
|
client.entities.update(mlmodel_group)
|