magenta / mt3

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

Colab not longer workin #147

Closed DHOFM closed 3 months ago

DHOFM commented 7 months ago

This notebook worked until yesterday:

https://colab.research.google.com/github/magenta/mt3/blob/main/mt3/colab/music_transcription_with_transformers.ipynb

Since today it is dead now. I guess they changed python or a dependency. Will you maintain it or is the repo dead now?

mattifrind commented 7 months ago

The issue is that Google changed the colab cuda version from 11 to 12 so you get the following error: CUDA backend failed to initialize

You can fix it by updating the version in the setup cell. Change this line:

!python3 -m pip install jax[cuda11_local] nest-asyncio pyfluidsynth==1.3.0 -e . -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html

to this line:

!python3 -m pip install jax[cuda12_local] nest-asyncio pyfluidsynth==1.3.0 -e . -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html

And it should work again.

DHOFM commented 7 months ago

Thanks, I found this copy: https://colab.research.google.com/github/jyotidabass/Music-Transcription-with-Transformers/blob/main/Music_Transcription_with_Transformers.ipynb#scrollTo=-DiCjtDpyUMh

and it works. replaced jax[cuda11_local] with jax[cuda12_pip]==0.4.20 so gpu worked

iansimon commented 3 months ago

Fixed.

DHOFM commented 2 months ago

Great - but it did not last long: XlaRuntimeError: FAILED_PRECONDITION: DNN library initialization failed. Look at the errors above for more details.`XlaRuntimeError Traceback (most recent call last) in <cell line: 13>() 11 12 log_event('loadModelStart', {'event_category': MODEL}) ---> 13 inference_model = InferenceModel(checkpoint_path, MODEL) 14 log_event('loadModelComplete', {'event_category': MODEL})

13 frames [... skipping hidden 15 frame]

/usr/local/lib/python3.10/dist-packages/jax/_src/compiler.py in backend_compile(backend, module, options, host_callbacks) 236 # TODO(sharadmv): remove this fallback when all backends allow compile 237 # to take in host_callbacks --> 238 return backend.compile(built_c, compile_options=options) 239 240 def compile_or_get_cached(

XlaRuntimeError: FAILED_PRECONDITION: DNN library initialization failed. Look at the errors above for more details.`