nlp-with-transformers / notebooks

Jupyter notebooks for the Natural Language Processing with Transformers book
https://transformersbook.com/
Apache License 2.0
3.92k stars 1.23k forks source link

Add v2 of chapter 7 notebook which uses current haystack #48

Closed tstadel closed 2 years ago

tstadel commented 2 years ago

In the most recent version of Haystack, the evaluation of pipelines is much different compared to the version described in the (first edition of the) book. Pipeline now has a method eval(), which runs the pipeline given input data from labels and returns the prediction and the labels in the format of one pandas dataframe per pipeline node. That's why we created a new second version of chapter 7's notebook which makes use of the new Haystack evaluation mechanism. The results of the evaluation between the first and the second version differ because in the previous notebook version there were two bugs: one within the notebook itself during creating the labels that made some labels disappear and one within haystack's previous evaluation logic that caused handling no_answers (e.g. when there is no answer to a certain question) in a improper way.

This PR:

Misc:

review-notebook-app[bot] commented 2 years ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

review-notebook-app[bot] commented 2 years ago

View / edit / reply to this conversation on ReviewNB

lvwerra commented on 2022-06-19T11:27:48Z ----------------------------------------------------------------

I would write: "Since version xyz of Haystack, ...". Same for the following mentions.


tstadel commented on 2022-06-21T17:00:54Z ----------------------------------------------------------------

Done.