-
Notifications
You must be signed in to change notification settings - Fork 705
[Intermediate Representation] Add e2e test for IR analyze #1061
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
[Intermediate Representation] Add e2e test for IR analyze #1061
Conversation
Yancey0623
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with tiny comment.
| stmt := ` | ||
| SELECT * | ||
| FROM housing.train | ||
| ANALYZE sqlflow_models.my_xgb_regression_model |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please note that go test may run test cases unordered, the model may be not generated when running this test, it's better to generate this model first before running ANALYZE.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ref introduces a go test run parallel with other tests if and only if the t.Parallel() was called.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not about parallelism, it's about the order, see https://stackoverflow.com/questions/31201858/how-to-run-golang-tests-sequentially, it says:
You can't / shouldn't rely on test execution order. The order in which tests are executed is not defined, and with the use of testing flags it is possible to exclude tests from running, so you have no guarantee that they will run at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In our e2e test, the subtests are ordered by group
sqlflow/cmd/sqlflowserver/main_test.go
Lines 308 to 310 in 672d4ef
| t.Run("CaseTrainXGBoostRegressionIR", CaseTrainXGBoostRegression) | |
| t.Run("CasePredictXGBoostRegressionIR", CasePredictXGBoostRegression) | |
| t.Run("CaseAnalyzeXGBoostModel", CaseTrainAndAnalyzeXGBoostModel) |
But we would run
go test -run CaseTrainAndAnalyzeXGBoostModel independently some times, it needs an existed model, so I add the several codes for that.
Fix #977