Python save_period

On R version 1.0.0.2, XGBoost xgb.train has the save_period parameter that saves the model every n rounds. I’m working on implementing XGBoost in python. In version 1.2, I get an error when defining save_period = 250 in xgb.train

train() got an unexpected keyword argument 'save_period'

Does this setting not exist in the Python version? I have checked the documentation but I haven’t found anything similar.

It is currently not possible to use save_period in Python. In the upcoming release (1.3.0), we will add a new callback for saving models every n rounds. See In https://github.com/dmlc/xgboost/pull/6199 for more details.

Example:

check_point = xgb.callback.TrainingCheckPoint(directory=tmpdir,
                                              iterations=1,
                                              name='model')
xgb.train({'objective': 'binary:logistic'}, m,
          num_boost_round=10,
          verbose_eval=False,
          callbacks=[check_point])