|
Medial Code Documentation
|
Public Member Functions | |
| None | __init__ (self, Union[str, os.PathLike] directory, str name="model", bool as_pickle=False, int iterations=100) |
| bool | after_iteration (self, _Model model, int epoch, TrainingCallback.EvalsLog evals_log) |
Public Member Functions inherited from xgboost.callback.TrainingCallback | |
| _Model | before_training (self, _Model model) |
| _Model | after_training (self, _Model model) |
| bool | before_iteration (self, _Model model, int epoch, EvalsLog evals_log) |
Protected Attributes | |
| _path | |
| _name | |
| _as_pickle | |
| _iterations | |
| _epoch | |
Additional Inherited Members | |
Static Public Attributes inherited from xgboost.callback.TrainingCallback | |
| EvalsLog = Dict[str, Dict[str, _ScoreList]] | |
Checkpointing operation.
.. versionadded:: 1.3.0
Parameters
----------
directory :
Output model directory.
name :
pattern of output model file. Models will be saved as name_0.json, name_1.json,
name_2.json ....
as_pickle :
When set to True, all training parameters will be saved in pickle format, instead
of saving only the model.
iterations :
Interval of checkpointing. Checkpointing is slow so setting a larger number can
reduce performance hit. | None xgboost.callback.TrainingCheckPoint.__init__ | ( | self, | |
| Union[str, os.PathLike] | directory, | ||
| str | name = "model", |
||
| bool | as_pickle = False, |
||
| int | iterations = 100 |
||
| ) |
Reimplemented from xgboost.callback.TrainingCallback.
| bool xgboost.callback.TrainingCheckPoint.after_iteration | ( | self, | |
| _Model | model, | ||
| int | epoch, | ||
| TrainingCallback.EvalsLog | evals_log | ||
| ) |
Run after each iteration. Return True when training should stop.
Reimplemented from xgboost.callback.TrainingCallback.