Skip to content
Draft
Show file tree
Hide file tree
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
6 changes: 5 additions & 1 deletion edsnlp/tune.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,11 @@ def on_validation_callback(all_metrics):
raise
scorer = GenericScorer(**kwargs["scorer"])
val_data = kwargs["val_data"]
score = scorer(nlp, val_data)
print(val_data)
# val_docs = list(chain.from_iterable(val_data))
val_docs = list(val_data)
print(val_docs)
score = scorer(nlp, val_docs)
for key in metric:
score = score[key]
return score
Expand Down
8 changes: 8 additions & 0 deletions tests/tuning/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,14 @@ val_data:
span_setter : 'gold_spans'
span_attributes : ['sosy', 'unit', 'negation']
bool_attributes : ['negation'] # default standoff to doc converter
'@readers': standoff
path: tests/training/dataset/
converter:
- '@factory': eds.standoff_dict2doc
span_setter : 'gold_spans'
span_attributes : ['sosy', 'unit', 'negation']
bool_attributes : ['negation'] # default standoff to doc converter


# 🚀 TRAIN SCRIPT OPTIONS
train:
Expand Down
Loading