RNN-T#7
Conversation
ec3838d to
4610468
Compare
| try: | ||
| stt: Union[SpeechToText, None] = None | ||
| stt = build(stt_cfg) | ||
| except AttributeError: | ||
| warnings.warn( | ||
| "This test has been (partially) disabled. TODO: remove this \ | ||
| exception catching." | ||
| ) | ||
| if stt is not None: | ||
| assert isinstance(stt, SpeechToText) | ||
| assert isinstance(stt, SeqToSeq) | ||
| warnings.warn("SpeechToText only built and not checked if correct") |
There was a problem hiding this comment.
@julianmack - remove this hack? This prevents failing tests when st draws a crossover ctc/rnnt loss and network
| try: | ||
| model, epochs, train_loader, eval_loader = build(task_cfg) | ||
| if model is not None: | ||
| assert isinstance(model, torch.nn.Module) | ||
| else: | ||
| warnings.warn( | ||
| "Not checking if model is returned. Remove above `if` \ | ||
| statement once tests/protos/test_speech_to_text.py has had exception handling removed" | ||
| ) | ||
|
|
||
| assert isinstance(epochs, int) | ||
| assert isinstance(train_loader, torch.utils.data.DataLoader) | ||
| assert isinstance(eval_loader, torch.utils.data.DataLoader) | ||
| warnings.warn("TaskConfig only built and not checked if correct") | ||
| except ValueError as e: | ||
| if str(e) == "unsupported model None": | ||
| warnings.warn(f"Caught error {e}.") | ||
| else: | ||
| raise e |
There was a problem hiding this comment.
@julianmack - remove this hack? This prevents failing tests when st draws a crossover ctc/rnnt loss and network
julianmack
left a comment
There was a problem hiding this comment.
Still to do:
- Refactor decoder
- Add a few tests (rnn w. hidden state and rnn_t loss in particular)
- Remove hacks that prevent stt test failing when there is an rnnt network and ctc loss.
b6de02d to
b5bb579
Compare
samgd
left a comment
There was a problem hiding this comment.
Great to have this working! The largest review theme is to generalise the transduction loss/decoding from being specific to an RNN. Yet to review the builders or tests under the assumption that they will change significantly when updating based on the comments.
samgd
left a comment
There was a problem hiding this comment.
Yet to review the docs, tests, and builders under the assumption that they may change significantly based on comments.
| cd .. && \ | ||
| rm -rf apex | ||
|
|
||
| # install warp-transducer | ||
| ENV CXX=/usr/bin/g++-6 | ||
| ENV CC=/usr/bin/gcc-6 | ||
| RUN make deps/warp-transducer |
There was a problem hiding this comment.
Can both warp-transducer and apex be installed via the Makefile so the Makefile becomes the single point of call for dependency installation?
There was a problem hiding this comment.
It can but in the docs it states that:
The Dockerfile installs NVIDIA Apex, used for mixed precision, using a Python-only build and will omit some Apex features and performance improvements.
and I assumed that this was because CI doesn't like the proper apex build.
This might have been the wrong assumption - should we be using the cpp build for CI?
| - pip=19.2.2=py37_0 | ||
| - pluggy=0.12.0=py_0 | ||
| - pre_commit=1.17.0=py37_0 | ||
| - pre_commit=1.11.2=0 |
There was a problem hiding this comment.
I have worked out what the pre-commit problem was. The pre-commit update from version 1.11.2 -> 1.12 broke the reorder_python_imports integration.
So I've conda installed a more up-to-date version (which updates a few other core packages hence the other edits here)
e7b3438 to
edc1eb3
Compare
…invalid combinations
Adding Transducer (including RNNT model,
transducer_lossandtransducer_decoders). Also added CER calculation.Note that, in order to organise the
speech_to_textbuilder by loss it was necessary to alter the code order (to considerlossbeforemodel) meaning that the following files appear to have many more changes than they actually do:src/myrtlespeech/builders/speech_to_text.pytests/protos/test_speech_to_text.py