Skip to content

Instantly share code, notes, and snippets.

@vuiseng9
Last active January 22, 2022 19:46
Show Gist options
  • Save vuiseng9/cf4799364db8249b1ab5663e09ac8514 to your computer and use it in GitHub Desktop.
Save vuiseng9/cf4799364db8249b1ab5663e09ac8514 to your computer and use it in GitHub Desktop.

Remove files in wandb cloud programmatically via python API

import wandb
api = wandb.Api()
runs = api.runs("<entity>/<project>") # e.g. vchua/huggingface

for run in runs:
    print(run.entity, run.project, run.id, run.name)
    for fff in run.files():
        if fff.name == 'output.log':
            print("to delete, use delete() method of the file object")
            print("  --> ", fff.name)

Specific access to file

run = api.run("<entity>/<project>/<run_id>"
fff = a=run.file('output.log')

Important Notes:

https://wandb.ai/usage/<entity> page does not ordered run by creation time but sorted by size, run id

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment