InAnYan / jabref

Graphical Java application for managing BibTeX and biblatex (.bib) databases
https://devdocs.jabref.org
MIT License
0 stars 0 forks source link

Embedding model should not be downloaded at each start #132

Closed koppor closed 3 months ago

koppor commented 3 months ago

On Linux Mint, on each start (!) it says, the embedding model is downloaded:

2024-08-07 06:32:46 [pool-2-thread-1] org.jabref.logic.ai.models.EmbeddingModel.rebuild()
INFO: Downloading embedding model...

(java:2067): Gdk-WARNING **: 06:32:47.068: XSetErrorHandler() called with a GDK error trap pushed. Don't do that.
2024-08-07 06:32:47 [JavaFX Application Thread] org.freedesktop.dbus.connections.transports.TransportBuilder.build()
INFO: Using transport dbus-java-transport-native-unixsocket to connect to unix:path=/run/user/1000/bus
2024-08-07 06:32:47 [JavaFX Application Thread] org.jabref.gui.StateManager.setActiveDatabase()
INFO: No open database detected
2024-08-07 06:32:49 [pool-2-thread-2] org.jabref.gui.JabRefDialogService.notify()
INFO: Opening: '/home/vagrant/jabref/src/test/resources/testbib/Chocolate.bib'
2024-08-07 06:32:49 [JavaFX Application Thread] sun.util.logging.internal.LoggingProviderImpl$JULWrapper.log()
WARN: Resource "" not found.
Loading:     100% |████████████████████████████████████████|
2024-08-07 06:32:51 [pool-2-thread-1] ai.djl.pytorch.engine.PtEngine.newInstance()
INFO: PyTorch graph executor optimizer is enabled, this may impact your inference latency and throughput. See: https://docs.djl.ai/docs/development/inference_performance_optimization.html#graph-executor-optimization

I think, the log output should only be done IF (!) there is something downloaded.

Also the progressbar should only be shown IF (!) somethign is downloaded.

InAnYan commented 3 months ago

Result from call: check if the model is downloaded, then display the background task

InAnYan commented 3 months ago

Otherwise: change title to "Updating local embedding model"

InAnYan commented 3 months ago

Closing, as chosen variant "Updating..."

Opened an issue on DJL: https://github.com/deepjavalibrary/djl/issues/3397