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

hybrid_rnnt_ctc_bpe model has no inference code #8687

Closed
aidos-aiforiatech opened this issue Mar 18, 2024 · 1 comment
Closed

hybrid_rnnt_ctc_bpe model has no inference code #8687

aidos-aiforiatech opened this issue Mar 18, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@aidos-aiforiatech
Copy link

Describe the bug

I am training examples/asr/asr_hybrid_transducer_ctc/speech_to_text_hybrid_rnnt_ctc_bpe.py.

I cannot run the inference obtaining the following exception:

Error executing job with overrides: ['model_path=results/UZB_MCV_ISSAI_V2/2024-03-15_16-25-00/checkpoints/UZB_MCV_ISSAI_V2.[8/1287$
pretrained_name=null', 'dataset_manifest=/home/aidos/datasets/tbc_test.json', 'batch_size=32', 'output_filename=results/UZB_MCV_ISS
AI_V2/2024-03-15_16-25-00/tbc_test_pred.json']                                                                                     
Traceback (most recent call last):                                                                                                 
  File "/home/aidos/exp/NeMo/examples/asr/speech_to_text_eval.py", line 225, in <module>                                           
    main()  # noqa pylint: disable=no-value-for-parameter                                                                          
  File "/home/aidos/exp/Nemo_inf/NeMo/nemo/core/config/hydra_runner.py", line 129, in wrapper                                      
    _run_hydra(                                                                                                                    
  File "/home/aidos/nemo_inference_venv/lib/python3.10/site-packages/hydra/_internal/utils.py", line 394, in _run_hydra            
    _run_app(
  File "/home/aidos/nemo_inference_venv/lib/python3.10/site-packages/hydra/_internal/utils.py", line 457, in _run_app
    run_and_report(
  File "/home/aidos/nemo_inference_venv/lib/python3.10/site-packages/hydra/_internal/utils.py", line 223, in run_and_report
    raise ex
  File "/home/aidos/nemo_inference_venv/lib/python3.10/site-packages/hydra/_internal/utils.py", line 220, in run_and_report
    return func()
  File "/home/aidos/nemo_inference_venv/lib/python3.10/site-packages/hydra/_internal/utils.py", line 458, in <lambda>
    lambda: hydra.run(
  File "/home/aidos/nemo_inference_venv/lib/python3.10/site-packages/hydra/_internal/hydra.py", line 132, in run
    _ = ret.return_value
  File "/home/aidos/nemo_inference_venv/lib/python3.10/site-packages/hydra/core/utils.py", line 260, in return_value
    raise self._return_value
  File "/home/aidos/nemo_inference_venv/lib/python3.10/site-packages/hydra/core/utils.py", line 186, in run_job
    ret.return_value = task_function(task_cfg)
  File "/home/aidos/exp/NeMo/examples/asr/speech_to_text_eval.py", line 125, in main
    transcription_cfg = transcribe_speech.main(cfg)  # type: EvaluationConfig
  File "/home/aidos/exp/Nemo_inf/NeMo/nemo/core/config/hydra_runner.py", line 75, in wrapper
    return task_function(cfg_passthrough)
  File "/home/aidos/exp/NeMo/examples/asr/transcribe_speech.py", line 393, in main
    transcriptions = asr_model.transcribe(audio=filepaths, override_config=override_cfg,)
  File "/home/aidos/nemo_inference_venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs) 
TypeError: EncDecHybridRNNTCTCModel.transcribe() got an unexpected keyword argument 'override_config'

Steps/Code to reproduce bug

python ${NEMO_ROOT}/examples/asr/speech_to_text_eval.py \
    model_path=${MODEL} \
    pretrained_name=null \
    dataset_manifest=${TEST_MANIFEST} \
    batch_size=${BATCH_SIZE} \
    output_filename=${OUTPUT_MANIFEST} \
    amp=False \
    use_cer=False)

Expected behavior

An inference process

Environment overview (please complete the following information)

  • Environment location: GCP
  • Method of NeMo install: pip install

Environment details

If NVIDIA docker image is used you don't need to specify these.
Otherwise, please provide:

  • Ubuntu 22.04
  • PyTorch 2.2.1
  • Python 3.10.0

Additional context

Add any other context about the problem here.
This is the hybrid RNNT CTC model.

@aidos-aiforiatech aidos-aiforiatech added the bug Something isn't working label Mar 18, 2024
@titu1994
Copy link
Collaborator

You are using the main branch Nemo inference scro "transcribe_search.py" whole having Nemo 1.23 or lower installed, that will not work.

Switch your branch to r1.23.0, then use the inference script in that version.

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

No branches or pull requests

2 participants