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

keras error #2

Closed
nickyoungforu opened this issue May 25, 2021 · 6 comments
Closed

keras error #2

nickyoungforu opened this issue May 25, 2021 · 6 comments

Comments

@nickyoungforu
Copy link

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "MolEvol/main.py", line 168, in
main(args)
File "MolEvol/main.py", line 112, in main
if args.last_round != 0:
File "MolEvol/main.py", line 82, in search_rationales
gsls_tuples = do_local_search_disc(seed_molecules, args)
File "/Users/Workspace/repos/MolEvol-ffbb4fab5fe38cfa5049c664df61d50934fa9ed3/MolEvol/local_search/local_searcher_explain.py", line 136, in do_local_search_disc
results = pool.map(work_func, mol_id_list)
File "/Users/opt/anaconda3/envs/chemprop/lib/python3.8/multiprocessing/pool.py", line 364, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/Users/opt/anaconda3/envs/chemprop/lib/python3.8/multiprocessing/pool.py", line 771, in get
raise self._value
AttributeError: module 'keras.utils.generic_utils' has no attribute 'populate_dict_with_module_objects'

env:
mac os
python=3.8

what is your tensorflow, keras version?

@binghong-ml
Copy link
Owner

Thanks for noting this! It's Keras 2.4.3.

@hwidong-na
Copy link

I got the same error. @binghong-ml Would you let me know your tensorflow version? FYI, I tried tensorflow version 2.5.0.

@nickyoungforu
Copy link
Author

I got the same error. @binghong-ml Would you let me know your tensorflow version? FYI, I tried tensorflow version 2.5.0.

i solved the problem by this op: keras-team/keras#14632

@binghong-ml
Copy link
Owner

Could you try Tensorflow-cpu 2.3?

@hwidong-na
Copy link

Thanks @nickyoungforu , it solves the problem!

@hwidong-na
Copy link

Could you try Tensorflow-cpu 2.3?

It gives another error as follows:

  File "MolEvol/main.py", line 166, in <module>
    main(args)
  File "MolEvol/main.py", line 120, in main
    rationales, P = search_rationales(mol_corpus)
  File "MolEvol/main.py", line 82, in search_rationales
    gsls_tuples = do_local_search_disc(seed_molecules, args)
  File "/home/leona/github.sec.samsung.net/MolEvol/MolEvol/local_search/local_searcher_explain.py", line 150, in do_local_search_disc
    for orig_smiles, rationales in results:
  File "/home/leona/github.sec.samsung.net/MolEvol/MolEvol/local_search/local_searcher_explain.py", line 98, in local_for_one_molecule
    from MolEvol.explainer.explain import L2X_explain
  File "/home/leona/github.sec.samsung.net/MolEvol/MolEvol/explainer/explain.py", line 7, in <module>
    from keras_gcn import GraphConv
  File "/home/leona/anaconda3/envs/chemprop/lib/python3.8/site-packages/keras_gcn/__init__.py", line 1, in <module>
    from .layers import GraphConv, GraphMaxPool, GraphAveragePool
  File "/home/leona/anaconda3/envs/chemprop/lib/python3.8/site-packages/keras_gcn/layers.py", line 1, in <module>
    from .backend import keras
  File "/home/leona/anaconda3/envs/chemprop/lib/python3.8/site-packages/keras_gcn/backend.py", line 16, in <module>
    import keras
  File "/home/leona/anaconda3/envs/chemprop/lib/python3.8/site-packages/keras/__init__.py", line 20, in <module>
    from . import initializers
  File "/home/leona/anaconda3/envs/chemprop/lib/python3.8/site-packages/keras/initializers/__init__.py", line 124, in <module>
    populate_deserializable_objects()
  File "/home/leona/anaconda3/envs/chemprop/lib/python3.8/site-packages/keras/initializers/__init__.py", line 49, in populate_deserializable_objects
    LOCAL.GENERATED_WITH_V2 = tf.__internal__.tf2.enabled()
AttributeError: module 'tensorflow.compat.v2' has no attribute '__internal__'

@hwidong-na hwidong-na mentioned this issue May 28, 2021
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

3 participants