Skip to content

Update to DJL 0.34.0#1975

Merged
petebankhead merged 2 commits intoqupath:mainfrom
petebankhead:djl
Aug 28, 2025
Merged

Update to DJL 0.34.0#1975
petebankhead merged 2 commits intoqupath:mainfrom
petebankhead:djl

Conversation

@petebankhead
Copy link
Member

Addresses #1974


Not ready to be merged yet: I find it does enable the use of PyTorch 2.7.1 (good!) but breaks the InstanSeg extension (bad!).

Reason seems... surprising.

We make calls to baseManager.debugDump(2). This attempts to create a substring of a UUID, which would be ok except that UUIDs aren't used any more.

The result is

java.lang.StringIndexOutOfBoundsException: Range [24, 21) out of bounds for length 21
	at java.base/jdk.internal.util.Preconditions$1.apply(Preconditions.java:55)
	at java.base/jdk.internal.util.Preconditions$1.apply(Preconditions.java:52)
	at java.base/jdk.internal.util.Preconditions$4.apply(Preconditions.java:213)
	at java.base/jdk.internal.util.Preconditions$4.apply(Preconditions.java:210)
	at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:98)
	at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckFromToIndex(Preconditions.java:112)
	at java.base/jdk.internal.util.Preconditions.checkFromToIndex(Preconditions.java:349)
	at java.base/java.lang.String.checkBoundsBeginEnd(String.java:4865)
	at java.base/java.lang.String.substring(String.java:2834)
	at java.base/java.lang.String.substring(String.java:2807)
	at ai.djl.ndarray.BaseNDManager.debugDump(BaseNDManager.java:426)
	at qupath.ext.instanseg.core.InstanSeg.runInstanSeg(InstanSeg.java:239)

We should be able to work around it by avoiding any use of debugDump - I've checked that removing this line means that InstanSeg can run. But I suspect this must affect others.

@petebankhead
Copy link
Member Author

petebankhead commented Aug 27, 2025

I've merged qupath/qupath-extension-instanseg#172 so once we make a new InstanSeg extension release then we can merge this too.

We may as well merge qupath/qupath-extension-instanseg#168 first though @alanocallaghan

@petebankhead petebankhead marked this pull request as ready for review August 28, 2025 09:06
@petebankhead petebankhead merged commit 3084fbf into qupath:main Aug 28, 2025
3 checks passed
@petebankhead petebankhead deleted the djl branch August 28, 2025 09:06
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.

1 participant