calico / basenji

Sequential regulatory activity predictions with deep convolutional neural networks.
Apache License 2.0
409 stars 125 forks source link

dependencis #97

Open Kamulegeya-Fahad opened 3 years ago

Kamulegeya-Fahad commented 3 years ago

Thanks for the tool! When running the tutorial, I found that the current installation instructions lead to a compatibility issue between packages.

This issue is highlighted here: https://stackoverflow.com/questions/67549661/importerror-cannot-import-name-layernormalization-from-tensorflow-python-ker

I made a quick fix by changing the environment.yaml to have python=3.7, but it would be great to have an updated environment that works with the latest code. Any chance this could be provided? Thanks!

davek44 commented 3 years ago

Hi, I'm not sure that I understand. Are you having a problem installing the dependencies? Which package is causing the problem? I don't understand what this might have to do with layer normalization.

Kamulegeya-Fahad commented 3 years ago

It seems Keras LayerNormalization is incompatible with Python 3.8 in the created basenji environment, after downgrading to python 3.7 the environment works fine.

davek44 commented 3 years ago

I'm still a little confused; LayerNormalization is a Tensorflow class, not an import. This sounds like the type of thing that might be bespoke to your setup and/or will work itself out soon. If you have a fix that's working for you, I'm going to leave things as is unless others report similar problems.

gfudenberg commented 3 years ago

Do basenji tutorials currently run for you with the recommended conda environment install? I'm getting similar errors that are also fixed by modifying the python to be =3.7 environment.yml.

On Mon, Oct 25, 2021, 11:47 AM David Kelley @.***> wrote:

I'm still a little confused; LayerNormalization is a Tensorflow class, not an import. This sounds like the type of thing that might be bespoke to your setup and/or will work itself out soon. If you have a fix that's working for you, I'm going to leave things as is unless others report similar problems.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/calico/basenji/issues/97#issuecomment-951206739, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEV7GZIYEJB6OMJAYNJ5DS3UIWQ2PANCNFSM5GMNPERA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

davek44 commented 3 years ago

I haven't reinstalled in awhile, so not sure. Which tutorial in particular is giving errors? I didn't think any of them use LayerNormalization.

QuantumAlmonds commented 1 year ago

basenji_train.py in train_test.ipynb in the tutorials directory does not seem to work with the python version in the prespecified environment.

davek44 commented 1 year ago

Hi Dan, we're in the process of cleaning up the installation to try to avoid problems like this in the future. In the meantime, can you elaborate on the error that you're seeing?

QuantumAlmonds commented 1 year ago

When fit_tape() is called during model training, there is a dimension mismatch where an expected dimension of (,3) is misaligned with a passed dimension of (). This was done with the basenji_train.py module via the tutorial.

davek44 commented 1 year ago

Hi, I tracked down the problem. I revised the way DNA is stored in the TFRecords, but forgot to update this. Delete your data/heart_l131k and data/heart_l131k.tgz and redownload from the cloud bucket (or create using the preprocess tutorial).