Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cebra.datasets.init throws IndexError (allen demo) #78

Closed
2 tasks done
EricThomson opened this issue Sep 28, 2023 · 4 comments · Fixed by #88
Closed
2 tasks done

cebra.datasets.init throws IndexError (allen demo) #78

EricThomson opened this issue Sep 28, 2023 · 4 comments · Fixed by #88
Assignees

Comments

@EricThomson
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Bug description

In early steps of Demo_Allen.ipynb, trying to load ca_train with ca.datasets.init(), I get an error.

Operating System

Windows 10

CEBRA version

0.2.0

Device type

cpu 11th gen intel i7
gpu nvidia geforce rtx 3050ti

Steps To Reproduce

Code:

cortex = 'VISp'
seed=333
num_neurons = 800
ca_train = cebra.datasets.init(f'allen-movie-one-ca-{cortex}-{num_neurons}-train-10-{seed}')

Stack trace:

File ~\miniconda3\envs\cebra\lib\site-packages\cebra\datasets\allen\ca_movie_decoding.py:176, in <listcomp>(.0)
    162 """Construct pseudomouse neural dataset.
    163 
    164 Stack the excitatory neurons from the multiple mice and construct a psuedomouse neural dataset of the specified visual cortical area.
   (...)
    169 
    170 """
    172 list_mice = glob.glob(
    173     get_datapath(
    174         f"allen/visual_drift/data/calcium_excitatory/{area}/*"))
    175 exp_containers = [
--> 176     int(mice.split(f"{area}/")[1].replace(".mat", ""))
    177     for mice in list_mice
    178 ]
    179 ## Load summary file
    180 summary = pd.read_csv(get_datapath("allen/data_summary.csv"))

IndexError: list index out of range

I went into the debugger and checked out the mice string:
data\\allen/visual_drift/data/calcium_excitatory/VISp\\511498742.mat

It seems split() is getting hung up on Windows path weirdness. I have a linux machine I can switch to for running Cebra, but I just thought I'd let you know about this just in case.

Relevant log output

No response

Anything else?

No response

Code of Conduct

@MMathisLab
Copy link
Member

Hi, similar to other issues, the demos are slightly ahead of the stable release, so please install 0.3.0rc1 ! We will update to a stable release this week, cc @stes

@EricThomson
Copy link
Author

I upgraded, and same issue, but switched to Linux where things are good because ... don't fight the framework. 😄

@MMathisLab
Copy link
Member

Ah, I'm sorry -- I didn't read your initial post carefully. We should fix the paths asap, @gonlairo - needs to be done for rc2.

@gonlairo gonlairo reopened this Oct 2, 2023
@stes
Copy link
Member

stes commented Oct 2, 2023

We are working towards windows support in #79 now!

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

Successfully merging a pull request may close this issue.

4 participants