I found a bug in your Course
In section Main NLP taska in chapter Question Answeringfunction preprocess_training_examplesshould have if offset[context_start][0] > end_char or offset[context_end][1] < start_char or offset[context_end][1] < end_char:instead of if offset[context_start][0] > end_char or offset[context_end][1] < start_charbecause if tokenized context contains only a part of the answer offset[context_end][1] is smaller than end_char which results in incorrect labelstry example 965 of training datasetit sets end position on [SEP] token
2022-03-20T13:30:38Z
I think that instead of:if offset[context_start][0] > end_char or offset[context_end][1] < start_char:
    start_positions.append(0)
    end_positions.append(0)It should be:if offset[context_start][0] > start_char or offset[context_end][1] < end_char:
    start_positions.append(0)
    end_positions.append(0)Am I correct? This is because earlier in the section, it’s written that:“We will also set those labels (0, 0) in the unfortunate case where the answer has been truncated so that we only have the start (or end) of it.”The following diagram explains this:3500×1894 312 KBContext 1 fully contains the answer. Context 2STARTS AFTERthe answerSTARTS. Context 3ENDS BEFOREthe answerENDS.
2022-03-23T17:58:09Z
Yes I think you are right
2022-03-23T21:15:30Z
Thanks for reporting this@Gozdi! It should now be fixed on the website