wandb / wandb

The AI developer platform. Use Weights & Biases to train and fine-tune models, and manage models from experimentation to production.
https://wandb.ai
MIT License
9.21k stars 675 forks source link

[App]: Can delete runs but not projects via the API #7036

Open jaanli opened 9 months ago

jaanli commented 9 months ago

Current Behavior

Can delete runs with:

import wandb

runs = wandb.Api().runs("<entity-name>/<project-name>")
for run in runs:
    run.delete()

But it does not work for .

Currently to automate this I need to use Playwright to automatically check the buttons, type in the name of the project, and click confirm (https://playwright.dev/docs/input#checkboxes-and-radio-buttons). It would be nice to remove this automation step.

It seems like others are also experiencing this issue: https://community.wandb.ai/t/delete-a-projet-with-the-api-or-some-other-programmatic-way/4842

Expected Behavior

Being able to delete a project via API like it is possible for runs.

Steps To Reproduce

Use GPT-4 or Gemini to create a short script to check the boxes, get the names from project HTML elements, type in the names, and delete: https://community.wandb.ai/t/delete-a-projet-with-the-api-or-some-other-programmatic-way/4842

Screenshots

No response

Environment

OS: Mac

Browsers: Firefox

Version: Latest

Additional Context

Thank you!! This will make debugging go a lot faster :)

jaanli commented 9 months ago

Here's an attempt at automating this for a large number of projects: https://gist.github.com/jaanli/7bca5425a0f21d1e27cd618e9692460a

thanos-wandb commented 9 months ago

Hi @jaanli thank you for writing in, and for your gist contribution. There's an alternative way to delete projects using our Graph QL scheme. Let me know if you would be interested in that solution.

jaanli commented 9 months ago

Thanks so much @thanos-wandb ! Seeing the Graph QL scheme would be helpful, thank you 🙏

thanos-wandb commented 9 months ago

Hi @jaanli, after an internal discussion with our Infrastructure team, we've decided that it would be best for the Graph QL mutation to delete the project to be routed through our API, instead of being executed directly. Given that you currently have an effective workaround using Playwright, and I've documented this as a feature request, we will mark this ticket as on-hold on our end. Thank you for your contribution!