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

Code does not run with tensorflow v2.5.0 #38

Open
flackbash opened this issue Feb 22, 2022 · 4 comments
Open

Code does not run with tensorflow v2.5.0 #38

flackbash opened this issue Feb 22, 2022 · 4 comments

Comments

@flackbash
Copy link

Running

python -m gerbil.server --training_name=base_att_global --experiment_name=paper_models   \
           --persons_coreference_merge=True --all_spans_training=True --entity_extension=extension_entities

as per the instructions in the Readme yields the following error:

Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/local/data/prangen/src/end2end_neural_el/code/gerbil/server.py", line 96, in <module>
    nnprocessing = NNProcessing(train_args, args)
  File "/local/data/prangen/src/end2end_neural_el/code/gerbil/nn_processing.py", line 66, in __init__
    next_element = ds.make_one_shot_iterator().get_next()
AttributeError: 'FlatMapDataset' object has no attribute 'make_one_shot_iterator'

make_one_shot_iterator was moved to tf.compat.v1.data.make_one_shot_iterator(ds) in Tensorflow V2 according to this Github issue.

However, when adjusting the problematic line L66 in nn_processing.py to

next_element = tf.compat.v1.data.make_one_shot_iterator(ds).get_next()

the program seems to end up in an infinite loop of "sleep" Log messages.

Do you have any advice on how to proceed with this?

@PoLabs
Copy link

PoLabs commented Apr 20, 2022

We're are you running that command? I tried in code, gerbil and the base e2e_neural_el folder and all returned No module named gerbil.server

@suprabath-reddy
Copy link

@flackbash Did you get the issue resolved of the infinite loop of "sleep" log messages? If yes, what are the changes you made?

@flackbash
Copy link
Author

@PoLabs I followed the instructions here so it was probably in code. Did you follow the instructions under "Setting up the environment"? (Some adjustments to the requirements are necessary, see #22 )

@suprabath-reddy I did not, unfortunately.

@wenzi3241
Copy link

I also had the same error, any advice?

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

4 participants