Sentinal4D / cellshape

3D shape analysis using deep learning
https://www.biorxiv.org/content/10.1101/2022.06.17.496550v2
BSD 3-Clause "New" or "Revised" License
20 stars 6 forks source link

cellshape_cloud and cellshape_cluster throw undefined attribute errors when running following instructions #11

Closed caylamiller closed 1 year ago

caylamiller commented 1 year ago

Hi, I'm trying to run through the instructions with the sample data once before trying on my own data. I installed following the given instructions (pip installed in clean conda environment), then followed through data download. All good up to that point, but then I've run into a few issues:

  1. Train DFN autoencoder
    • I first got an error because h5py wasn't installed.
    • After installing that, the train command fails instantly with error "AttributeError: module 'cellshape_cloud' has no attribute 'train_autoencoder'" I was able to run it after importing the "train_autoencoder" function in the init file for cellshape_cloud.
  2. Add clustering layer to refine shape features and learn shape classes simultaneously
    • Training immediately fails again, this time with error "AttributeError: module 'cellshape_cluster' has no attribute 'DeepEmbeddedClustering'". The version of cellshape_cluster that's installed is 0.0.16, and doesn't have any imports in the init file. Adding the imports present in version 0.0.18 cause further errors within deep_embedded_clustering ("No module named 'clustering layer'") and training_functions ("No module named 'distributions'").
DeVriesMatt commented 1 year ago

Hi @caylamiller, thank you for your issue! I will sort this out right away!

DeVriesMatt commented 1 year ago

Hi @caylamiller, I have now fixed these issues. The problem was that I had yet to release the newer versions of cellshape-cloud and cellshape-cluster.

I have now released version 0.1.3 of cellshape-cloud and 0.0.20 of cellshape-cluster, which allow things to run smoothly.

Please let me know if the problem is fixed so that I can close the issue! :smile:

Shannon-E-Taylor commented 1 year ago

It runs for me :D - though I also had to install torch and reduce the batch_size to 2 to get it to run on my GPU (RTX3050)

caylamiller commented 1 year ago

I just got a chance to retry and was able to run as well, thanks for updating!

DeVriesMatt commented 1 year ago

Glad it's all working! :smile: