MCPcopy Create free account
hub / github.com/sql-machine-learning/sqlflow / ExecuteShowTrain

Method ExecuteShowTrain

go/executor/executor.go:511–523  ·  view source on GitHub ↗
(showTrain *ir.ShowTrainStmt)

Source from the content-addressed store, hash-verified

509func (s *pythonExecutor) GetTrainStmtFromModel() bool { return true }
510
511func (s *pythonExecutor) ExecuteShowTrain(showTrain *ir.ShowTrainStmt) error {
512 model, err := model.Load(showTrain.ModelName, "", s.Db)
513 if err != nil {
514 s.Writer.Write("Load model meta " + showTrain.ModelName + " failed.")
515 return err
516 }
517 header := make(map[string]interface{})
518 header["columnNames"] = []string{"Model", "Train Statement"}
519 s.Writer.Write(header)
520 s.Writer.Write([]interface{}{showTrain.ModelName, strings.TrimSpace(model.TrainSelect)})
521
522 return nil
523}

Callers

nothing calls this directly

Calls 2

LoadFunction · 0.92
WriteMethod · 0.45

Tested by

no test coverage detected