Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions slime/slime/utils/arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -1179,6 +1179,7 @@ def add_wandb_arguments(parser):
help="Whether to turn on passrate logging, which will log the pass@n of the responses in the rollout.",
)
parser.add_argument("--wandb-run-id", type=str, default=None)
parser.add_argument("--wandb-resume", type=str, default="allow")
return parser

# tensorboard
Expand Down
7 changes: 7 additions & 0 deletions slime/slime/utils/wandb_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ def init_wandb_primary(args):
"config": _compute_config_for_logging(args),
}

# When resuming training, continue logging to the same W&B run if a run id is provided
wandb_run_id = getattr(args, "wandb_run_id", None)
if wandb_run_id is not None:
init_kwargs["id"] = wandb_run_id
init_kwargs["resume"] = args.wandb_resume
logger.info("Resuming W&B run %s with resume=%s", wandb_run_id, args.wandb_resume)

# Configure settings based on offline/online mode
if offline:
init_kwargs["settings"] = wandb.Settings(mode="offline")
Expand Down
8 changes: 5 additions & 3 deletions toolcall-rl/retool_qwen3_4b_rl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ HF_CKPT=${HF_CKPT:-/data_storage/wyj/systems/huggingface/hub/qwen3-4b-retool-sft
REF_LOAD=${REF_LOAD:-/data_storage/wyj/systems/huggingface/hub/qwen3-4b-retool-sft_torch_dist}
SAVE_CKPT=${SAVE_CKPT:-/data_storage/wyj/OpenClaw-RL/ckpt/qwen3-4b-retool-rl/}
RESUME_LOAD=${RESUME_LOAD:-${SAVE_CKPT}}
# Use the existing run id to continue plotting on the same W&B curve.
#WANDB_RESUME=${WANDB_RESUME:-must}


CKPT_ARGS=(
--hf-checkpoint ${HF_CKPT}
Expand Down Expand Up @@ -136,6 +135,9 @@ WANDB_ARGS=(
--wandb-project slime_retool
--wandb-group qwen3-4B-rl_retool
--wandb-key ${WANDB_KEY}
# Use the existing run id to continue plotting on the same W&B curve.
# --wandb-run-id <existing_run_id>
# --wandb-resume must
)

SGLANG_ARGS=(
Expand Down Expand Up @@ -192,4 +194,4 @@ ray job submit --address="http://127.0.0.1:8265" \
${EVAL_ARGS[@]} \
${SGLANG_ARGS[@]} \
${MISC_ARGS[@]} \
${CUSTOM_ARGS[@]}
${CUSTOM_ARGS[@]}