Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gliner/data_processing/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2022,7 +2022,7 @@ def create_relation_labels(
if "span_label" in batch and batch["span_label"] is not None:
batch_ents = (batch["span_label"] > 0).sum(-1)
else:
batch_ents = span_mask.long().squeeze(-1).sum(-1)
batch_ents = span_mask.long().sum(-1)

# Batch CPU transfer to avoid per-element .item() sync
batch_ents_cpu = batch_ents.tolist()
Expand Down
Loading