Closed solismortis closed 9 months ago
The resume.py
is something slightly more advanced (and kind of deprecated). You should rely on the pointers in docs.
@vwxyzjn Docs are not helpful, as run
and experiment_name
are not defined anywhere before the following part, including algos:
if args.track and wandb.run.resumed:
starting_update = run.summary.get("charts/update") + 1
global_step = starting_update * args.batch_size
api = wandb.Api()
run = api.run(f"{run.entity}/{run.project}/{run.id}")
model = run.file("agent.pt")
model.download(f"models/{experiment_name}/")
agent.load_state_dict(torch.load(
f"models/{experiment_name}/agent.pt", map_location=device))
agent.eval()
print(f"resumed at update {starting_update}")
experiment_name
is now run_name
.
api = wandb.Api()
run = api.run(f"{run.entity}/{run.project}/{run.id}")
run = api.run(f"{run.entity}/{run.project}/{run.id}")
You are trying to define run
with run
that is not defined.
Oh i see. The run is
Here is the reference code https://wandb.ai/costa-huang/cleanRL/runs/21421tda/code?workspace=user-costa-huang
Problem Description
Here. Also, am I supposed to use cleanrl_utils/resume.py instead of what is in the docs?
Checklist
poetry install
(see CleanRL's installation guideline.