-
Notifications
You must be signed in to change notification settings - Fork 705
[Intermediate Representation] Enable Hive e2e test #1060
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Yancey0623
merged 6 commits into
sql-machine-learning:develop
from
Yancey0623:ir_enable_hive_e2e
Oct 24, 2019
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a89acb7
enable ir hive e2e test
Yancey0623 ee68a6f
fix ut
Yancey0623 15db7c9
update
Yancey0623 077bff3
Merge branch 'develop' of github.com:sql-machine-learning/sqlflow int…
Yancey0623 bbfc0ef
update
Yancey0623 2cefb61
update tf codegen test
Yancey0623 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -118,7 +118,7 @@ func AssertGreaterEqualAny(a *assert.Assertions, actual *any.Any, expected inter | |
| case "type.googleapis.com/google.protobuf.FloatValue": | ||
| b := wrappers.FloatValue{} | ||
| ptypes.UnmarshalAny(actual, &b) | ||
| a.GreaterOrEqual(float32(expected.(float64)), b.Value) | ||
| a.GreaterOrEqual(b.Value, float32(expected.(float64))) | ||
| } | ||
| } | ||
|
|
||
|
|
@@ -189,7 +189,10 @@ func prepareTestData(dbStr string) error { | |
| if err := testdata.Popularize(testDB.DB, testdata.IrisHiveSQL); err != nil { | ||
| return err | ||
| } | ||
| return testdata.Popularize(testDB.DB, testdata.ChurnHiveSQL) | ||
| if err = testdata.Popularize(testDB.DB, testdata.ChurnHiveSQL); err != nil { | ||
| return err | ||
| } | ||
| return testdata.Popularize(testDB.DB, testdata.HousingSQL) | ||
| case "maxcompute": | ||
| submitter := os.Getenv("SQLFLOW_submitter") | ||
| if submitter == "alps" { | ||
|
|
@@ -381,6 +384,38 @@ func TestEnd2EndHive(t *testing.T) { | |
| t.Run("CaseTrainDeepWideModel", CaseTrainDeepWideModel) | ||
| } | ||
|
|
||
| func TestEnd2EndHiveIR(t *testing.T) { | ||
| if os.Getenv("SQLFLOW_codegen") != "ir" { | ||
| t.Skip("Skipping ir test") | ||
| } | ||
|
|
||
| if os.Getenv("SQLFLOW_TEST_DB") != "hive" { | ||
| t.Skip("Skipping hive tests") | ||
| } | ||
|
|
||
| modelDir := "" | ||
| tmpDir, caCrt, caKey, err := generateTempCA() | ||
| defer os.RemoveAll(tmpDir) | ||
| if err != nil { | ||
| t.Fatalf("failed to generate CA pair %v", err) | ||
| } | ||
|
|
||
| dbConnStr = "hive://root:[email protected]:10000/iris?auth=NOSASL" | ||
| go start("", modelDir, caCrt, caKey, true, unitestPort) | ||
| waitPortReady(fmt.Sprintf("localhost:%d", unitestPort), 0) | ||
| err = prepareTestData(dbConnStr) | ||
| if err != nil { | ||
| t.Fatalf("prepare test dataset failed: %v", err) | ||
| } | ||
| t.Run("TestShowDatabases", CaseShowDatabases) | ||
| t.Run("TestSelect", CaseSelect) | ||
| t.Run("TestTrainSQL", CaseTrainSQL) | ||
| t.Run("CaseTrainCustomModel", CaseTrainCustomModel) | ||
| t.Run("CaseTrainDeepWideModel", CaseTrainDeepWideModel) | ||
| t.Run("CaseTrainXGBoostRegression", CaseTrainXGBoostRegression) | ||
| t.Run("CasePredictXGBoostRegression", CasePredictXGBoostRegression) | ||
| } | ||
|
|
||
| func TestEnd2EndMaxCompute(t *testing.T) { | ||
| testDBDriver := os.Getenv("SQLFLOW_TEST_DB") | ||
| modelDir, _ := ioutil.TempDir("/tmp", "sqlflow_ssl_") | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.