MCPcopy Create free account
hub / github.com/catboost/catboost / ReadModelAny

Function ReadModelAny

catboost/tools/model_comparator/main.cpp:347–361  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

345}
346
347TFullModel ReadModelAny(const TString& fileName) {
348 TFullModel model;
349 bool loaded = false;
350 for (EModelType modelType : {EModelType::CatboostBinary, EModelType::AppleCoreML}) {
351 try {
352 model = ReadModel(fileName, modelType);
353 } catch (TCatBoostException& e) {
354 continue;
355 }
356 loaded = true;
357 break;
358 }
359 CB_ENSURE(loaded, "Cannot load model " << fileName);
360 return model;
361}
362
363// returns Nothing() if both lhs and rhs are not of TModel type
364template <class TModel>

Callers 1

mainFunction · 0.85

Calls 1

ReadModelFunction · 0.85

Tested by

no test coverage detected