Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete example tasks, projects, and models from ClearML server #774

Closed
fjean opened this issue Sep 7, 2022 · 14 comments
Closed

Delete example tasks, projects, and models from ClearML server #774

fjean opened this issue Sep 7, 2022 · 14 comments

Comments

@fjean
Copy link
Contributor

fjean commented Sep 7, 2022

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?

@ainoam
Copy link
Collaborator

ainoam commented Sep 7, 2022

Hi @fjean, In which way are these examples getting in your way? Is this about conserving resources or de-cluttering the UI?

@fjean
Copy link
Contributor Author

fjean commented Sep 7, 2022

@ainoam Yeah it's more about de-cluttering the UI, I don't think they consume that much resources

@ainoam
Copy link
Collaborator

ainoam commented Sep 7, 2022

@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?

@fjean
Copy link
Contributor Author

fjean commented Sep 7, 2022

@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)

@maria8899
Copy link

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.

@ainoam
Copy link
Collaborator

ainoam commented Nov 10, 2022

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 ?

@fjean
Copy link
Contributor Author

fjean commented Nov 10, 2022

@ainoam That would make sense to have that option in the UI.

@ainoam
Copy link
Collaborator

ainoam commented Nov 17, 2022

@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?

@maria8899
Copy link

maria8899 commented Nov 18, 2022

Yes! Thank you!

@pollfly
Copy link
Contributor

pollfly commented Jan 23, 2023

Hey @fjean! clearml-server v1.9.0 is now out with a user option to not show example content in the UI

@fjean
Copy link
Contributor Author

fjean commented Jan 25, 2023

@pollfly thanks!

@maria8899
Copy link

maria8899 commented Mar 7, 2023

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!

@DominikMa
Copy link

DominikMa commented May 8, 2024

Here is what I did:

  1. Expose Mongo DB port in docker-compose file by adding
    ports:
     - "27017:27017"
    
  2. Connect with any DB Tool or with mongo cli
  3. Get your company id from the user collection of the backend db
  4. Add this company id to all tasks, models and projects in the task, project and model collections
  5. Change the status for all tasks in the task collection to created
  6. Archive and delete all experiments, models and reports in the Web GUI
  7. 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.
  8. 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.

@jkhenning
Copy link
Member

Closing this as this is not expected to be supported and a community suggestion is provided above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants