AdaptiveMotorControlLab / CEBRA

Learnable latent embeddings for joint behavioral and neural analysis - Official implementation of CEBRA
https://cebra.ai
Other
907 stars 76 forks source link

FileNotFoundError when trying to run demo by Colab #58

Closed wky17 closed 1 year ago

wky17 commented 1 year ago

Is there an existing issue for this?

Bug description

when I'm trying to run Demo_Allen.ipynb shown on cebra.ai/Demos page, i chose to open that on Colab for convenience. I've downloaded the datasets from figshare and have uploaded them to the related google drive. I saw that the demo requires datasets put under the same directory, but that cannot be done with Colab, for the uploaded dataset is always under "/content/drive/MyDrive/Colab Notebooks/data/" . I've tried to rewrite the path by

import os os.environ['CEBRA_DATADIR'] =

but it doesn't work, I still get the error

FileNotFoundError: [Errno 2] No such file or directory: 'data/allen/features/allen_movies/vit_base/8/movie_one_image_stack.npz/testfeat.pth'

what should I do to correctly read the datasets by colab?

Operating System

Google Colab

CEBRA version

cebra version

Device type

gpu

Steps To Reproduce

No response

Relevant log output

No response

Anything else?

No response

Code of Conduct

stes commented 1 year ago

Hi @wky17 , thanks for reporting.

Make sure that you modify the data path at the very beginning of the notebook, before importing CEBRA.

It might be that you need to restart the colab runtime after this change.

Could you let me know if that already resolves the issue? Happy to look further into it.

wky17 commented 1 year ago

yes it works, thank you very much. This work is very interesting, i'll go on replicate this.