Skip to content

[examples] fixing some dependencies and test requirements#3605

Merged
sindhuvahinis merged 1 commit into
deepjavalibrary:masterfrom
sindhuvahinis:examples
Feb 14, 2025
Merged

[examples] fixing some dependencies and test requirements#3605
sindhuvahinis merged 1 commit into
deepjavalibrary:masterfrom
sindhuvahinis:examples

Conversation

@sindhuvahinis

Copy link
Copy Markdown
Contributor

Description

I was doing some testing the examples with ObjectDetection example, with four of the engines our examples support. PyTorch, TensorFlow, OnnxRuntime and MXNet.

export DJL_DEFAULT_ENGINE=[PyTorch, OnnxRuntime, MXNet, TensorFlow]
./gradlew run && mvn package && mvn exec:java -Dexec.mainClass="ai.djl.examples.inference.cv.ObjectDetection"

  • mvn package was failing because it did not have the common-io version. The error I got was NoClassDefFound org/apache/commons/io/input/UnsynchronizedBufferedReader
  • Some of the tests are not supported by some of the engines, because the operations that were used by these examples are not implemented for these engines. Since the default engine is PyTorch, it was succeeding in the CI. Excluding the tests the are not supported by the engines.

@sindhuvahinis sindhuvahinis requested review from a team and zachgk as code owners February 7, 2025 22:39
Comment thread examples/pom.xml
<version>1.9.0</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why was the missing dependency only discovered now? Wondering if we need to add some more dep verification checks to the CI

@frankfliu frankfliu Feb 8, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is transient dependency, it should work even without this. I tested locally, it works, and I didn't see NoClassDefFound org/apache/commons/io/input/UnsynchronizedBufferedReader

@sindhuvahinis sindhuvahinis merged commit 714e0ad into deepjavalibrary:master Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants