Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
ASR-TTS Models: Support hybrid RNNT-CTC, improve docs. #6620
ASR-TTS Models: Support hybrid RNNT-CTC, improve docs. #6620
Changes from 11 commits
0eb3b4a
27a9ada
9344120
8461a63
99ac726
a09abce
0de5855
cf28a98
c98a571
0ea95b7
736a3e1
1652ea5
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How would you check if import was successful or not ? We use a bool flag like HAS_APEX or NUMBA to be able to determine if the module could be imported or not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I just wanted to suppress missing import. I use it only for annotation purposes ("Normalizer" is not a valid annotation if
Normalizer
is not imported!), but I don't care if it is missing (TTS model will fail with the appropriate message).This doesn't sacrifice usability, but still will work in all cases.
If I need some library to be explicitly used, I thought about something like
@k2_required
decorators, which will allow to import everything-everywhere, but will raise an error if the method is called/ class is instantiated.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import_guard
is removedThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except (ImportError, ModuleNotFoundError):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
ModuleNotFoundError
is a subclass ofImportError
.So, it will be catched:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import_guard
is removed