SeanNaren / deepspeech.pytorch

Speech Recognition using DeepSpeech2.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hydra error : config_path is not specified in @hydra.main()

StephennFernandes opened this issue · comments

I tried running the script as mentioned in the readme file, for a custom dataset. ran everythin precisely and as mentioned, but still i get the error
config_path is not specified in @hydra.main() it seems its a new Hydra issue, i am not so fimilar with hydra, could you please show me a feasiable solution

here is the entire track of the problem
train.py:19: UserWarning: config_path is not specified in @hydra.main(). See https://hydra.cc/docs/next/upgrades/1.0_to_1.1/changes_to_hydra_main_config_path for more information. @hydra.main(config_name="config") /home/stephen/anaconda3/lib/python3.8/site-packages/hydra/_internal/defaults_list.py:251: UserWarning: In 'config': Defaults list is missing self. See https://hydra.cc/docs/upgrades/1.0_to_1.1/default_composition_order for more information warnings.warn(msg, UserWarning) Global seed set to 123456 Error executing job with overrides: ['data.train_path=data/train_manifest.json', 'data.val_path=data/val_manifest.json'] Traceback (most recent call last): File "train.py", line 25, in <module> hydra_main() File "/home/stephen/anaconda3/lib/python3.8/site-packages/hydra/main.py", line 48, in decorated_main _run_hydra( File "/home/stephen/anaconda3/lib/python3.8/site-packages/hydra/_internal/utils.py", line 377, in _run_hydra run_and_report( File "/home/stephen/anaconda3/lib/python3.8/site-packages/hydra/_internal/utils.py", line 214, in run_and_report raise ex File "/home/stephen/anaconda3/lib/python3.8/site-packages/hydra/_internal/utils.py", line 211, in run_and_report return func() File "/home/stephen/anaconda3/lib/python3.8/site-packages/hydra/_internal/utils.py", line 378, in <lambda> lambda: hydra.run( File "/home/stephen/anaconda3/lib/python3.8/site-packages/hydra/_internal/hydra.py", line 111, in run _ = ret.return_value File "/home/stephen/anaconda3/lib/python3.8/site-packages/hydra/core/utils.py", line 233, in return_value raise self._return_value File "/home/stephen/anaconda3/lib/python3.8/site-packages/hydra/core/utils.py", line 160, in run_job ret.return_value = task_function(task_cfg) File "train.py", line 21, in hydra_main train(cfg=cfg) File "/home/stephen/Desktop/Konkani_DeepSpeech2/deepspeech.pytorch/deepspeech_pytorch/training.py", line 25, in train checkpoint_callback = FileCheckpointHandler( File "/home/stephen/Desktop/Konkani_DeepSpeech2/deepspeech.pytorch/deepspeech_pytorch/checkpoint.py", line 16, in __init__ super().__init__( TypeError: __init__() got an unexpected keyword argument 'prefix'

@SeanNaren could you please provide me with a possible solution

Facing a similar issue when calling python transcribe.py model.model_path=./models/an4_pretrained_v3.ckpt audio_path=./test_voice.wav:

transcribe.py:11: UserWarning: 
config_path is not specified in @hydra.main().
See https://hydra.cc/docs/next/upgrades/1.0_to_1.1/changes_to_hydra_main_config_path for more information.
  @hydra.main(config_name="config")
Error executing job with overrides: ['model.model_path=./models/an4_pretrained_v3.ckpt', 'audio_path=./test_voice.wav']
Traceback (most recent call last):
  File "transcribe.py", line 13, in hydra_main
    transcribe(cfg=cfg)
  File "/Users/saadbazaz/Projects/deepspeech.pytorch/deepspeech_pytorch/inference.py", line 49, in transcribe
    model_path=cfg.model.model_path
  File "/Users/saadbazaz/Projects/deepspeech.pytorch/deepspeech_pytorch/utils.py", line 31, in load_model
    model = DeepSpeech.load_from_checkpoint(hydra.utils.to_absolute_path(model_path))
  File "/Users/saadbazaz/opt/anaconda3/envs/transcription/lib/python3.7/site-packages/pytorch_lightning/core/saving.py", line 153, in load_from_checkpoint
    model = cls._load_model_state(checkpoint, *args, strict=strict, **kwargs)
  File "/Users/saadbazaz/opt/anaconda3/envs/transcription/lib/python3.7/site-packages/pytorch_lightning/core/saving.py", line 190, in _load_model_state
    model = cls(*cls_args, **cls_kwargs)
  File "/Users/saadbazaz/Projects/deepspeech.pytorch/deepspeech_pytorch/model.py", line 207, in __init__
    target_decoder=self.evaluation_decoder
TypeError: Can't instantiate abstract class WordErrorRate with abstract methods forward

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

Will try to get to this ASAP!

commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.