aglinxinyuan opened a new issue, #5765:
URL: https://github.com/apache/texera/issues/5765

   ### Task Summary
   
   Add dedicated unit-specs for four small sklearn-trainer descriptor 
subclasses in 
`common/workflow-operator/operator/machineLearning/sklearnAdvanced/`. Each 
subclass is a 30-line override of `SklearnMLOperatorDescriptor` that 
contributes just two values: the `import` statement for the Python sklearn 
module and the user-friendly operator-info string. Drift in either string 
silently breaks the generated Python notebook or the UI label.
   
   ## Background
   
   Four sklearn-trainer descriptors in `common/workflow-operator/` lack a 
dedicated unit-spec. All four extend `SklearnMLOperatorDescriptor[ParamsT]` 
(parameterized by the trainer's own parameters bag) and override the two 
abstract hooks the parent exposes:
   
   | Source class | `getImportStatements` | `getOperatorInfo` |
   | --- | --- | --- |
   | `SklearnAdvancedKNNClassifierTrainerOpDesc` | `"from sklearn.neighbors 
import KNeighborsClassifier"` | `"KNN Classifier"` |
   | `SklearnAdvancedKNNRegressorTrainerOpDesc` | `"from sklearn.neighbors 
import KNeighborsRegressor"` | `"KNN Regressor"` |
   | `SklearnAdvancedSVCTrainerOpDesc` | `"from sklearn.svm import SVC"` | 
`"SVM Classifier"` |
   | `SklearnAdvancedSVRTrainerOpDesc` | `"from sklearn.svm import SVR"` | 
`"SVM Regressor"` |
   
   ## Behavior to pin
   
   For each descriptor:
   
   | Surface | Contract |
   | --- | --- |
   | `getImportStatements` | exact canonical string (matches the table above) |
   | `getOperatorInfo` | exact canonical string |
   | Inheritance | subclass extends `SklearnMLOperatorDescriptor` (compile-time 
enforced via type-pattern in the test) |
   | Stability across two instances | both methods return the same string 
regardless of which instance is queried (no instance-state interaction) |
   
   ## Scope
   
   - New spec files (one per source class per the spec-filename convention):
     - `SklearnAdvancedKNNClassifierTrainerOpDescSpec.scala`
     - `SklearnAdvancedKNNRegressorTrainerOpDescSpec.scala`
     - `SklearnAdvancedSVCTrainerOpDescSpec.scala`
     - `SklearnAdvancedSVRTrainerOpDescSpec.scala`
   - No production-code changes.
   
   ### Task Type
   
   - [ ] Refactor / Cleanup
   - [ ] DevOps / Deployment / CI
   - [x] Testing / QA
   - [ ] Documentation
   - [ ] Performance
   - [ ] Other


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to