jd_train/wipe_wandb_by_run_id.sh

18 lines
634 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 1) 准备环境(你已有的先保留)
export WB_ENTITY=hailin
export WANDB_BASE_URL=https://wandb.szaiai.com
export WANDB_API_KEY=local-701636f51b4741d3862007df5cf7f12cca53d8d1
export WANDB_PROJECT=ds-qwen3
export WANDB_RUN_ID=q3-32b-lr2e-5-train1
# 2) 用 Python API 精确删除该 run连 artifacts 一起)
python3 - <<'PY'
import os, wandb
api = wandb.Api(overrides={"base_url": os.environ.get("WANDB_BASE_URL")})
path = f"{os.environ['WB_ENTITY']}/{os.environ['WANDB_PROJECT']}/{os.environ['WANDB_RUN_ID']}"
run = api.run(path)
print("Deleting:", run.name, run.id)
run.delete(delete_artifacts=True)
print("Done.")
PY