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

Bug/enhancement #850

Open
jerrycearley opened this issue Mar 13, 2022 · 2 comments
Open

Bug/enhancement #850

jerrycearley opened this issue Mar 13, 2022 · 2 comments
Labels

Comments

@jerrycearley
Copy link

Describe the bug

MatchZoo breaks when run in google colab beacause of deprocated dependencies in keras

To Reproduce

Attempt to import match zoo in google colab:

!pip3 install matchzoo

import tensorflow
from tensorflow import keras
import matchzoo as mz
import nltk
import pandas as pd

Describe your attempts

Attempted to run matchzoo in google colab
Fixed dependecy issues

You should also provide code snippets you tried as a workaround, StackOverflow solution that you have walked through, or your best guess of the cause that you can't locate (e.g. cosmic radiation).

Context

Nine FIles Needed edit:
attention layer.py
#from keras.engine import Layer
from keras.layers import Layer # Changed from previous line to fix tensorflow toolchain

data_generator.py
import tensorflow # Added to fix toolchain issues
#import keras
from tensorflow import keras # Changed from previous line

decating_dropout_layer.py
#from keras.engine import Layer
from keras.layers import Layer # Changed from previous line to fix tensorflow toolchain

dynamic_pooling_layer.py
#from keras.engine import Layer
from keras.layers import Layer # Changed from previous line to fix tensorflow toolchain

matching_layer.py
#from keras.engine import Layer
from keras.layers import Layer # Changed from previous line to fix tensorflow toolchain

matching_tensor_layer.py
#from keras.engine import Layer
from keras.layers import Layer # Changed from previous line to fix tensorflow toolchain

multi_perspective_layer.py
#from keras.engine import Layer
from keras.layers import Layer # Changed from previous line to fix tensorflow toolchain

semantic_composite_layer.py
#from keras.engine import Layer
from keras.layers import Layer # Changed from previous line to fix tensorflow toolchain

spatial_gru.py
#from keras.engine import Layer
from keras.layers import Layer # Changed from previous line to fix tensorflow toolchain

Additional Information

I clone the repo and will push this update as a contribution to the code base

@tschomacker
Copy link

tschomacker commented May 2, 2022

Hello, I have stumbled over the same bug. As it seems there will be no future main-version of this library where the bug is fixed. #844 describes almost the same problem and lead to an update in a dev-branch and an interesting discussion.
Edit: I was able to install the dev-version via !pip install git+https://github.com/NTMC-Community/[email protected] in kaggle

@Nowina
Copy link

Nowina commented May 9, 2022

Hello, I had the same issue. Solution provided by @tschomacker works great, but when running tutorial notebook conv_knrm.ipynb I get this error:
image

When using method model.fit_generator() without callbacks the tutorial works undisturbed. Same thing happens in other tutorials.

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

No branches or pull requests

3 participants