Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions scripts/image_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,10 @@ echo 'get_ipython().magic(u"%reload_ext sqlflow.magic")' >> $IPYTHON_STARTUP/00-
echo 'get_ipython().magic(u"%autoreload 2")' >> $IPYTHON_STARTUP/00-first.py
curl https://raw.githubusercontent.com/sql-machine-learning/sqlflow/develop/example/jupyter/example.ipynb --output /workspace/example.ipynb

# 9. install xgboost-launcher
pip install xgboost-launcher==0.0.4
# 9. install xgboost
pip install xgboost==0.90
# Re-enable this after Ant-XGBoost is ready.
# pip install xgboost-launcher==0.0.4

# 10. install Hadoop to use as the client when writing CSV to hive tables
HADOOP_URL=https://archive.apache.org/dist/hadoop/common/stable/hadoop-${HADOOP_VERSION}.tar.gz
Expand Down
4 changes: 2 additions & 2 deletions scripts/test_e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ export PYTHONPATH=$GOPATH/src/github.com/sql-machine-learning/sqlflow/sql/python
sqlflowserver --datasource=${DATASOURCE} &
# e2e test for standard SQL
SQLFLOW_SERVER=localhost:50051 ipython sql/python/test_magic.py
# e2e test for ant-xgboost train and prediciton SQL.
SQLFLOW_SERVER=localhost:50051 ipython sql/python/test_magic_ant_xgboost.py
# TODO(yi): Re-enable the end-to-end test of Ant XGBoost after accelerating Travis CI.
# SQLFLOW_SERVER=localhost:50051 ipython sql/python/test_magic_ant_xgboost.py
# TODO(terrytangyuan): Enable this when ElasticDL is open sourced
# e2e test for ElasticDL SQL
# export SQLFLOW_submitter=elasticdl
Expand Down
4 changes: 4 additions & 0 deletions sql/codegen_ant_xgboost_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ USING sqlflow_models.boston_antXG_model;
)

func TestPartials(t *testing.T) {
t.Skip()
a := assert.New(t)
tmpMap := make(map[string][]string)
filler := &antXGBoostFiller{}
Expand Down Expand Up @@ -145,6 +146,7 @@ func TestPartials(t *testing.T) {
}

func TestXGBoostAttr(t *testing.T) {
t.Skip()
a := assert.New(t)
assertEq := func(m map[string]interface{}, key string, refVal interface{}) {
val, _ := m[key]
Expand Down Expand Up @@ -245,6 +247,7 @@ USING sqlflow_models.my_xgboost_model;
}

func TestColumnClause(t *testing.T) {
t.Skip()
a := assert.New(t)
parser := newParser()
sqlHead := `
Expand Down Expand Up @@ -353,6 +356,7 @@ LABEL e INTO model_table;
}

func TestXGBoostFiller(t *testing.T) {
t.Skip()
a := assert.New(t)

parser := newParser()
Expand Down
35 changes: 1 addition & 34 deletions sql/executor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,40 +71,7 @@ func TestSplitExtendedSQL(t *testing.T) {
a.Equal(`train a with b;`, s[0])
}

func TestExecutorTrainAnalyzePredictAntXGBoost(t *testing.T) {
t.Skip("Fix this failed test later")
a := assert.New(t)
modelDir, e := ioutil.TempDir("/tmp", "sqlflow_models")
a.Nil(e)
defer os.RemoveAll(modelDir)

runWithVerify := func(trainSql, predSql, analyzeSql, modelName string, baseline float32) {
a.NotPanics(func() {
stream := runExtendedSQL(trainSql, testDB, modelDir, nil)
a.True(goodStream(stream.ReadAll()))
if len(modelName) >= 0 {
metrics, e := loadXgTrainMetrics(testDB, modelDir, modelName)
a.NoError(e)
a.True(metrics.verifyPerf(baseline))
}

if len(analyzeSql) > 0 {
stream = runExtendedSQL(analyzeSql, testDB, modelDir, nil)
a.True(goodStream(stream.ReadAll()))
}
if len(predSql) > 0 {
stream = runExtendedSQL(predSql, testDB, modelDir, nil)
a.True(goodStream(stream.ReadAll()))
}
})
}
runWithVerify(testAntXGTrainSelectIris, testAntXGPredSelectIris, testAntXGAnalyzeSelectIris, "sqlflow_models.iris_antXG_model", 0.0001)
if getEnv("SQLFLOW_TEST_DB", "mysql") == "mysql" {
runWithVerify(testAntXGTrainSelectBoston, testAntXGPredSelectBoston, "", "sqlflow_models.boston_antXG_model", 3.5)
}
}

func TestExecutorXGBoost(t *testing.T) {
func TestExecutorTrainXGBoost(t *testing.T) {
a := assert.New(t)
modelDir := ""
a.NotPanics(func() {
Expand Down
3 changes: 3 additions & 0 deletions sql/python/sqlflow_submitter/ant_xgboost/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

#TODO(Yancey1989): Re-enable xgboost-launcher if it ready
"""
from .sqlflow_data_source import SQLFlowDataSource, SQLFlowDSConfig
from .sqlflow_ant_xgboost_main import run_with_sqlflow
from .common import AntXGBoostError

__all__ = ['run_with_sqlflow', 'SQLFlowDataSource', 'SQLFlowDSConfig', 'AntXGBoostError']
"""
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import typing
from typing import Iterator


from launcher import DataSource, config_fields, XGBoostResult, XGBoostRecord
from launcher.data_units import RecordBuilder

Expand Down
181 changes: 0 additions & 181 deletions sql/python/sqlflow_submitter/ant_xgboost/sqlflow_data_source_test.py

This file was deleted.