🌟
wandbでcodeを保存する方法メモ
.venvは重いので除外する
import os
import wandb
wandb.init(
entity="hoge",
project="hogehoge",
name="run_name",
group="group_name",
config=vars(args),
job_type="your job type"
)
wandb.run.log_code(
".",
exclude_fn=lambda path, root: any(
os.path.relpath(path, root).startswith(exclude_dir)
for exclude_dir in [".venv/", "wandb/"]
),
)
Discussion