Skip to content

Conversation

@harisankarh
Copy link
Contributor

@harisankarh harisankarh commented Oct 24, 2019

Added grid search-based alpha-beta hyper param tuning code in jasper_infer.py. Incorporated suggestions from pull request #55.

Added following changes:

  • beam_width parameter to override default 128
  • alpha_step, beta_step parameters to define steps for grid search
  • rename alpha_from/beta_from to just alpha/beta so that it is possible to do inference with a single set of alpha/beta values (without tuning over a grid)

Signed-off-by: Hariankar H [email protected]

checkpoint_dir=checkpoint_dir,
)

greedy_hypotheses = post_process_predictions(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is no need to add greedy_hypotheses here for each round evaluation of alpha & beta.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Slyne thanks for pointing it out. Removed it.

@okuchaiev
Copy link
Collaborator

the CI fails because of PEP8 issue:

Could you please run "pycodestyle" before the check-in? (see below)

+ pycodestyle . --exclude=./scripts/get_librispeech_data.py,./scripts/process_beam_dump.py,./tests/other/jasper.py,./tests/other/jasper_zero_dl.py,./collections/nemo_nlp/nemo_nlp/utils/metrics/sacrebleu.py,./collections/nemo_nlp/nemo_nlp/utils/metrics/fairseq_tokenizer.py,./nemo/setup.py,./docs/sources/source/conf.py,./docs/sources/source/tutorials/infer.py,./docs/sources/source/tutorials/test.py,./collections/nemo_nlp/build

./examples/asr/jasper_infer.py:254:1: E305 expected 2 blank lines after class or function definition, found 1

script returned exit code 1

Signed-off-by: Hariankar H <[email protected]>
@harisankarh
Copy link
Contributor Author

fixed the pep8 issues

@blisc
Copy link
Collaborator

blisc commented Oct 25, 2019

Do you plan on using the infer mode? If not, I plan on removing infer mode and renaming the file to jasper_eval.py since the intended use case for that file is mainly eval.

@blisc blisc merged commit 7a16824 into NVIDIA-NeMo:master Oct 25, 2019
This was referenced Oct 25, 2019
dcurran90 pushed a commit to dcurran90/NeMo that referenced this pull request Oct 15, 2024
The PR add configuration to the CLI and provides
default configuration file.

Signed-off-by: Martin Hickey <[email protected]>
blisc pushed a commit that referenced this pull request May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants