justinphan3110 / SciFive

SciFive: a text-text transformer model for biomedical literature
https://arxiv.org/abs/2106.03598
MIT License
89 stars 16 forks source link

RE example doesn't work #3

Open zhaoli2017 opened 3 years ago

zhaoli2017 commented 3 years ago

Hello, your examples for relation extraction don't work. Could you please check that?

justinphan3110 commented 3 years ago

What issue are you having ? have you changed the BASE_PRETRAINED_DIR to the public url described on README?

zhaoli2017 commented 3 years ago

Yes, I changed the BASE_PRETRAINED_DIR. I can fine-tune and evaluate the model, however, there is an error when running 'model.predict'.

`/usr/local/lib/python3.7/dist-packages/mesh_tensorflow/transformer/utils.py in infer_model(estimator, vocabulary, sequence_length, batch_size, model_type, model_dir, eval_checkpoint_step, checkpoint_paths, decode_fn) 1853 batch_size=batch_size, 1854 sequence_length=sequence_length, -> 1855 checkpoint_path=checkpoint_path) 1856 1857

TypeError: 'str' object is not callable In call to configurable 'infer_model' (<function infer_model at 0x7f2afff89a70>)`