Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reranking example run failed, djl version 0.28.0 #494

Open
kdYY opened this issue Aug 8, 2024 · 3 comments
Open

Reranking example run failed, djl version 0.28.0 #494

kdYY opened this issue Aug 8, 2024 · 3 comments

Comments

@kdYY
Copy link

kdYY commented Aug 8, 2024

when I run this code https://github.com/deepjavalibrary/djl-demo/blob/master/huggingface/nlp/src/main/java/com/examples/Reranking.java, it failed

WechatIMG18

@kdYY kdYY changed the title Reranking example run failed Reranking example run failed, djl version 0.28.0 Aug 8, 2024
@frankfliu
Copy link
Contributor

@kdYY

Seems you are not running the project using djl-demo repo, can you share your build.gradle or pom.xml file?

I think you didn't include tokenizer dependency: https://github.com/deepjavalibrary/djl-demo/blob/master/huggingface/nlp/build.gradle.kts#L19

@kdYY
Copy link
Author

kdYY commented Aug 9, 2024

@kdYY

似乎您没有使用 djl-demo repo 运行项目,您可以分享您的 build.gradle 或 pom.xml 文件吗?

我认为你没有包含 tokenizer 依赖项:https://github.com/deepjavalibrary/djl-demo/blob/master/huggingface/nlp/build.gradle.kts#L19

<dependency>
            <groupId>com.microsoft.onnxruntime</groupId>
            <artifactId>onnxruntime</artifactId>
            <version>1.18.0</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>ai.djl.pytorch</groupId>
            <artifactId>pytorch-engine</artifactId>
            <version>0.28.0</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>ai.djl</groupId>
            <artifactId>api</artifactId>
            <version>0.28.0</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>ai.djl</groupId>
            <artifactId>model-zoo</artifactId>
            <version>0.28.0</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>ai.djl.huggingface</groupId>
            <artifactId>tokenizers</artifactId>
            <version>0.28.0</version>
            <scope>compile</scope>
        </dependency>

@frankfliu here

@frankfliu
Copy link
Contributor

Can you create a demo project that can reproduce this issue?
Can you try to run Ranking.java from djl-demo repo and see if that work for you?

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

No branches or pull requests

2 participants