File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
edsnlp/pipes/trainable/ner_crf Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 9999- The loss of ` eds.ner_crf ` is now computed as the mean over the words instead of the sum. This change is compatible with multi-gpu training.
100100- Having multiple stats keys matching a batching pattern now warns instead of raising an error.
101101
102+ ### Changed
103+
104+ - The loss of ` eds.ner_crf ` is now computed as the mean over the words instead of the sum. This change is compatible with multi-gpu training.
105+ - Having multiple stats keys matching a batching pattern now warns instead of raising an error.
106+
102107### Fixed
103108
104109- Support packaging with poetry 2.0
Original file line number Diff line number Diff line change @@ -454,6 +454,9 @@ def collate(self, preps) -> NERBatchInput:
454454 k : sum (v ) for k , v in preps ["stats" ].items () if not k .startswith ("__" )
455455 },
456456 }
457+ collated ["stats" ] = {
458+ k : sum (v ) for k , v in preps ["stats" ].items () if not k .startswith ("__" )
459+ }
457460 lengths = [length for sample in preps ["lengths" ] for length in sample ]
458461 max_len = max (lengths )
459462 if "targets" in preps :
You can’t perform that action at this time.
0 commit comments