The GitHub Actions job "Required Checks" on texera.git/fix/7593-knn-metric-converters has failed. Run started by GitHub user kz930 (triggered by kz930).
Head commit for run: b0e2e599d272511ae8cdbf55c553ff0bb2334870 / kary zheng <[email protected]> feat(operator): give the KNN trainers' metric and metric_params a working converter SklearnAdvancedKNNParameters pairs each hyperparameter with the Python callable that converts what the user typed. Two of the seven named one that cannot produce what scikit-learn accepts, so picking either failed the run whatever was entered, from the same dropdown as the five that work. Both trainers share the enum, so both were affected. metric was declared int. Its accepted values are words, so int("minkowski") raises before scikit-learn sees anything, and a number that does convert is rejected as not one of the accepted names. It is now str, which weights and algorithm beside it already are. metric_params takes a mapping of extra keyword arguments for the metric, and none of int, float or str returns one, so a well-formed {"p": 2} arrived as that same text. It now names json.loads. The type has never been limited to builtins (SVC and SVR name an inline lambda for their boolean parameters), but json.loads needs the module, so the generated template imports json. Unconditionally rather than when such a parameter is present: the alternative is threading each converter's imports through every ParamClass for one parameter of one operator. Checked against scikit-learn both ways. Before: int("minkowski") raises ValueError, and metric=int("3") reaches the estimator and is rejected as not an accepted metric name. After: minkowski with metric_params {"p": 3} fits and predicts with the mapping arriving as a dict, chebyshev fits on the regressor, and mahalanobis with a VI matrix fits, which is what metric_params is for. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Report URL: https://github.com/apache/texera/actions/runs/31642017998 With regards, GitHub Actions via GitBox
