-
Notifications
You must be signed in to change notification settings - Fork 884
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: model remove cmd #1128
feat: model remove cmd #1128
Conversation
62248cd
to
d99bf7d
Compare
d99bf7d
to
a123b82
Compare
llama_stack/cli/model/remove.py
Outdated
|
||
def _ask_for_confirm(model) -> bool: | ||
input_text = input(f"Are you sure you want to remove {model}? (y/n): ").strip().lower() | ||
if input_text == "y": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need this function at all. you can simply change this to say:
if input("....").lower() == "y":
at the callsite
llama_stack/cli/model/remove.py
Outdated
if args.force: | ||
_remove_model(args.model) | ||
else: | ||
confirm = _ask_for_confirm(args.model) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
before asking for confirmation or doing anything you should check if the model is legitimate and if the directory even exists or not
a123b82
to
20a101e
Compare
Signed-off-by: reidliu <[email protected]>
Signed-off-by: reidliu <[email protected]>
Signed-off-by: reidliu <[email protected]>
Signed-off-by: reidliu <[email protected]>
20a101e
to
71c737d
Compare
What does this PR do?
[Provide a short summary of what this PR does and why. Link to relevant issues if applicable.]
add a subcommand, help to clean the unneeded model:
Test Plan
[Describe the tests you ran to verify your changes with result summaries. Provide clear instructions so the plan can be easily re-executed.]