paninski-lab / yass

YASS: Yet Another Spike Sorter
https://github.com/paninski-lab/yass/wiki
Apache License 2.0
64 stars 15 forks source link

Issue with master version #342

Closed alejoe91 closed 3 years ago

alejoe91 commented 3 years ago

Hi guys

I'm trying to setup a docker image for YASS (almost there).

Running the 10chan example, I get almost til the end but then I get this error:

Traceback (most recent call last):
  File "/home/si/miniconda3/bin/yass", line 8, in <module>
    sys.exit(cli())
  File "/home/si/miniconda3/lib/python3.7/site-packages/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/home/si/miniconda3/lib/python3.7/site-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/home/si/miniconda3/lib/python3.7/site-packages/click/core.py", line 1668, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/si/miniconda3/lib/python3.7/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/si/miniconda3/lib/python3.7/site-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/home/si/miniconda3/lib/python3.7/site-packages/yass/command_line.py", line 80, in sort
    calculate_rf=calculate_rf, visualize=visualize)#,
  File "/home/si/miniconda3/lib/python3.7/site-packages/yass/pipeline.py", line 191, in run
    remove_small_and_zero_units(fname_templates,fname_spike_train,CONFIG)
  File "/home/si/miniconda3/lib/python3.7/site-packages/yass/postprocess/remove_small_and_zero_units.py", line 17, in remove_small_and_zero_units
    templates = np.load(fname_templates)
  File "/home/si/miniconda3/lib/python3.7/site-packages/numpy/lib/npyio.py", line 416, in load
    fid = stack.enter_context(open(os_fspath(file), "rb"))
IsADirectoryError: [Errno 21] Is a directory: 'tmp/final_deconv/deconv_with_updates/templates'

Indeed 'tmp/final_deconv/deconv_with_updates/templates' is a folder with templates_0sec.npy and templates_init.npy inside. Am I doing something wrong?

Cheers Alessio

alejoe91 commented 3 years ago

Indeed it seems the error was introduced recently (https://github.com/paninski-lab/yass/blame/master/src/yass/postprocess/remove_small_and_zero_units.py#L16-L17 - 28 days ago)

catubc commented 3 years ago

Hello, yes, sorry about that seems there was indeed a bug introduced when I fixed another issue. Will take a look shortly.

catubc commented 3 years ago

Hey Alessio. So indeed, this is a weird bug as I can' reproduce it (perhaps the reason why it wasn't caught). Are you using the spike interface wrapper? I'm not quite sure why the filename isn't correctly processed as it works fine on my end.

alejoe91 commented 3 years ago

Hi Cat, that was running the 10chan samples in the YASS repo!

catubc commented 3 years ago

Yes, thanks. As I mentioned in the email, on my end it runs fine. However, I think this is a docker or another related issue which will take a while to fix.

For now I've turned off this function, hopefully that fixes the issue on your end also.