question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: __init__() got an unexpected keyword argument 'prefix'

See original GitHub issue

Even after tackling the Hydra errors by using export HYDRA_FULL_ERROR=1, the next hurdle stands here.

Traceback (most recent call last):
  File "train.py", line 25, in <module>
    hydra_main()
  File "/home/anaconda3/lib/python3.7/site-packages/hydra/main.py", line 37, in decorated_main
    strict=strict,
  File "/home/anaconda3/lib/python3.7/site-packages/hydra/_internal/utils.py", line 347, in _run_hydra
    lambda: hydra.run(
  File "/home/anaconda3/lib/python3.7/site-packages/hydra/_internal/utils.py", line 201, in run_and_report
    raise ex
  File "/home/anaconda3/lib/python3.7/site-packages/hydra/_internal/utils.py", line 198, in run_and_report
    return func()
  File "/home/anaconda3/lib/python3.7/site-packages/hydra/_internal/utils.py", line 350, in <lambda>
    overrides=args.overrides,
  File "/home/anaconda3/lib/python3.7/site-packages/hydra/_internal/hydra.py", line 112, in run
    configure_logging=with_log_configuration,
  File "/home/anaconda3/lib/python3.7/site-packages/hydra/core/utils.py", line 127, in run_job
    ret.return_value = task_function(task_cfg)
  File "train.py", line 21, in hydra_main
    train(cfg=cfg)
  File "/home/deepspeech.pytorch-master/deepspeech_pytorch/training.py", line 26, in train
    cfg=cfg.checkpoint
  File "/home/deepspeech.pytorch-master/deepspeech_pytorch/checkpoint.py", line 26, in __init__
    prefix=cfg.prefix
TypeError: __init__() got an unexpected keyword argument 'prefix'

Assistance Required.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:14

github_iconTop GitHub Comments

4reactions
elch10commented, Jun 19, 2021

@kanuarj try also when running use command line parameter trainer.gpus

I have 1 gpu and I use so python train.py data.train_path=... data.val_path=... trainer.gpus=1. By ... I mean some paths.

I think if you don’t have any gpus, trainer.gpus=0 might work.

2reactions
elch10commented, Jun 19, 2021

@kanuarj if you type python train.py -h, you’ll see list of all parameters.

There is model parameters:

model:
  rnn_type: lstm
  hidden_size: 1024
  hidden_layers: 5

Try to reduce them. E.g. using cmd parameters model.hidden_size=128 and model.hidden_layers=1 among with reduced batch size.

But I see you have 5 GB on GPU, it’s not sufficient for model with default hyperparameters. You can increase/decrease this hyperparameters until errors disappear.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Forms error - __init__() got an unexpected keyword argument ...
I have two forms and they have init and when i remove it from form then prefix work's correct. My forms.py class ClientUserCreateForm(forms....
Read more >
APIRouter: unexpected keyword argument 'prefix' · Issue #2726
Issue. I was following the official tutorial related to bigger applications and came across a TypeError with all the parameters to APIRouter().
Read more >
Generic Inline fails (unexpected keyword argument `prefix`)
I got a type exception saying, "init() got an unexpected keyword argument 'prefix'". I found out that it was caused by a GenericTabularInline, ......
Read more >
init__() got an unexpected keyword argument 'prefix'-django
Coding example for the question Forms error - __init__() got an unexpected keyword argument 'prefix'-django.
Read more >
TypeError: __init__() got an unexpected keyword argument ...
After completing all the procedure, the following error was thrown while running run.py TypeError: init() got an unexpected keyword argument ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found