dalab/end2end_neural_el

Code does not run with tensorflow v2.5.0

Opened this issue · 4 comments

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?

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

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

@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.

I also had the same error, any advice?