deepjavalibrary / djl

An Engine-Agnostic Deep Learning Framework in Java
https://djl.ai
Apache License 2.0
4.07k stars 650 forks source link

Can user create custom NLP Dataset by extending from ai.djl.basicdataset.nlp.TextDataset? #2269

Closed SuperMaskv closed 1 year ago

SuperMaskv commented 1 year ago

I'm trying to create custom dataset class from ai.djl.basicdataset.nlp.TextDataset, but the Builder inside TextDataset has a package-level constructor which I can't extends from other package. Is that a bug? Should the constructor be public? I' m using dependency below:

<dependency>
    <groupId>ai.djl</groupId>
    <artifactId>basicdataset</artifactId>
    <version>0.20.0</version>
</dependency>
frankfliu commented 1 year ago

Thanks for reporting this issue. Will create a PR to fix this bug.