(cl *ir.PredictStmt)
| 244 | } |
| 245 | |
| 246 | func (s *pythonExecutor) ExecutePredict(cl *ir.PredictStmt) (e error) { |
| 247 | // NOTE(typhoonzero): model is already loaded under s.Cwd |
| 248 | if e = createPredictionResultTable(cl, s.Db, s.Session); e != nil { |
| 249 | return e |
| 250 | } |
| 251 | |
| 252 | var code string |
| 253 | if cl.TrainStmt.GetModelKind() == ir.XGBoost { |
| 254 | if code, e = xgboost.Pred(cl, s.Session); e != nil { |
| 255 | return e |
| 256 | } |
| 257 | } else { |
| 258 | if code, e = tensorflow.Pred(cl, s.Session); e != nil { |
| 259 | return e |
| 260 | } |
| 261 | } |
| 262 | return s.runProgram(code, false) |
| 263 | } |
| 264 | |
| 265 | func (s *pythonExecutor) ExecuteExplain(cl *ir.ExplainStmt) error { |
| 266 | // NOTE(typhoonzero): model is already loaded under s.Cwd |
nothing calls this directly
no test coverage detected