Unable to jit script the EncoderClassifier #1691
frankiedrake
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I'm using the
EncoderClassifier(took example from huggingface) this way:EncoderClassifier.from_hparams(source='speechbrain/lang-id-commonlanguage_ecapa')and I want to export it to jit.
First I followed the instructions (3. Post Training Static Quantization), and quantized the model (the size reduced from 80 to 20 Mb btw) and then I'm trying to save it for jit-compilation:
torchscript_model = torch.jit.script(model_static_quantized)but I'm getting an error:
torch.jit.frontend.UnsupportedNodeError: try blocks aren't supported: File "/.../lib/python3.9/site-packages/packaging/version.py", line 48 a valid PEP 440 version or a legacy version. """ try: ~~~ <--- HERE return Version(version) except InvalidVersion:Okay, I followed to the training recipe and removed the usages of this method (
packaging.parse- it just checks the torch version, I left the code suitable for my version) but error remained the same.I also removed pretrainer part from
train_ecapa_tdnn.yamland fromtrain.py- nothing changed.What am I doing wrong?
All reactions