| 16 | public: |
| 17 | virtual TFullModel ReadModel(IInputStream* modelStream) const = 0; |
| 18 | virtual TFullModel ReadModel(const TString& modelPath) const { |
| 19 | CB_ENSURE(NFs::Exists(modelPath), "Model file doesn't exist: " << modelPath); |
| 20 | TIFStream f(modelPath); |
| 21 | return ReadModel(&f); |
| 22 | } |
| 23 | virtual TFullModel ReadModel(const void* data, size_t dataSize) const { |
| 24 | TBuffer buf((char*)data, dataSize); |
| 25 | TBufferInput bs(buf); |