LINCellularNeuroscience/VAME

Not finding results npy file

jelrod14 opened this issue · 4 comments

Hi,
Having an issue with the community and vame.visualization() where they do not find the npy file associated with the results of the videos. Error message:

vame.visualization(config)
Traceback (most recent call last):

  File "C:\Users\jelrod14\Anaconda3\envs\VAME\lib\site-packages\vame-1.0-py3.7.egg\vame\analysis\umap_visualization.py", line 79, in visualization
    embed = np.load(os.path.join(path_to_file,"","community","","umap_embedding_"+file+".npy"))

  File "C:\Users\jelrod14\Anaconda3\envs\VAME\lib\site-packages\numpy\lib\npyio.py", line 417, in load
    fid = stack.enter_context(open(os_fspath(file), "rb"))

FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\jelrod14\\DLCtest2-Mar3-2023\\results\\013118_Het_P0_retrieval\\VAME\\kmeans-9\\community\\umap_embedding_013118_Het_P0_retrieval.npy'


During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File "C:\Users\jelrod14\AppData\Local\Temp\ipykernel_12276\3082382737.py", line 1, in <module>
    vame.visualization(config)

  File "C:\Users\jelrod14\Anaconda3\envs\VAME\lib\site-packages\vame-1.0-py3.7.egg\vame\analysis\umap_visualization.py", line 85, in visualization
    os.mkdir(os.path.join(path_to_file,"community"))

FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\\Users\\jelrod14\\DLCtest2-Mar3-2023\\results\\013118_Het_P0_retrieval\\VAME\\kmeans-9\\community' 

After further inspection i have found that this is probably a VAME generated file naming issue (potentially from previous versions?) where this is looking more a folder named Kmeans-9, but the folders are now named HMM-9 (or whatever number of clusters you have respectively) I tried editing the folder acquisition script, but it still wont find the file. I am now going to attempt to edit the foldername back to kmeans to see if that will fix things

if you change the parametrization to HMM from Kmeans, the VAME compute HMM but only looks for saved results in the 'kmeans_' folder later. and not 'hmm_' furthermore, all the post hoc analyses like community detection, etc. are done on the learned means clusters and not the hmm. this is one of the problems I have seen in the code. if you change the "parametrization" to kmeans in the configuration file. the code will run. but results achieved through Kmeans are no way near what they show in the paper. I tried changing the whole code to look for the hmm model. but the results also weren't satisfactory. I concluded that this code does not reproduce the same results as the one reported in their paper

hmm, so seems like community and subsequent visualizations aren't as far along as the rest of the code to deal with HMM? I know i have read other issues where they say that they use alternative scripts instead of the community code, but not sure about getting those

I changed the code and also added parallelization for creating frames (though it didn't improve the speed greatly). If you want I can send you a modified version of the code. It's a bit messy so I probably cannot directly make a pull request on this. but I don't have time to check all the changes that I made. maybe you can have a look.