| 70 | |
| 71 | |
| 72 | void TModel::LoadFullFromFile(const Napi::CallbackInfo& info) { |
| 73 | Napi::Env env = info.Env(); |
| 74 | |
| 75 | if (!NHelper::Check(env, info.Length() >= 1, "Wrong number of arguments") || |
| 76 | !NHelper::Check(env, info[0].IsString(), "File name string is required")) |
| 77 | { |
| 78 | return; |
| 79 | } |
| 80 | |
| 81 | NHelper::CheckNotNullHandle(env, this->Handle); |
| 82 | const bool status = LoadFullModelFromFile( |
| 83 | this->Handle, |
| 84 | info[0].As<Napi::String>().Utf8Value().c_str() |
| 85 | ); |
| 86 | NHelper::CheckStatus(env, status); |
| 87 | if (status) { |
| 88 | this->ModelLoaded = true; |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | // Set model predictions postprocessing type. |
| 93 | void TModel::SetPredictionType(const Napi::CallbackInfo& info) { |
nothing calls this directly
no test coverage detected