dmlc / XGBoost.jl

XGBoost Julia Package
Other
288 stars 110 forks source link

How do I create persistent representations of learned parameters (models) ? #103

Closed ablaom closed 1 year ago

ablaom commented 2 years ago

The objects created by xgboost ("models") are not persistent (just some C pointers) and hence not serialisable. Working through the julia wrapper XGBoost.jl, the only way I know how to construct a persistent Julia representation of the model is to write to disk using XGBoost.save and then read in the file to a julia object (The MLJ serialiser does this here). This is obviously not ideal.

If someone knows how to directly get a persistent julia representation through the wrapper, or can suggest changes to this package that would allow this, then that would be great.

ablaom commented 2 years ago

cc @OlivierLabayle

ExpandingMan commented 1 year ago

I think what you're referring to here is the fact that, prior to 2.0, no Julia methods were provided to writing to an in-memory buffer. The appropriate methods have been added and are now used in MLJXGBoostInterface.jl.

@ablaom , can you please clarify whether something else is being asked here, and if not close the issue?