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

Support positional args in LazyEntrypoint._add_overwrite #136

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

Conversation

james77777778
Copy link

Hi team,

I found that nemo_run.cli.entrypoint doesn't support positional args when using CLI, but the docstrings from NeMo imply that it should:

https://github.com/NVIDIA/NeMo/blob/d82f53a23d013cfe6928a514f530b74fc3ab2636/nemo/collections/llm/api.py#L511-L521

# Failed -> ValueError: Invalid overwrite format: llama32_1b
nemo llm import llama3_8b source="hf://meta-llama/Llama-3.1-8B"

# Succeeded
nemo llm import model=llama3_8b source="hf://meta-llama/Llama-3.1-8B"

This PR adds support for positional args by trying to retrieve the argument names first in LazyEntrypoint._add_overwrite.
A corresponding test has been added to verify these changes.

Signed-off-by: Hongyu Chiu <20734616+james77777778@users.noreply.github.com>
@hemildesai hemildesai requested a review from marcromeyn January 16, 2025 02:06
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.

1 participant