Source symbols: src/transformers/trainer_callback.py
Deterministic, value-free symbol metadata extracted from public source. Implementations and literal values are not copied into this page.
- Revision: main@9a0fe3f5dd36ffe1888133f09eb03f1eb14b8a6e · 2026-07-20T12:47:48Z
- Declarations: 74
- Referenced calls: 41
Declared symbols
TrainerState— class at line 35__post_init__— def at line 116save_to_json— def at line 143; referencesdumps,asdict,open,write,read,cls,loads,getattr,ceil,setattr,hp_name,hp_params,is_local_process_zero,is_world_process_zero,NotImplementedError,itemsload_from_json— def at line 150; referencesopen,read,cls,loads,getattr,ceil,setattr,hp_name,hp_params,is_local_process_zero,is_world_process_zero,NotImplementedError,itemscompute_steps— def at line 156; referencesgetattr,ceil,setattr,hp_name,hp_params,is_local_process_zero,is_world_process_zero,NotImplementedError,cls,itemsinit_training_references— def at line 169; referenceshp_name,hp_params,is_local_process_zero,is_world_process_zero,NotImplementedError,cls,items,setattrExportableState— class at line 189; referencesNotImplementedError,cls,items,setattrstate— def at line 222; referencesNotImplementedError,cls,items,setattrfrom_state— def at line 226; referencescls,items,setattrTrainerControl— class at line 234_new_training— def at line 268_new_epoch— def at line 272_new_step— def at line 276state— def at line 282TrainerCallback— class at line 295on_init_end— def at line 346on_train_begin— def at line 351on_train_end— def at line 356on_epoch_begin— def at line 361on_epoch_end— def at line 366on_step_begin— def at line 371on_pre_optimizer_step— def at line 377on_optimizer_step— def at line 382on_substep_end— def at line 387on_step_end— def at line 392on_evaluate— def at line 398on_predict— def at line 403on_save— def at line 408on_log— def at line 413on_prediction_step— def at line 418on_push_begin— def at line 423CallbackHandler— class at line 429; referencesadd_callback,any,isinstance,warning,callback,append,remove,join,call_event,getattr__init__— def at line 432; referencesadd_callback,any,isinstance,warningadd_callback— def at line 451; referencescallback,isinstance,warning,append,remove,join,call_event,getattr,tqdm,update,has_length,len,closepop_callback— def at line 462; referencesisinstance,remove,join,call_event,getattr,tqdm,update,has_length,len,closeremove_callback— def at line 474; referencesisinstance,remove,join,call_event,getattr,tqdm,update,has_length,len,closecallback_list— def at line 484; referencesjoin,call_event,getattr,tqdm,update,has_length,len,closeon_init_end— def at line 487; referencescall_event,getattr,tqdm,update,has_length,len,closeon_train_begin— def at line 490; referencescall_event,getattr,tqdm,update,has_length,len,closeon_train_end— def at line 494; referencescall_event,getattr,tqdm,update,has_length,len,closeon_epoch_begin— def at line 497; referencescall_event,getattr,tqdm,update,has_length,len,closeon_epoch_end— def at line 501; referencescall_event,getattr,tqdm,update,has_length,len,closeon_step_begin— def at line 504; referencescall_event,getattr,tqdm,update,has_length,len,closeon_pre_optimizer_step— def at line 510; referencescall_event,getattr,tqdm,update,has_length,len,closeon_optimizer_step— def at line 513; referencescall_event,getattr,tqdm,update,has_length,len,closeon_substep_end— def at line 516; referencescall_event,getattr,tqdm,update,has_length,len,closeon_step_end— def at line 519; referencescall_event,getattr,tqdm,update,has_length,len,closeon_evaluate— def at line 522; referencescall_event,getattr,tqdm,update,has_length,len,closeon_predict— def at line 526; referencescall_event,getattr,tqdm,update,has_length,len,closeon_save— def at line 529; referencescall_event,getattr,tqdm,update,has_length,len,closeon_log— def at line 533; referencescall_event,getattr,tqdm,update,has_length,len,closeon_prediction_step— def at line 537; referencescall_event,getattr,tqdm,update,has_length,len,closeon_push_begin— def at line 540; referencescall_event,getattr,tqdm,update,has_length,len,closecall_event— def at line 543; referencesgetattr,tqdm,update,has_length,len,closeDefaultFlowCallback— class at line 563; referencestqdm,update,has_length,len,closeon_step_end— def at line 568; referencestqdm,update,has_length,len,closeon_epoch_end— def at line 608; referencestqdm,update,has_length,len,closeProgressCallback— class at line 624; referencestqdm,update,has_length,len,close__init__— def at line 630; referencestqdm,update,has_length,len,closeon_train_begin— def at line 643; referencestqdm,update,has_length,len,closeon_step_end— def at line 648; referencesupdate,has_length,tqdm,len,closeon_prediction_step— def at line 653; referenceshas_length,tqdm,len,update,closeon_evaluate— def at line 661; referencescloseon_predict— def at line 667; referencescloseon_log— def at line 673on_train_end— def at line 692; referencesclose,pop,isinstance,itemsPrinterCallback— class at line 698; referencespop,isinstance,itemson_log— def at line 703; referencespop,isinstance,itemsEarlyStoppingCallback— class at line 711; referencesoperator,abs,warning,startswith,get,check_metric_value__init__— def at line 728; referencesoperator,abs,warning,startswith,get,check_metric_valuecheck_metric_value— def at line 734; referencesoperator,abs,warning,startswith,geton_train_begin— def at line 745; referenceswarning,startswith,get,check_metric_valueon_evaluate— def at line 758; referencesstartswith,get,warning,check_metric_valuestate— def at line 775
File-level call references
get_logger— line 31isinstance— line 121TypeError— line 129append— line 138state— line 138dumps— line 145asdict— line 145open— line 146write— line 147read— line 153cls— line 154loads— line 154getattr— line 163ceil— line 166setattr— line 167hp_name— line 176hp_params— line 181is_local_process_zero— line 185is_world_process_zero— line 186NotImplementedError— line 223items— line 228add_callback— line 435any— line 443warning— line 444callback— line 452remove— line 466join— line 485call_event— line 488tqdm— line 645update— line 650has_length— line 654len— line 657close— line 664pop— line 689str— line 690print— line 708operator— line 738abs— line 739startswith— line 760get— line 762check_metric_value— line 771
Source: src/transformers/trainer_callback.py