oscerd opened a new pull request, #25849: URL: https://github.com/apache/camel/pull/25849
## Issue [CAMEL-24526](https://issues.apache.org/jira/browse/CAMEL-24526) ## Problem `ZooLinearRegressionPredictor` and `ZooSoftmaxRegressionPredictor` were empty stubs: ```java @Override public void process(Exchange exchange) throws Exception { // TODO: impl } ``` `ModelPredictorProducer.getZooPredictor()` routes `djl:tabular/linear_regression` and `djl:tabular/softmax_regression` (in zoo mode) to these classes, so the producer did **nothing** and the exchange body was passed through unchanged — the input was silently returned as if it were the model's prediction. This is a silent wrong-result bug: a route appears to run a regression but never does. ## Why not just implement them? The DJL model zoo publishes **no** tabular regression models — the test class documents exactly this (`ModelPredictorProducerTest` lines 92–93: *"No builtin zoo model available for tabular/linear_regression / softmax_regression"*), consistent with the other applications that have no downloadable artifact. Unlike CV (`Image` → `Classifications`) or NLP (`String` → …), a tabular model has no fixed input/output type pair and DJL provides no generic tabular `Translator`; those types are specific to the user's data. There is therefore nothing generic a zoo predictor could load or translate. The supported way to run a tabular model is the **custom** variant (`CustomTabularPredictor`), where the user supplies their own `Model` and `Translator` via the registry. ## Fix - Remove the two no-op stub classes. - `getZooPredictor()` now throws a clear `RuntimeCamelException` for the tabular applications, telling the user to provide their own model and translator and use the custom predictor instead — a loud, actionable failure instead of a silently wrong result. - Add `testGetZooPredictorRejectsTabularApplications` covering both applications. The custom tabular path (`CustomTabularPredictor`) is unchanged and still fully supported. ## Testing - `mvn -pl components/camel-ai/camel-djl test` (new test green; existing tests unaffected). - `mvn -Psourcecheck validate` green (formatter + impsort). _Claude Code on behalf of oscerd_ -- 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]
