Skip to content

AttributeError: module 'keras.utils.generic_utils' has no attribute 'populate_dict_with_module_objects' #2

@lxgnzlz

Description

@lxgnzlz

Hello! I was curious to know if anyone has come across this or a similar issue when importing frameBERT.

I believe I have the pre-requisites listed on the README, so I think my error may stem from dependencies conflicting.

Is there a perhaps a "requirements" file to check against in order to make sure I have the correct versions?

2021-12-10 13:49:57.573655: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cudart64_110.dll
To use data.metrics please install scikit-learn. See https://scikit-learn.org/stable/index.html
2021-12-10 13:50:03.134504: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library nvcuda.dll
2021-12-10 13:50:03.165113: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1733] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: NVIDIA GeForce GTX 1060 computeCapability: 6.1
coreClock: 1.6705GHz coreCount: 10 deviceMemorySize: 6.00GiB deviceMemoryBandwidth: 178.99GiB/s
2021-12-10 13:50:03.165664: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cudart64_110.dll
2021-12-10 13:50:03.166883: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cublas64_11.dll
2021-12-10 13:50:03.167655: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cublasLt64_11.dll
2021-12-10 13:50:03.168194: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cufft64_10.dll
2021-12-10 13:50:03.168822: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library curand64_10.dll
2021-12-10 13:50:03.169325: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cusolver64_11.dll
2021-12-10 13:50:03.169877: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cusparse64_11.dll
2021-12-10 13:50:03.170411: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cudnn64_8.dll
2021-12-10 13:50:03.170901: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1871] Adding visible gpu devices: 0
2021-12-10 13:50:03.174548: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2021-12-10 13:50:03.176525: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1733] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: NVIDIA GeForce GTX 1060 computeCapability: 6.1
coreClock: 1.6705GHz coreCount: 10 deviceMemorySize: 6.00GiB deviceMemoryBandwidth: 178.99GiB/s
2021-12-10 13:50:03.178104: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1871] Adding visible gpu devices: 0
2021-12-10 13:50:04.828948: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1258] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-12-10 13:50:04.829168: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1264]      0
2021-12-10 13:50:04.830758: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1277] 0:   N
2021-12-10 13:50:04.833889: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1418] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 4624 MB memory) -> physical GPU (device: 0, name: NVIDIA GeForce GTX 1060, pci bus id: 0000:01:00.0, compute capability: 6.1)
Traceback (most recent call last):
  File "C:\Users\xxx\Desktop\framebert_test\test.py", line 1, in <module>
    from frameBERT import frame_parser
  File "C:\Users\xxx\Desktop\framebert_test\frameBERT\frame_parser.py", line 14, in <module>
    from frameBERT.src import utils as frameBERT_utils
  File "C:\Users\xxx\Desktop\framebert_test\frameBERT\src\utils.py", line 6, in <module>
    from keras.preprocessing.sequence import pad_sequences
  File "C:\Users\xxx\anaconda3\envs\frameBert\lib\site-packages\keras\__init__.py", line 15, in <module>
    from . import layers
  File "C:\Users\xxx\anaconda3\envs\frameBert\lib\site-packages\keras\layers\__init__.py", line 6, in <module>
    from . import core
  File "C:\Users\xxx\anaconda3\envs\frameBert\lib\site-packages\keras\layers\core\__init__.py", line 19, in <module>
    from keras.layers.core.dense import Dense
  File "C:\Users\xxx\anaconda3\envs\frameBert\lib\site-packages\keras\layers\core\dense.py", line 21, in <module>
    from keras import initializers
  File "C:\Users\xxx\anaconda3\envs\frameBert\lib\site-packages\keras\initializers\__init__.py", line 124, in <module>
    populate_deserializable_objects()
  File "C:\Users\xxx\anaconda3\envs\frameBert\lib\site-packages\keras\initializers\__init__.py", line 82, in populate_deserializable_objects
    generic_utils.populate_dict_with_module_objects(
AttributeError: module 'keras.utils.generic_utils' has no attribute 'populate_dict_with_module_objects'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions