llama-stack icon indicating copy to clipboard operation
llama-stack copied to clipboard

fix(cli): fix behavior of --image-type in llama stack build

Open dolfim-ibm opened this issue 6 months ago • 4 comments
trafficstars

What does this PR do?

[Provide a short summary of what this PR does and why. Link to relevant issues if applicable.]

This PR is fixing the behavior of the llama stack build --image-type=... --config=mybuild.yaml as described in the issue below.

Closes #2162

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.]

dolfim-ibm avatar May 14 '25 15:05 dolfim-ibm

Thanks for the pointers, that was an easy change.

@leseb I noticed that the same CI test is also changing the image_name in build.yaml. Is this needed and intended? From what I saw in the code, the --image-name parameter should work out-the-box.

dolfim-ibm avatar May 15 '25 08:05 dolfim-ibm

Thanks for the pointers, that was an easy change.

@leseb I noticed that the same CI test is also changing the image_name in build.yaml. Is this needed and intended? From what I saw in the code, the --image-name parameter should work out-the-box.

This allows us to test a permutation of the flag and config file options but not intended.

leseb avatar May 15 '25 12:05 leseb

@leseb from the failed test I think my patch is never using the value in the config file, because args.image_type is always set (with a default value to conda).

I think this is the same behavior when the template argument is used, see https://github.com/meta-llama/llama-stack/blob/main/llama_stack/cli/stack/_build.py#L83-L84

Maybe we could set the default CLI argument to None and then set it to "conda" is unset.

dolfim-ibm avatar May 15 '25 14:05 dolfim-ibm

@dolfim-ibm i missed the fact you'd already started this. an alternative is in https://github.com/meta-llama/llama-stack/pull/2179

mattf avatar May 16 '25 01:05 mattf

Fixed in https://github.com/meta-llama/llama-stack/pull/2179, sorry about that!

leseb avatar Jul 03 '25 09:07 leseb