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

tensorflow get_config error #260

Open
dyuliu opened this issue Aug 23, 2021 · 0 comments
Open

tensorflow get_config error #260

dyuliu opened this issue Aug 23, 2021 · 0 comments

Comments

@dyuliu
Copy link

dyuliu commented Aug 23, 2021

  • MLPrimitives version: 0.3.0
  • Python version: 3.6

Description

The current version of MLPrimitives will automatically install tensorflow 2.3.4.

This version will encounter the following issue:

/usr/local/lib/python3.6/site-packages/keras/backend.py in <module>
     34 from tensorflow.core.protobuf import config_pb2
     35 from tensorflow.python.eager import context
---> 36 from tensorflow.python.eager.context import get_config
     37 from tensorflow.python.framework import config
     38 from keras import backend_config

ImportError: cannot import name 'get_config'

Because of the piece of code from mlprimitives/adapters/keras.py

import logging
import tempfile

import keras        # this is the line causing error
import numpy as np

Solution

Simply replace

import keras

as

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

No branches or pull requests

1 participant