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

fix: image_name defaults to none #1226

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

cdoern
Copy link
Contributor

@cdoern cdoern commented Feb 24, 2025

What does this PR do?

since --image-name has a default of None, often a user can get llamastack-None when using environments like venv and container.

currently, the image_name is llamastack- with the value of the flag or the current conda environment. Change this to be either the value of the flag OR the current image_type. So now the default image names are things like:

llamastack-venv
llamastack-conda
llamastack-container

Closes #1131

Test Plan

tested locally and checked created environments

if not image_name:
image_name = args.image_type
print(
f"No image name provided and could not detect one from environment. Using image_name: llamastack-{image_name}"
Copy link
Contributor

Choose a reason for hiding this comment

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

The log message and the code behave differently - while the code sets args.image_type to image_name, the log message includes a “llamastack-” prefix. Isn’t that a bit confusing?

Copy link
Contributor Author

@cdoern cdoern Feb 24, 2025

Choose a reason for hiding this comment

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

True, I was doing this because it seems in the interactive mode a default of llamastack-name is used. I will switch this to be image_name = f"llamastack-{args.image_type}" for continuity

since `--image-name` has a default of None, often a user can get `llamastack-None` when using environments like venv and container.

currently, the image_name is llamastack- with the value of the flag or the current conda environment. Change this to be either the value of the flag OR the current image_type. So now the default image names are things like:

`llamastack-venv`
`llamastack-conda`
`llamastack-container`

Signed-off-by: Charlie Doern <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

llama stack build and llama stack run are not symmetric for --image-name argument when venv is used
3 participants