el, save_artifact

from zenml.client import Client@step

def f_() -> None:

# produce new artifact

new_artifact = save_artifact(data="Hello, World!", name="manual_artifact")

# and link it inside a step

link_artifact_to_model(

artifact_version_id=new_artifact.id,

model=Model(name="MyModel", version="0.0.42"),

# use existing artifact

existing_artifact = Client().get_artifact_version(name_id_or_prefix="existing_artifact")

# and link it even outside a step

link_artifact_to_model(

artifact_version_id=existing_artifact.id,

model=Model(name="MyModel", version="0.2.42"),

PreviousPromote a Model

NextLoad artifacts from Model

Last updated 15 days ago