wandb.restore(filename) will restore a file into your run. It returns a local file object open for reading.
wandb.restore accepts a few keyword arguments:
- run_path — String telling the run to pull from in the format '$ENTITY_NAME/$PROJECT_NAME/$RUN_NAME' or '$PROJECT_NAME/$RUN_NAME' (default: current entity, project and run)
A common usecase is resuming from a checkpoint in the case of failure.
Another common use is to restore the model file from a previous run.
if args.restore: wandb.restore('model.h5') # restore from a checkpoint, resuming must be configured weights = wandb.restore('best.h5', run_path="vanpelt/html/a1b2c3d") model.load(weights.name)