Skip to content
Quantoros

After savemodel/loadmodel, will a custom Python objective function be available for continuing training?

Classic MLLevel: IntermediateXGBoost · Model IO

After save_model/load_model, will a custom Python objective function be available for continuing training?

Hints
  • Portable artifacts cannot embed arbitrary Python behavior.
  • The tree model and training extensions are separate.

Answer

No: language-specific objective/metric/callback functions are not stored in the portable model. Version and restore their implementation explicitly, including the prediction link and expected derivative contract.

Source and licence: XGBoost · Model IO · Apache-2.0 · answer: Quantoros editorial

Related questions