Skip to content

__new__() missing 2 required positional arguments: 'start_index' and 'end_index' #12

@dolphin-Jia

Description

@dolphin-Jia

我修改该代码执行SQuAD2.0数据集,报错:
WARNING:tensorflow:From /usr/local/lib/python3.5/dist-packages/tensorflow/python/training/saver.py:1266: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.
Instructions for updating:
Use standard file APIs to check for files with this prefix.
INFO:tensorflow:Restoring parameters from /tf/NOC-QA/output_ch/model.ckpt-1166
INFO:tensorflow:Running local_init_op.
INFO:tensorflow:Done running local_init_op.
INFO:tensorflow:Processing example: 0
INFO:tensorflow:Processing example: 1000
INFO:tensorflow:Processing example: 2000
INFO:tensorflow:Processing example: 3000
INFO:tensorflow:Processing example: 4000
INFO:tensorflow:Processing example: 5000
INFO:tensorflow:prediction_loop marked as finished
INFO:tensorflow:prediction_loop marked as finished
INFO:tensorflow:Writing predictions to: /tf/NOC-QA/output_ch/dev_predictions.json
INFO:tensorflow:Writing nbest to: /tf/NOC-QA/output_ch/dev_nbest_predictions.json
Traceback (most recent call last):
File "/tf/NOC-QA/baseline/run_cmrc2018_drcd_baseline.py", line 1448, in
tf.app.run()
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "/tf/NOC-QA/baseline/run_cmrc2018_drcd_baseline.py", line 1377, in main
output_nbest_file, output_null_log_odds_file)
File "/tf/NOC-QA/baseline/run_cmrc2018_drcd_baseline.py", line 962, in write_predictions
end_logit=null_end_logit)) # In very rare edge cases we could have no valid predictions. So we
TypeError: new() missing 2 required positional arguments: 'start_index' and 'end_index'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions