Skip to content
This repository has been archived by the owner on Oct 13, 2022. It is now read-only.

TypeError: linear_fsa() takes 1 positional argument but 2 were given #90

Open
wangkaisine opened this issue Feb 4, 2021 · 3 comments
Open

Comments

@wangkaisine
Copy link

wangkaisine commented Feb 4, 2021

egs/librispeech/asr/simple_v1/run.sh

python3 ./mmi_mbr_train.py

2021-02-04 22:15:14,543 INFO [mmi_mbr_train.py:552] epoch 0, learning rate 0.001
Traceback (most recent call last):
File "./mmi_mbr_train.py", line 617, in
main()
File "./mmi_mbr_train.py", line 564, in main
global_batch_idx_train=global_batch_idx_train,
File "./mmi_mbr_train.py", line 280, in train_one_epoch
optimizer=optimizer)
File "./mmi_mbr_train.py", line 114, in get_loss
num_graph, den_graph, decoding_graph = graph_compiler.compile(texts, P)
File "/home/wangkaisine/anaconda3/lib/python3.6/site-packages/snowfall-0.1-py3.6.egg/snowfall/training/mmi_mbr_graph.py", line 142, in compile
File "/home/wangkaisine/anaconda3/lib/python3.6/site-packages/snowfall-0.1-py3.6.egg/snowfall/training/mmi_mbr_graph.py", line 187, in build_num_graphs
TypeError: linear_fsa() takes 1 positional argument but 2 were given

@csukuangfj
Copy link
Collaborator

csukuangfj commented Feb 4, 2021

Please use the latest k2.

pip install --pre k2

or install k2 from source.


[EDITED]
You may need to run pip uninstall k2 before running pip install --pre k2.

@csukuangfj
Copy link
Collaborator

pip install -r requirements.txt does not install the latest k2.

@csukuangfj
Copy link
Collaborator

The following link may be helpful:

https://k2.readthedocs.io/en/latest/installation.html

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants