-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Dynamic selection of function given an argument fails with an AttributeError
#467
Comments
The bug is something simple and would be fixed with #468.
Unfortunately this is not how it currently works. All arguments are shown in the help, under "Conditional arguments" groups.
This would be rather complex to implement. One issue is that
It is capable of identifying conditional parameters. Though not specific enough to group it by dependence on other parameter values.
I would say that |
Thank you for the quick fix Mauricio! The |
🐛 Bug report
I am trying to setup a CLI system where I have a multitude of subcommands (only 1 in the repro code,
finetune
) and some of them take a--method
argument that allows selecting a different function.See Lightning-AI/litgpt#996 for the real purpose of this.
To reproduce
Expected behavior
The ideal behaviour would be that
python repro.py -h
only lists the method argument:And then when one does
python repro.py --method B -h
then it also shows:I don't know if the AST is smart enough to parse the
*args, **kwargs
specific to the method selected.I'm happy to try out a different way to support CLI behaviour like this, if there are better ways to approach this problem.
Environment
The text was updated successfully, but these errors were encountered: