Skip to content

Instantly share code, notes, and snippets.

@minpeter
Created June 10, 2025 03:16
Show Gist options
  • Select an option

  • Save minpeter/c4e30f2c13ac1f37b357a41622b429d0 to your computer and use it in GitHub Desktop.

Select an option

Save minpeter/c4e30f2c13ac1f37b357a41622b429d0 to your computer and use it in GitHub Desktop.
Simple example code to add an artifact to wandb and link it with the model registry.
from pathlib import Path
import wandb
run = wandb.init(project="axolotl")
model_path = Path("/data/minpeter/github.com/minpeter/mirco-ko-llama/outputs/tiny-ko-sft/checkpoint-5600")
# 아티팩트로 로그
logged_artifact = run.log_artifact(
model_path,
name="tiny-ko-sft-ckpt-5600", # 아티팩트 이름
type="model"
)
# 레지스트리 모델에 연결
run.link_artifact(
artifact=logged_artifact,
target_path="wandb-registry-model/test"
)
run.finish()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment