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

feat: prevent user from deleting model when inUse #1321

Merged

Conversation

axel7083
Copy link
Contributor

@axel7083 axel7083 commented Jul 2, 2024

What does this PR do?

Improve the Models page by changing the StatusIcon depending on the model usage.

When the model is used by an inference server, it is marked as USED. A model which is downloaded has a title DOWNLOADED.

The delete button is also disabled when model is inUse

Screenshot / video of UI

image

image

image

What issues does this PR fix or reference?

Fixes #791

How to test this PR?

  • Unit tests has been provided

@axel7083 axel7083 requested review from benoitf, jeffmaury and a team as code owners July 2, 2024 16:08
@axel7083 axel7083 requested review from feloy and lstocchi July 2, 2024 16:10
Copy link
Contributor

@lstocchi lstocchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, maybe we should use a different color to differentiate downloaded vs none so it is clearly visible without hovering the icon.

@axel7083
Copy link
Contributor Author

axel7083 commented Jul 3, 2024

LGTM, maybe we should use a different color to differentiate downloaded vs none so it is clearly visible without hovering the icon.

Since we will be using StatusIcon from the ui lib, we do not have much choice :(

@axel7083 axel7083 force-pushed the feature/prevent-model-deletion-in-use branch from 4bb1dae to 09a3a28 Compare July 3, 2024 09:12
@axel7083 axel7083 merged commit 1024cee into containers:main Jul 3, 2024
4 checks passed
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

Successfully merging this pull request may close these issues.

Prevent from deleting a model which is currently being used
3 participants