icefall
icefall copied to clipboard
Use explicit relative imports
- switch from implicit relative imports to explicit relative imports as recommended by Guido: https://peps.python.org/pep-0328/#guido-s-decision
- sort import order using
isort
close #508
Could you please fix the CI errors?
Do the scripts actually run correctly when using relative imports? In my experience, if you use relative imports like that and you run the scripts in the normal way, like python3 pruned_transducer_stateless2/decode.py you get errors like "cannot use relative import because decode.py is not part of a package" (this is from memory, may not be exact). That's why I don't tend to use them.