From d4e94a92c2af14bf59809db6a7bff4146f88ed4c Mon Sep 17 00:00:00 2001 From: Pete Date: Wed, 29 Nov 2023 15:18:07 +0000 Subject: [PATCH] Downgrade DJL to 0.24.0 Necessary because of https://github.com/deepjavalibrary/djl/issues/2875 --- CHANGELOG.md | 2 +- buildSrc/src/main/groovy/qupath.djl-conventions.gradle | 9 +++++++-- gradle/libs.versions.toml | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ecdbaa8b..31a133db1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -148,7 +148,7 @@ This appears to be related to time spent initializing JavaFX. ### Dependency updates * Bio-Formats 7.0.1 -* DeepJavaLibrary 0.25.0 +* DeepJavaLibrary 0.24.0 * Groovy 4.0.15 * Guava 32.1.3-jre * ImageJ 1.54f diff --git a/buildSrc/src/main/groovy/qupath.djl-conventions.gradle b/buildSrc/src/main/groovy/qupath.djl-conventions.gradle index 0ceb89c3f..12ae649d8 100644 --- a/buildSrc/src/main/groovy/qupath.djl-conventions.gradle +++ b/buildSrc/src/main/groovy/qupath.djl-conventions.gradle @@ -25,6 +25,7 @@ if ('tensorflow' in djlEngines && properties['platform.shortName'] == 'mac' && S } def djlApi = !djlEngines.isEmpty() || project.findProperty('djl.api') +def djlZero = djlApi && project.findProperty('djl.zero') def djlZoosProp = project.findProperty('djl.zoos') ?: "all" djlZoosProp = djlZoosProp.strip().toLowerCase() @@ -40,9 +41,13 @@ else def djlVersion = libs.versions.deepJavaLibrary.get() dependencies { - if (djlApi) + if (djlApi) { implementation libs.deepJavaLibrary - + } + if (djlZero) { + implementation "ai.djl:djl-zero:$djlVersion" + } + if ('pytorch' in djlEngines) { implementation "ai.djl.pytorch:pytorch-engine:$djlVersion" if ('pytorch' in djlZoos) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 6b6ae8154..70bff1e55 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -8,7 +8,7 @@ commonsMath3 = "3.6.1" commonsText = "1.10.0" controlsFX = "11.1.2" -deepJavaLibrary = "0.25.0" +deepJavaLibrary = "0.24.0" groovy = "4.0.15" gson = "2.10.1"