liquid-audio icon indicating copy to clipboard operation
liquid-audio copied to clipboard

Bug: `NameError: name 'OrderedDict' is not defined` in `conformer/encoder.py`

Open itsPronay opened this issue 8 months ago • 1 comments

What happened

When attempting to trace the model in qualcom_ai_hub with torch.jit.trace or torch.onnx.export, the following error is thrown:

NameError: name 'OrderedDict' is not defined
  File "/usr/local/lib/python3.12/dist-packages/liquid_audio/model/conformer/encoder.py", line 221, in input_types
    return OrderedDict(

Root cause

OrderedDict is used in encoder.py line 221 inside the input_types property, but from collections import OrderedDict is missing at the top of the file.

Expected fix

Should add missing import at the top of liquid_audio/model/conformer/encoder.py:

from collections import OrderedDict

itsPronay avatar Mar 10 '26 10:03 itsPronay

@ArthurBook @haerski please take a look here

itsPronay avatar Mar 10 '26 10:03 itsPronay