You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently using Typer for a project with neural networks. I'd like to start my main script using torch.distributed.launch, which passes the argument "local_rank" to the main script.
python main.py --local_rank=0
However, when doing so Typer complains that this option is unknown. That is due to the standardized conversion of "_" to "-". How can I make my script accept the CLI option "local_rank"?
There is an related issue #341 , however, this deals with command names. In this case, it is about argument names AND I can't influence the way they are passed to my script.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
First Check
Commit to Help
Example Code
Description
Hello everyone,
I'm currently using Typer for a project with neural networks. I'd like to start my main script using torch.distributed.launch, which passes the argument "local_rank" to the main script.
python main.py --local_rank=0
However, when doing so Typer complains that this option is unknown. That is due to the standardized conversion of "_" to "-". How can I make my script accept the CLI option "local_rank"?
There is an related issue #341 , however, this deals with command names. In this case, it is about argument names AND I can't influence the way they are passed to my script.
Operating System
Linux
Operating System Details
No response
Typer Version
0.12.5
Python Version
3.10.14
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions