Save Scikit-Learn attributes into learner attributes. (#5245)

* Remove the recommendation for pickle.

* Save skl attributes in booster.attr

* Test loading scikit-learn model with native booster.
This commit is contained in:
Jiaming Yuan
2020-01-30 16:00:18 +08:00
committed by GitHub
parent c67163250e
commit 472ded549d
8 changed files with 194 additions and 57 deletions

View File

@@ -52,7 +52,7 @@ class PeekableInStream : public dmlc::Stream {
class FixedSizeStream : public PeekableInStream {
public:
explicit FixedSizeStream(PeekableInStream* stream);
~FixedSizeStream() = default;
~FixedSizeStream() override = default;
size_t Read(void* dptr, size_t size) override;
size_t PeekRead(void* dptr, size_t size) override;