Skip to main content
Sometimes you need to mark an artifact as the output of a previously logged run. For example, you might generate a new model checkpoint or dataset that should be associated with an earlier training run. The following code reinitializes a run by ID and logs a new artifact to it:
with wandb.init(id="existing_run_id", resume="allow") as run:
    artifact = wandb.Artifact("artifact_name", "artifact_type")
    artifact.add_file("my_data/file.txt")
    run.log_artifact(artifact)

Artifacts