diff --git a/app/src/helpers/wandb_registry.py b/app/src/helpers/wandb_registry.py new file mode 100644 index 0000000..0b65c6b --- /dev/null +++ b/app/src/helpers/wandb_registry.py @@ -0,0 +1,9 @@ +import wandb + +def publish_model(model_path, project, name, model_type="model"): + run = wandb.init(project=project, job_type="model-publishing") + artifact = wandb.Artifact(name, type=model_type) + artifact.add_dir(model_path) + run.log_artifact(artifact) + run.finish() + print(f"Published {name} to W&B")