How to set the environment variable WANDB_IGNORE_GLOBS correctly?

The usage in the Docs is:

Set this to a comma separated list of file globs to ignore. These files will not be synced to the cloud

So, is the below code correct?

os.environ['WANDB_IGNORE_GLOBS'] = '[*.pth, *.npy]'

The code seems to be incorrect because the *.npy files still be uploaded (the *.pth files are ignored successfully).

Hi @geyao thank you for writing in! Could you please check if the following would work for you?

os.environ['WANDB_IGNORE_GLOBS'] = '*.pth,*.npy'

Thanks for your reply, it works! I also find that it fails if there are spaces after the comma separator.

Great to hear @geyao this now works - and thanks for adding the additional information, indeed I confirmed it won’t work with spaces in between. Have a great weekend!