xgboost update for dmlc changes

This commit is contained in:
tqchen 2015-04-08 17:42:54 -07:00
parent 9a6adb0f33
commit c8c1dc6a3b
3 changed files with 9 additions and 9 deletions

View File

@ -49,7 +49,7 @@ class SingleFileSplit : public dmlc::InputSplit {
bool end_of_file_;
};
class StdFile : public dmlc::IStream {
class StdFile : public dmlc::Stream {
public:
explicit StdFile(const char *fname, const char *mode)
: use_stdio(false) {
@ -115,7 +115,7 @@ InputSplit* InputSplit::Create(const char *uri,
return new utils::SingleFileSplit(uri);
}
IStream *IStream::Create(const char *uri, const char * const flag) {
Stream *Stream::Create(const char *uri, const char * const flag) {
using namespace xgboost;
const char *msg = "xgboost is compiled in local mode\n"\
"to use hdfs, s3 or distributed version, compile with make dmlc=1";

View File

@ -23,7 +23,7 @@ namespace learner {
* \brief learner that takes do gradient boosting on specific objective functions
* and do training and prediction
*/
class BoostLearner : public rabit::ISerializable {
class BoostLearner : public rabit::Serializable {
public:
BoostLearner(void) {
obj_ = NULL;
@ -193,14 +193,14 @@ class BoostLearner : public rabit::ISerializable {
}
}
// rabit load model from rabit checkpoint
virtual void Load(rabit::IStream &fi) {
virtual void Load(rabit::Stream *fi) {
// for row split, we should not keep pbuffer
this->LoadModel(fi, distributed_mode != 2, false);
this->LoadModel(*fi, distributed_mode != 2, false);
}
// rabit save model to rabit checkpoint
virtual void Save(rabit::IStream &fo) const {
virtual void Save(rabit::Stream *fo) const {
// for row split, we should not keep pbuffer
this->SaveModel(fo, distributed_mode != 2);
this->SaveModel(*fo, distributed_mode != 2);
}
/*!
* \brief load model from file

View File

@ -14,8 +14,8 @@
namespace xgboost {
namespace utils {
// reuse the definitions of streams
typedef rabit::IStream IStream;
typedef rabit::utils::ISeekStream ISeekStream;
typedef rabit::Stream IStream;
typedef rabit::utils::SeekStream ISeekStream;
typedef rabit::utils::MemoryFixSizeBuffer MemoryFixSizeBuffer;
typedef rabit::utils::MemoryBufferStream MemoryBufferStream;