Utils for computing text metrics
MetricCallback
(after_create
=None
, before_fit
=None
, before_epoch
=None
, before_train
=None
, before_batch
=None
, after_pred
=None
, after_loss
=None
, before_backward
=None
, before_step
=None
, after_cancel_step
=None
, after_step
=None
, after_cancel_batch
=None
, after_batch
=None
, after_cancel_train
=None
, after_train
=None
, before_validate
=None
, after_cancel_validate
=None
, after_validate
=None
, after_cancel_epoch
=None
, after_epoch
=None
, after_cancel_fit
=None
, after_fit
=None
) :: Callback
Computes metric scores using HuggingFace datasets metric
RougeScore
(tokenizer
, argmax
:bool
=True
, agg
:str
='mid'
, measure
:str
='fmeasure'
, scores
:List
[str
]=['rouge1', 'rouge2', 'rougeL', 'rougeLsum']
) :: Callback
Computes ROUGE score using HF datasets metric. Adds ValueMetric
for each score in scores