devareddy05 opened a new pull request, #23436:
URL: https://github.com/apache/camel/pull/23436

   # Description
   
   Fixes https://issues.apache.org/jira/browse/CAMEL-22518.
   
   `NlpWordEmbeddingTest` has been permanently `@Disabled` since it was 
introduced
   in CAMEL-20905 ("There is an issue with the DJL model used"). Investigation
   showed the underlying reason is structural rather than a fixable test bug:
   
   * The only DJL zoo model registered under `Application.NLP.WORD_EMBEDDING`
     is `ai.djl.mxnet:glove:0.0.2` (verified on https://mlrepo.djl.ai/), and
     Apache MXNet is discontinued — the test's own `@BeforeAll` already
     notes this.
   * No PyTorch (or any other engine) model in the DJL model zoo is
     registered under `WORD_EMBEDDING`. The DJL `FtModelZoo` only registers
     `TextClassificationModelLoader`, so fasttext is not a drop-in
     replacement either.
   * As a result, `ZooWordEmbeddingPredictor` and the `nlp/word_embedding`
     branch of `ModelPredictorProducer.getZooPredictor` are unreachable in
     practice — there is no zoo artifact that satisfies the
     `Criteria<String, NDList>` + `Application.NLP.WORD_EMBEDDING` filter.
   
   This PR removes the dead zoo path:
   
   * `NlpWordEmbeddingTest` (the always-skipped integration test)
   * `ZooWordEmbeddingPredictor`
   * The `WORD_EMBEDDING` branch of `ModelPredictorProducer.getZooPredictor`
     (and the corresponding import / `ZooWordEmbeddingPredictor` assertion in
     `ModelPredictorProducerTest`)
   * The `GloVe` entry from `djl-component.adoc`
   
   The **custom** path is intentionally kept:
   `CustomWordEmbeddingPredictor` and the `WORD_EMBEDDING` branch of
   `ModelPredictorProducer.getCustomPredictor` remain in place, so routes
   that supply their own `model` + `translator` for `nlp/word_embedding`
   continue to work unchanged.
   
   An upgrade note has been added to
   `docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc`.
   
   ## Verification
   
   * `mvn -pl components/camel-ai/camel-djl -am install -DskipTests` —
     BUILD SUCCESS.
   * `mvn -pl components/camel-ai/camel-djl formatter:format impsort:sort`
     — no diff (nothing to reformat / re-sort).
   * `mvn -pl components/camel-ai/camel-djl test
     -Dtest='ModelPredictorProducerTest#testGetCustomPredictor'
     -DskipTests.aarch64=false` — passes (covers the still-present custom
     `nlp/word_embedding` routing).
   * `testGetZooPredictor` cannot run on aarch64 (the `Arm` profile skips
     these by design — DJL MXNet has no aarch64 natives); CI will validate
     it on x86. The failure I observed when forcing it on aarch64 was on
     an unrelated `cv/*` MXNet line, not on anything this PR touches.
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (Camel 4 
uses the `main` branch)
   
   # Tracking
   
   - [x] If this is a large change, bug fix, or code improvement, I checked 
there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL-22518) 
filed for the change.
   
   # Apache Camel coding standards and style
   
   - [x] I checked that each commit in the pull request has a meaningful 
subject line and body.
   - [x] I have run `mvn formatter:format impsort:sort` locally on the affected 
module (no changes needed).
   
   ---


-- 
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