Open poteminr opened 8 months ago
Fix bug with EarlyStoppingCallback when do_eval is set to False
EarlyStoppingCallback can be used if validation_file, save_strategy policy were provided, load_best_model_at_end was set to True, and so on.
validation_file
save_strategy
load_best_model_at_end
True
AssertionError: EarlyStoppingCallback requires IntervalStrategy of steps or epoch
Otherwise, we should set callbacks in BinderTrainer to None.
callbacks
BinderTrainer
HF DefaultFlowCallback will be use by default (source).
DefaultFlowCallback
Minor refactoring
src/config.py
batch
start_negative_mask, end_negative_mask, span_negative_mask = [], [], []
@microsoft-github-policy-service agree
@sheng-z Hi! Can you review my PR?
Fix bug with EarlyStoppingCallback when do_eval is set to False
EarlyStoppingCallback can be used if
validation_file
,save_strategy
policy were provided,load_best_model_at_end
was set toTrue
, and so on.Otherwise, we should set
callbacks
inBinderTrainer
to None.HF
DefaultFlowCallback
will be use by default (source).Minor refactoring
src/config.py
)batch
dict at once with the values (src/trainer.py)start_negative_mask, end_negative_mask, span_negative_mask = [], [], []
. This variables initialized below with a tensors (src/trainer.py)