Closed BojanKovachki closed 4 years ago
Hi, Can you please add the following key-value pair to your json / dictionnary? "version": "1.1"
It should work
Hi @andrelmfarias,
a new error appears:
AttributeError Traceback (most recent call last)
<ipython-input-35-d4ebafb56682> in <module>()
----> 1 evaluate_reader(cdqa_pipeline, 'annotated-dataset.json')
2 frames
/usr/local/lib/python3.6/dist-packages/cdqa/reader/bertqa_sklearn.py in write_predictions(all_examples, all_features, all_results, n_best_size, max_answer_length, do_lower_case, output_prediction_file, output_nbest_file, output_null_log_odds_file, verbose_logging, version_2_with_negative, null_score_diff_threshold, retriever_score_weight, n_predictions)
786 best_dict["title"] = example.title
787 best_dict["paragraph"] = example.paragraph
--> 788 best_dict["retriever_score"] = example.retriever_score.item()
789 best_dict["final_score"] = (1 - retriever_score_weight) * (
790 best_dict["start_logit"] + best_dict["end_logit"]
AttributeError: 'int' object has no attribute 'item'
Hi,
I know why there's this bug. Il will be opening a PR with a fix for it today.
There is a bug in the evaluate_reader(cdqa_pipeline, 'path-to-annotated-dataset.json') function.
I tried it in Colab and I get the following error: