Repository navigation
Scijava/scijava ops engine/skip map history - #64
Conversation
ctrueden
left a comment
There was a problem hiding this comment.
Looks awesome. I commented on one small thing, but I think we should merge this as-is as soon as possible, to get the nondeterministic failures under control.
|
|
||
| if (centerAwareOp instanceof RichOp) { | ||
| ((RichOp)centerAwareOp).metadata().hints().minus( | ||
| BaseOpHints.History.SKIP_RECORDING); |
There was a problem hiding this comment.
If SKIP_RECORDING hint was already set before getting plussed in above... then should we still be minusing it out again here? Don't we just want to restore the hints back to their original state?
|
On this branch, I do get one failure in imagej-ops2, on both the CLI and in IntelliJ: According to the stack trace, it's still trying to log the output of individual pixels. It's like the hint isn't being respected. |
ctrueden
left a comment
There was a problem hiding this comment.
On second thought, I think we better get to the bottom of the hint-propagation failure before merging this. I strongly considered just commenting out the offending test, but it's going to bite us sooner rather than later if we do that.
938d24c to
8af31af
Compare
8af31af to
0ecefdd
Compare
The ProvenanceTest relies on history being recorded and this always skipping seems aggressive.
History.SKIP_RECORDING hint is used to skip history recording in the AbstractRichOp constructor, so this hint should also be respected in the postprocess step of recording output.
This isn't the center-aware impl
0ecefdd to
3253890
Compare
|
There are cases we want to control what the Hints are during some stages of matching.
Per-pixel operations with imglib2 we can reasonably assume to be operating on Type wrappers that have some level of reuse. These are not thread-safe to use as output keys in our history, thus we cannot be recording per-pixel history.
3253890 to
94ae742
Compare
ctrueden
left a comment
There was a problem hiding this comment.
With OpenJDK 17.0.3, there is an unrelated JPMS issue with scijava-persist
[INFO] Running org.scijava.persist.SerializationTests
IClassAdapters :
IRunTimeClassAdapters :
interface org.scijava.persist.Shape
class org.scijava.persist.Circle
class org.scijava.persist.Shapes$Diamond
class org.scijava.persist.Shapes$Rectangle
IClassAdapters :
IRunTimeClassAdapters :
interface org.scijava.persist.Shape
class org.scijava.persist.Circle
class org.scijava.persist.Shapes$Diamond
class org.scijava.persist.Shapes$Rectangle
[ERROR] Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.213 s <<< FAILURE! - in org.scijava.persist.SerializationTests
[ERROR] testCircleObject Time elapsed: 0.192 s <<< ERROR!
java.lang.reflect.InaccessibleObjectException: Unable to make field int org.scijava.persist.Circle.radius accessible: module org.scijava.persist does not "opens org.scijava.persist" to module com.google.gson
at org.scijava.persist@0-SNAPSHOT/org.scijava.persist.SerializationTests.testSerializationDeserialization(SerializationTests.java:76)
at org.scijava.persist@0-SNAPSHOT/org.scijava.persist.SerializationTests.testCircleObject(SerializationTests.java:50)
[ERROR] testDrawingObject Time elapsed: 0.012 s <<< ERROR!
java.lang.reflect.InaccessibleObjectException: Unable to make field int org.scijava.persist.Circle.radius accessible: module org.scijava.persist does not "opens org.scijava.persist" to module com.google.gson
at org.scijava.persist@0-SNAPSHOT/org.scijava.persist.SerializationTests.testSerializationDeserialization(SerializationTests.java:76)
at org.scijava.persist@0-SNAPSHOT/org.scijava.persist.SerializationTests.testDrawingObject(SerializationTests.java:62)
With OpenJDK 11.0.16, I got the following results:
- BUILD SUCCESS on Ubuntu
- BUILD SUCCESS on macOS
- BUILD FAILURE on Ubuntu:
org.scijava.ops.api.features.OpMatchingException: No MatchingRoutine was able to produce a match! at net.imagej.ops2@0-SNAPSHOT/net.imagej.ops2.identity.IdentityTest.testIdentity(IdentityTest.java:49) - BUILD SUCCESS on macOS
- BUILD SUCCESS on Ubuntu
This No MatchingRoutine was able to produce a match! error is not new; it was happening intermittently previously, and will need investigation, but I do not think it should hold up merging of this PR, which does seem to address the AIOOBEs and likely performance issues of map operations.
Closes scijava/scijava#99
See also #100 and #101