Skip to content

Commit 21e2c0a

Browse files
wangkuiyitonyyang-svail
authored andcommitted
Update test_e2e.sh (#783)
* Remove -c from the bash commandline * Update test_e2e.sh * Dont install Ant-XGBoost into Docker image by default * Remove an An-XGboost unit test which fails and is skipped * Install standard XGBosot * skip ant-xgb test
1 parent b047bc5 commit 21e2c0a

File tree

7 files changed

+15
-219
lines changed

7 files changed

+15
-219
lines changed

scripts/image_build.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,10 @@ echo 'get_ipython().magic(u"%reload_ext sqlflow.magic")' >> $IPYTHON_STARTUP/00-
114114
echo 'get_ipython().magic(u"%autoreload 2")' >> $IPYTHON_STARTUP/00-first.py
115115
curl https://raw.githubusercontent.com/sql-machine-learning/sqlflow/develop/example/jupyter/example.ipynb --output /workspace/example.ipynb
116116

117-
# 9. install xgboost-launcher
118-
pip install xgboost-launcher==0.0.4
117+
# 9. install xgboost
118+
pip install xgboost==0.90
119+
# Re-enable this after Ant-XGBoost is ready.
120+
# pip install xgboost-launcher==0.0.4
119121

120122
# 10. install Hadoop to use as the client when writing CSV to hive tables
121123
HADOOP_URL=https://archive.apache.org/dist/hadoop/common/stable/hadoop-${HADOOP_VERSION}.tar.gz

scripts/test_e2e.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ export PYTHONPATH=$GOPATH/src/github.com/sql-machine-learning/sqlflow/sql/python
4848
sqlflowserver --datasource=${DATASOURCE} &
4949
# e2e test for standard SQL
5050
SQLFLOW_SERVER=localhost:50051 ipython sql/python/test_magic.py
51-
# e2e test for ant-xgboost train and prediciton SQL.
52-
SQLFLOW_SERVER=localhost:50051 ipython sql/python/test_magic_ant_xgboost.py
51+
# TODO(yi): Re-enable the end-to-end test of Ant XGBoost after accelerating Travis CI.
52+
# SQLFLOW_SERVER=localhost:50051 ipython sql/python/test_magic_ant_xgboost.py
5353
# TODO(terrytangyuan): Enable this when ElasticDL is open sourced
5454
# e2e test for ElasticDL SQL
5555
# export SQLFLOW_submitter=elasticdl

sql/codegen_ant_xgboost_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ USING sqlflow_models.boston_antXG_model;
7676
)
7777

7878
func TestPartials(t *testing.T) {
79+
t.Skip()
7980
a := assert.New(t)
8081
tmpMap := make(map[string][]string)
8182
filler := &antXGBoostFiller{}
@@ -145,6 +146,7 @@ func TestPartials(t *testing.T) {
145146
}
146147

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

247249
func TestColumnClause(t *testing.T) {
250+
t.Skip()
248251
a := assert.New(t)
249252
parser := newParser()
250253
sqlHead := `
@@ -353,6 +356,7 @@ LABEL e INTO model_table;
353356
}
354357

355358
func TestXGBoostFiller(t *testing.T) {
359+
t.Skip()
356360
a := assert.New(t)
357361

358362
parser := newParser()

sql/executor_test.go

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -71,40 +71,7 @@ func TestSplitExtendedSQL(t *testing.T) {
7171
a.Equal(`train a with b;`, s[0])
7272
}
7373

74-
func TestExecutorTrainAnalyzePredictAntXGBoost(t *testing.T) {
75-
t.Skip("Fix this failed test later")
76-
a := assert.New(t)
77-
modelDir, e := ioutil.TempDir("/tmp", "sqlflow_models")
78-
a.Nil(e)
79-
defer os.RemoveAll(modelDir)
80-
81-
runWithVerify := func(trainSql, predSql, analyzeSql, modelName string, baseline float32) {
82-
a.NotPanics(func() {
83-
stream := runExtendedSQL(trainSql, testDB, modelDir, nil)
84-
a.True(goodStream(stream.ReadAll()))
85-
if len(modelName) >= 0 {
86-
metrics, e := loadXgTrainMetrics(testDB, modelDir, modelName)
87-
a.NoError(e)
88-
a.True(metrics.verifyPerf(baseline))
89-
}
90-
91-
if len(analyzeSql) > 0 {
92-
stream = runExtendedSQL(analyzeSql, testDB, modelDir, nil)
93-
a.True(goodStream(stream.ReadAll()))
94-
}
95-
if len(predSql) > 0 {
96-
stream = runExtendedSQL(predSql, testDB, modelDir, nil)
97-
a.True(goodStream(stream.ReadAll()))
98-
}
99-
})
100-
}
101-
runWithVerify(testAntXGTrainSelectIris, testAntXGPredSelectIris, testAntXGAnalyzeSelectIris, "sqlflow_models.iris_antXG_model", 0.0001)
102-
if getEnv("SQLFLOW_TEST_DB", "mysql") == "mysql" {
103-
runWithVerify(testAntXGTrainSelectBoston, testAntXGPredSelectBoston, "", "sqlflow_models.boston_antXG_model", 3.5)
104-
}
105-
}
106-
107-
func TestExecutorXGBoost(t *testing.T) {
74+
func TestExecutorTrainXGBoost(t *testing.T) {
10875
a := assert.New(t)
10976
modelDir := ""
11077
a.NotPanics(func() {

sql/python/sqlflow_submitter/ant_xgboost/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@
1111
# See the License for the specific language governing permissions and
1212
# limitations under the License.
1313

14+
#TODO(Yancey1989): Re-enable xgboost-launcher if it ready
15+
"""
1416
from .sqlflow_data_source import SQLFlowDataSource, SQLFlowDSConfig
1517
from .sqlflow_ant_xgboost_main import run_with_sqlflow
1618
from .common import AntXGBoostError
1719
1820
__all__ = ['run_with_sqlflow', 'SQLFlowDataSource', 'SQLFlowDSConfig', 'AntXGBoostError']
21+
"""

sql/python/sqlflow_submitter/ant_xgboost/sqlflow_data_source.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import typing
1717
from typing import Iterator
1818

19+
1920
from launcher import DataSource, config_fields, XGBoostResult, XGBoostRecord
2021
from launcher.data_units import RecordBuilder
2122

sql/python/sqlflow_submitter/ant_xgboost/sqlflow_data_source_test.py

Lines changed: 0 additions & 181 deletions
This file was deleted.

0 commit comments

Comments
 (0)