There are two ways to save a file to associate with a run.
Put a file in the wandb run directory, and it will get uploaded at the end of the run.
If you want to sync files as they're being written, you can specify a filename or glob in
Save a model file from the current directory:
Save all files that currently exist containing the substring "ckpt":
Save any files starting with "checkpoint" as they're written to:
The file "model.h5" is saved into the wandb.run.dir and will be uploaded at the end of training.
import wandbwandb.init()model.fit(X_train, y_train, validation_data=(X_test, y_test),callbacks=[wandb.keras.WandbCallback()])model.save(os.path.join(wandb.run.dir, "model.h5"))
You can edit the
wandb/settings file and set ignore_globs equal to a comma separated list of globs. You can also set the WANDB_IGNORE_GLOBS environment variable. A common use case is to prevent the git patch that we automatically create from being uploaded i.e. WANDB_IGNORE_GLOBS=*.patch