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

Trainer.add_argparse_args not recognizing type #1343

Closed
kunshouout opened this issue Apr 2, 2020 · 2 comments
Closed

Trainer.add_argparse_args not recognizing type #1343

kunshouout opened this issue Apr 2, 2020 · 2 comments
Labels
bug Something isn't working help wanted Open to be worked on

Comments

@kunshouout
Copy link

🐛 Bug

Following the guide, I added trainer args into the parser:

  parser = Trainer.add_argparse_args(parser)
   trainer = Trainer.from_argparse_args(args)

$ python main.py --gpus 1 --max_epochs 64 --arbitrary_trainer_arg some_value

Then I got error:
TypeError: 'str' object cannot be interpreted as an integer

It's because max_epochs is "str" rather than "int". I think an easy fix would be adding type-info in parser.add_argument in Trainer.add_argparse_args.

@kunshouout kunshouout added bug Something isn't working help wanted Open to be worked on labels Apr 2, 2020
@github-actions
Copy link
Contributor

github-actions bot commented Apr 2, 2020

Hi! thanks for your contribution!, great first issue!

@alexeykarnachev
Copy link
Contributor

Hi!. I think, It's solved here
#1139

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Open to be worked on
Projects
None yet
Development

No branches or pull requests

3 participants