Skip to content
Snippets Groups Projects

Fix LM loading error

Merged Yoann Schneider requested to merge fix-lm-usage-pathlib into master

Fixes https://demo.arkindex.org/process/13d1c2ad-d7e0-4a6f-9ef5-0f86bccecbeb/0

TypeError: __init__(): incompatible constructor arguments. The following argument types are supported:
    1. torchaudio.flashlight_lib_text_dictionary.Dictionary()
    2. torchaudio.flashlight_lib_text_dictionary.Dictionary(filename: str)
    3. torchaudio.flashlight_lib_text_dictionary.Dictionary(tkns: List[str])
Invoked with: PosixPath('/data/current/tokens.txt')

The CTC loader, only used when the model needs a LM, expects either str or List[str] and doesn't like our PosixPath instances here.

So for now I cast these to str.

Merge request reports

Checking pipeline status.

Merged by Yoann SchneiderYoann Schneider 1 year ago (May 22, 2023 11:44am UTC)

Loading

Pipeline #103602 passed

Pipeline passed for 4b051bba on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading