clearml
clearml copied to clipboard
Delete example tasks, projects, and models from ClearML server
Trying to remove the example tasks, projects, and models from ClearML server (Docker image), but it cannot be done from the UI, so I tried to do it using the API:
from clearml.backend_api.session.client import APIClient
client = APIClient()
print(client.tasks.get_all())
# Select one of the shown task IDs
client.tasks.delete("e8e09741583b4a0499baf588eb3f8bdb", force=True)
But I get this error:
APIError: APIError: code 403/21: Forbidden (modification not allowed) (cannot modify public task(s), ids=('e8e09741583b4a0499baf588eb3f8bdb',))
Is there something else I need to do for removing all those examples?
Hi @fjean, In which way are these examples getting in your way? Is this about conserving resources or de-cluttering the UI?
@ainoam Yeah it's more about de-cluttering the UI, I don't think they consume that much resources
@fjean Gotcha. Indeed there's currently no easy way to remove these examples. Have you noticed that as you create more projects, the examples get pushed away out of view?
@ainoam Yes indeed, so they should appear at the bottom of the list, eventually.
That would still be a good feature to add to the server, to be able to remove these examples (maybe by just making them normal projects/tasks/models that can be dealt with like any other user-generated items)
I agree, it would be great to be able to delete them to declutter the UI. I want to go to my project without having to look for the right folder. They actually don't provide any value if you know how clear ml works.
Thanks for chiming in @maria8899.
I think we'll add a "hide examples" control to the UI Settings page in one of the coming versions - Does that makes sense? @fjean ?
@ainoam That would make sense to have that option in the UI.
@maria8899 @fjean One of the coming UI releases will have a user option to choose whether or not to show these built-in examples. Makes sense?
Yes! Thank you!
Hey @fjean! clearml-server v1.9.0 is now out with a user option to not show example content in the UI
@pollfly thanks!
Hi there @ainoam @pollfly, I am using version 1.9.2, I've checked the user option "dont show examples", but now it also shows this new "DevOps Services" project example that is not my work!
Ok this one I can delete it so I guess it's fine!
Here is what I did:
- Expose Mongo DB port in docker-compose file by adding
ports: - "27017:27017"
- Connect with any DB Tool or with mongo cli
- Get your
company
id from theuser
collection of thebackend
db - Add this
company
id to all tasks, models and projects in thetask
,project
andmodel
collections - Change the status for all tasks in the
task
collection tocreated
- Archive and delete all experiments, models and reports in the Web GUI
- There are two datasets remaining which I can not find in the Web GUI. Find their ids in the
task
collection in the db and change their status to draft. - Delete them by using
clearml-data delete --id DATASET_ID
That way I got a nice and clean setup. Don't forget to remove the exposed mongo port from the compose file.
Closing this as this is not expected to be supported and a community suggestion is provided above