Skip to content

Conversation

aglinxinyuan
Copy link
Contributor

@aglinxinyuan aglinxinyuan commented Jul 5, 2025

Introduce the Sklearn Testing Operator, which accepts any number of machine learning models (from 1 to n) and computes accuracy, F1 score, precision, and recall for each model, appending these metrics to the output columns.

There is a port dependency between the model and the data: the data port must be finished first. The data table is then used as an internal state for testing. This operator can accept any number of models; each model will be tested against the same data table.

Input single model:
Screenshot 2025-07-04 at 22 54 33

Input multiple models:
Screenshot 2025-07-04 at 22 47 09

@Copilot Copilot AI review requested due to automatic review settings July 5, 2025 04:47
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new “Sklearn Testing” operator that computes common evaluation metrics on a collected dataset using a provided scikit-learn model.

  • Introduces SklearnTestingOpDesc with Python code generation for accuracy, F1, precision, and recall.
  • Registers the new operator in the logical operator registry.
  • Extends the output schema to include the computed metric fields.

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
core/workflow-operator/src/main/scala/edu/uci/ics/amber/operator/sklearn/testing/SklearnTestingOpDesc.scala New operator descriptor for Sklearn testing with codegen and schema updates
core/workflow-operator/src/main/scala/edu/uci/ics/amber/operator/LogicalOp.scala Added registration of the Sklearn Testing operator
Comments suppressed due to low confidence (1)

core/workflow-operator/src/main/scala/edu/uci/ics/amber/operator/sklearn/testing/SklearnTestingOpDesc.scala:33

  • This new operator does not appear to have any associated unit or integration tests; adding test coverage for typical and edge-case scenarios would help ensure correctness.
class SklearnTestingOpDesc extends PythonOperatorDescriptor {

@aglinxinyuan aglinxinyuan changed the title feat(op): introduce sklearn testing feat(op): introduce sklearn testing operator Jul 5, 2025
@aglinxinyuan aglinxinyuan changed the title feat(op): introduce sklearn testing operator feat(operator): sklearn testing operator Jul 5, 2025
Copy link
Contributor

@Yicong-Huang Yicong-Huang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This operator's design can be further discussed.

@aglinxinyuan
Copy link
Contributor Author

aglinxinyuan commented Jul 12, 2025

Had offline discussions.
We will NOT add this version of the testing op for now, but I might change it to the "regular" version later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants