Skip to content

Commit

Permalink
Initial commit for JSON.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Jul 19, 2019
1 parent 1b3e869 commit 41b0bc2
Show file tree
Hide file tree
Showing 34 changed files with 3,702 additions and 25 deletions.
1,059 changes: 1,059 additions & 0 deletions doc/json-schema.rst

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions include/xgboost/gbm.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include <dmlc/registry.h>
#include <xgboost/base.h>
#include <xgboost/json.h>
#include <xgboost/data.h>
#include <xgboost/objective.h>
#include <xgboost/feature_map.h>
Expand Down Expand Up @@ -46,11 +47,21 @@ class GradientBooster {
* \param fi input stream.
*/
virtual void Load(dmlc::Stream* fi) = 0;
/*!
* \brief load model from json
* \param in input json model.
*/
virtual void Load(Json const& in) = 0;
/*!
* \brief save model to stream.
* \param fo output stream
*/
virtual void Save(dmlc::Stream* fo) const = 0;
/*!
* \brief Save model to Json
* \param out output json document.
*/
virtual void Save(Json* out) const = 0;
/*!
* \brief whether the model allow lazy checkpoint
* return true if model is only updated in DoBoost
Expand Down
Loading

0 comments on commit 41b0bc2

Please sign in to comment.