(t *testing.T)
| 118 | ) |
| 119 | |
| 120 | func TestRunSQLProgram(t *testing.T) { |
| 121 | a := assert.New(t) |
| 122 | modelDir := "" |
| 123 | a.NotPanics(func() { |
| 124 | stream := RunSQLProgram(` |
| 125 | SELECT sepal_length as sl, sepal_width as sw, class FROM iris.train |
| 126 | TO TRAIN xgboost.gbtree |
| 127 | WITH |
| 128 | objective="multi:softprob", |
| 129 | train.num_boost_round = 30, |
| 130 | eta = 0.4, |
| 131 | num_class = 3 |
| 132 | LABEL class |
| 133 | INTO sqlflow_models.my_xgboost_model_by_program; |
| 134 | |
| 135 | SELECT sepal_length as sl, sepal_width as sw FROM iris.test |
| 136 | TO PREDICT iris.predict.class |
| 137 | USING sqlflow_models.my_xgboost_model_by_program; |
| 138 | |
| 139 | SELECT sepal_length as sl, sepal_width as sw, class FROM iris.train |
| 140 | TO EXPLAIN sqlflow_models.my_xgboost_model_by_program |
| 141 | USING TreeExplainer; |
| 142 | `, modelDir, database.GetSessionFromTestingDB()) |
| 143 | a.True(test.GoodStream(stream.ReadAll())) |
| 144 | }) |
| 145 | } |
| 146 | |
| 147 | func TestExecuteXGBoostClassifier(t *testing.T) { |
| 148 | a := assert.New(t) |
nothing calls this directly
no test coverage detected