You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "aglinxinyuan (via GitHub)" <gi...@apache.org> on 2026/07/01 01:25:10 UTC

[PR] test(workflow-operator): add unit test coverage for ML scorer and sort enums [texera]

aglinxinyuan opened a new pull request, #6044:
URL: https://github.com/apache/texera/pull/6044

   ### What changes were proposed in this PR?
   
   Pin behavior of three previously-untested ML-scorer / sort enums in `common/workflow-operator`. No production-code changes.
   
   | Spec | Source enum | Tests |
   | --- | --- | --- |
   | `classificationMetricsFncSpec` | `classificationMetricsFnc` | 2 |
   | `regressionMetricsFncSpec` | `regressionMetricsFnc` | 2 |
   | `SortPreferenceSpec` | `SortPreference` | 2 |
   
   **Behavior pinned**
   
   | Surface | Contract |
   | --- | --- |
   | wire mapping | `classificationMetricsFnc`/`regressionMetricsFnc` `@JsonValue` names (`Accuracy`/`Precision Score`/…, `MSE`/`RMSE`/…); constant counts |
   | `SortPreference` | `ASC`/`DESC` constants (no `@JsonValue`, so serialized by constant name) |
   | Jackson round-trip | serialize + deserialize back to the constant |
   
   ### Any related issues, documentation, discussions?
   
   Part of the ongoing `workflow-operator` unit-test coverage effort.
   
   ### How was this PR tested?
   
   - `sbt "WorkflowOperator/testOnly *classificationMetricsFncSpec *regressionMetricsFncSpec *SortPreferenceSpec"` — 6 tests, all green
   - `sbt "WorkflowOperator/Test/scalafmtCheck"` and `sbt "WorkflowOperator/scalafixAll --check"` — clean
   - CI to confirm
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Opus 4.8 [1M context])
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(workflow-operator): add unit test coverage for ML scorer and sort enums [texera]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #6044:
URL: https://github.com/apache/texera/pull/6044#issuecomment-4849424697

   <!-- texera-benchmarks-comment -->
   ## ⚠️ Benchmark changes need a look
   
   🟢 2 better · 🔴 3 worse · ⚪ 10 noise (<±5%) · 0 without baseline
   
   > Compared against main `434bcae` benchmarked on **this same runner**, so the delta is largely free of cross-runner hardware noise. The "7d avg" column still reflects the gh-pages dashboard. Treat <±5% as noise unless repeated.
   
   [Dashboard](https://apache.github.io/texera/dev/bench/) · [Run](https://github.com/apache/texera/actions/runs/28487054582)
   
   | | config | throughput | MB/s | latency | max Δ latest / 7d |
   |---|---|---:|---:|---:|---:|
   | 🔴 | bs=10 sw=10 sl=64 | 450 | 0.275 | 20,918/28,406/28,406 us | 🔴 +13.8% / 🔴 +88.5% |
   | ⚪ | bs=100 sw=10 sl=64 | 934 | 0.57 | 104,465/126,662/126,662 us | ⚪ within ±5% / 🔴 +17.7% |
   | ⚪ | bs=1000 sw=10 sl=64 | 1,120 | 0.683 | 895,331/933,133/933,133 us | ⚪ within ±5% / 🟢 -11.8% |
   
   <details><summary>Baseline details</summary>
   
   Latest main `434bcae` from same runner
   
   | config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
   |---|---|---:|---:|---:|---:|---:|
   | bs=10 sw=10 sl=64 | throughput | 450 tuples/sec | 475 tuples/sec | 777.62 tuples/sec | -5.3% | -42.1% |
   | bs=10 sw=10 sl=64 | MB/s | 0.275 MB/s | 0.29 MB/s | 0.475 MB/s | -5.2% | -42.1% |
   | bs=10 sw=10 sl=64 | p50 | 20,918 us | 18,386 us | 12,612 us | +13.8% | +65.9% |
   | bs=10 sw=10 sl=64 | p95 | 28,406 us | 29,979 us | 15,070 us | -5.2% | +88.5% |
   | bs=10 sw=10 sl=64 | p99 | 28,406 us | 29,979 us | 18,360 us | -5.2% | +54.7% |
   | bs=100 sw=10 sl=64 | throughput | 934 tuples/sec | 950 tuples/sec | 988.31 tuples/sec | -1.7% | -5.5% |
   | bs=100 sw=10 sl=64 | MB/s | 0.57 MB/s | 0.58 MB/s | 0.603 MB/s | -1.7% | -5.5% |
   | bs=100 sw=10 sl=64 | p50 | 104,465 us | 104,944 us | 101,066 us | -0.5% | +3.4% |
   | bs=100 sw=10 sl=64 | p95 | 126,662 us | 126,749 us | 107,594 us | -0.1% | +17.7% |
   | bs=100 sw=10 sl=64 | p99 | 126,662 us | 126,749 us | 115,830 us | -0.1% | +9.4% |
   | bs=1000 sw=10 sl=64 | throughput | 1,120 tuples/sec | 1,088 tuples/sec | 1,019 tuples/sec | +2.9% | +9.9% |
   | bs=1000 sw=10 sl=64 | MB/s | 0.683 MB/s | 0.664 MB/s | 0.622 MB/s | +2.9% | +9.8% |
   | bs=1000 sw=10 sl=64 | p50 | 895,331 us | 922,132 us | 986,982 us | -2.9% | -9.3% |
   | bs=1000 sw=10 sl=64 | p95 | 933,133 us | 942,911 us | 1,028,491 us | -1.0% | -9.3% |
   | bs=1000 sw=10 sl=64 | p99 | 933,133 us | 942,911 us | 1,058,493 us | -1.0% | -11.8% |
   
   </details>
   
   <details><summary>Raw CSV</summary>
   
   ```csv
   config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
   0,10,10,64,20,444.58,200,128000,450,0.275,20917.90,28406.23,28406.23
   1,100,10,64,20,2140.74,2000,1280000,934,0.570,104464.52,126662.22,126662.22
   2,1000,10,64,20,17861.05,20000,12800000,1120,0.683,895330.60,933132.58,933132.58
   ```
   
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(workflow-operator): add unit test coverage for ML scorer and sort enums [texera]

Posted by "xuang7 (via GitHub)" <gi...@apache.org>.
xuang7 merged PR #6044:
URL: https://github.com/apache/texera/pull/6044


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(workflow-operator): add unit test coverage for ML scorer and sort enums [texera]

Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan commented on code in PR #6044:
URL: https://github.com/apache/texera/pull/6044#discussion_r3502800368


##########
common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/machineLearning/Scorer/regressionMetricsFncSpec.scala:
##########
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.texera.amber.operator.machineLearning.Scorer
+
+import org.apache.texera.amber.util.JSONUtils.objectMapper
+import org.scalatest.flatspec.AnyFlatSpec
+import org.scalatest.matchers.should.Matchers
+
+class regressionMetricsFncSpec extends AnyFlatSpec with Matchers {

Review Comment:
   Done — renamed the class and file to RegressionMetricsFncSpec (UpperCamelCase) for Scala naming consistency and test-report discoverability.



##########
common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/machineLearning/Scorer/classificationMetricsFncSpec.scala:
##########
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.texera.amber.operator.machineLearning.Scorer
+
+import org.apache.texera.amber.util.JSONUtils.objectMapper
+import org.scalatest.flatspec.AnyFlatSpec
+import org.scalatest.matchers.should.Matchers
+
+class classificationMetricsFncSpec extends AnyFlatSpec with Matchers {

Review Comment:
   Done — renamed the class and file to ClassificationMetricsFncSpec (UpperCamelCase).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(workflow-operator): add unit test coverage for ML scorer and sort enums [texera]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #6044:
URL: https://github.com/apache/texera/pull/6044#issuecomment-4849413943

   ## [Codecov](https://app.codecov.io/gh/apache/texera/pull/6044?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 56.93%. Comparing base ([`434bcae`](https://app.codecov.io/gh/apache/texera/commit/434bcae08d4536e391ccd3217014c3830fd3aa22?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`2b7a6d9`](https://app.codecov.io/gh/apache/texera/commit/2b7a6d9e50dff597ef169f7c2d79c8998309f00b?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@            Coverage Diff            @@
   ##               main    #6044   +/-   ##
   =========================================
     Coverage     56.93%   56.93%           
     Complexity     3026     3026           
   =========================================
     Files          1129     1129           
     Lines         43794    43794           
     Branches       4743     4743           
   =========================================
     Hits          24936    24936           
     Misses        17384    17384           
     Partials       1474     1474           
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/texera/pull/6044/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | *Carryforward flag |
   |---|---|---|---|
   | [access-control-service](https://app.codecov.io/gh/apache/texera/pull/6044/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `70.00% <ø> (ø)` | | Carriedforward from [434bcae](https://app.codecov.io/gh/apache/texera/commit/434bcae08d4536e391ccd3217014c3830fd3aa22?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [agent-service](https://app.codecov.io/gh/apache/texera/pull/6044/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `44.59% <ø> (ø)` | | Carriedforward from [434bcae](https://app.codecov.io/gh/apache/texera/commit/434bcae08d4536e391ccd3217014c3830fd3aa22?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [amber](https://app.codecov.io/gh/apache/texera/pull/6044/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `58.76% <ø> (ø)` | | Carriedforward from [434bcae](https://app.codecov.io/gh/apache/texera/commit/434bcae08d4536e391ccd3217014c3830fd3aa22?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [computing-unit-managing-service](https://app.codecov.io/gh/apache/texera/pull/6044/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `0.00% <ø> (ø)` | | Carriedforward from [434bcae](https://app.codecov.io/gh/apache/texera/commit/434bcae08d4536e391ccd3217014c3830fd3aa22?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [config-service](https://app.codecov.io/gh/apache/texera/pull/6044/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `52.30% <ø> (ø)` | | |
   | [file-service](https://app.codecov.io/gh/apache/texera/pull/6044/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `62.81% <ø> (ø)` | | Carriedforward from [434bcae](https://app.codecov.io/gh/apache/texera/commit/434bcae08d4536e391ccd3217014c3830fd3aa22?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [frontend](https://app.codecov.io/gh/apache/texera/pull/6044/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `50.12% <ø> (ø)` | | Carriedforward from [434bcae](https://app.codecov.io/gh/apache/texera/commit/434bcae08d4536e391ccd3217014c3830fd3aa22?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [notebook-migration-service](https://app.codecov.io/gh/apache/texera/pull/6044/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `78.57% <ø> (ø)` | | Carriedforward from [434bcae](https://app.codecov.io/gh/apache/texera/commit/434bcae08d4536e391ccd3217014c3830fd3aa22?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [pyamber](https://app.codecov.io/gh/apache/texera/pull/6044/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `90.20% <ø> (ø)` | | Carriedforward from [434bcae](https://app.codecov.io/gh/apache/texera/commit/434bcae08d4536e391ccd3217014c3830fd3aa22?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [python](https://app.codecov.io/gh/apache/texera/pull/6044/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `90.76% <ø> (ø)` | | Carriedforward from [434bcae](https://app.codecov.io/gh/apache/texera/commit/434bcae08d4536e391ccd3217014c3830fd3aa22?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [workflow-compiling-service](https://app.codecov.io/gh/apache/texera/pull/6044/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.14% <ø> (ø)` | | Carriedforward from [434bcae](https://app.codecov.io/gh/apache/texera/commit/434bcae08d4536e391ccd3217014c3830fd3aa22?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   *This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/texera/pull/6044?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(workflow-operator): add unit test coverage for ML scorer and sort enums [texera]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #6044:
URL: https://github.com/apache/texera/pull/6044#discussion_r3502719866


##########
common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/machineLearning/Scorer/classificationMetricsFncSpec.scala:
##########
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.texera.amber.operator.machineLearning.Scorer
+
+import org.apache.texera.amber.util.JSONUtils.objectMapper
+import org.scalatest.flatspec.AnyFlatSpec
+import org.scalatest.matchers.should.Matchers
+
+class classificationMetricsFncSpec extends AnyFlatSpec with Matchers {

Review Comment:
   Spec class name is lowerCamelCase, which is inconsistent with the rest of the Scala test suite in this module and makes the type harder to discover in IDE/test reports. Rename the class to UpperCamelCase (and ideally rename the file to match).



##########
common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/machineLearning/Scorer/regressionMetricsFncSpec.scala:
##########
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.texera.amber.operator.machineLearning.Scorer
+
+import org.apache.texera.amber.util.JSONUtils.objectMapper
+import org.scalatest.flatspec.AnyFlatSpec
+import org.scalatest.matchers.should.Matchers
+
+class regressionMetricsFncSpec extends AnyFlatSpec with Matchers {

Review Comment:
   Spec class name is lowerCamelCase, which is inconsistent with the rest of the Scala test suite in this module (e.g., MachineLearningScorerOpDescSpec) and makes the type harder to discover in IDE/test reports. Rename the class to UpperCamelCase (and ideally rename the file to match).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(workflow-operator): add unit test coverage for ML scorer and sort enums [texera]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #6044:
URL: https://github.com/apache/texera/pull/6044#issuecomment-4849399731

   <!-- texera-reviewer-suggestion -->
   ### Automated Reviewer Suggestions
   
   Based on the `git blame` history of the changed files, we recommend the following reviewers:
   
   - No candidates found from `git blame` history.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org