magenta / mt3

MT3: Multi-Task Multitrack Music Transcription
Apache License 2.0
1.41k stars 185 forks source link

ImportError #139

Closed Yonglin666 closed 11 months ago

Yonglin666 commented 11 months ago

ImportError Traceback (most recent call last) in <cell line: 14>() 12 import librosa 13 import note_seq ---> 14 import seqio 15 import t5 16 import t5x

5 frames /usr/local/lib/python3.10/dist-packages/flax/core/axes_scan.py in 20 from jax import core 21 from jax import lax ---> 22 from jax.extend import linear_util as lu 23 from jax.interpreters import partial_eval as pe 24 import jax.numpy as jnp

ImportError: cannot import name 'linear_util' from 'jax.extend' (/usr/local/lib/python3.10/dist-packages/jax/extend/init.py)


NOTE: If your import is failing due to a missing package, you can manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the "Open Examples" button below.

bianzuilun commented 11 months ago

I encountered the same problem.

kinoh commented 11 months ago

The module seqio seems to be inconsistent with jax (before the change ?). I fixed it with the following code for now:

import jax.linear_util
jax.extend.linear_util = jax.linear_util
Yuyu0914 commented 11 months ago

该模块seqio似乎与jax更改之前?)不一致。 我现在用以下代码修复了它:

import jax.linear_util
jax.extend.linear_util = jax.linear_util

How do you use it on colab? I don known how to replace the code in module seqio on colab. I try to install jax 0.4.11 instead, but falled.

kinoh commented 11 months ago

How do you use it on colab?

"Setup Environment" installs jax and "Imports and Definitions" imports seqio; so add a code cell between them.

image

And sorry, I misstyped the code above. (Due to my session, although, import jax.linear_util may also be necessary.)

Yonglin666 commented 11 months ago

How do you use it on colab?

"Setup Environment" installs jax and "Imports and Definitions" imports seqio; so add a code cell between them.

image

And sorry, I misstyped the code above. (Due to my session, although, import jax.linear_util may also be necessary.)

It works, thank you!

Yuyu0914 commented 11 months ago

你如何在 Colab 上使用它?

“Setup Environment”安装jax和“Imports and Definitions”导入seqio;所以在它们之间添加一个代码单元。

图像

抱歉,我输错了上面的代码。(不过,由于我的会议,import jax.linear_util可能也是必要的。)

TKS