You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While running a Map operation (coarseness), I noticed that the OpHistory was full of keys for all the individual pixels of the operation.
However because UnsignedByteType has a hashCode and equals that is defined by the byte value, the mutationMap is going to look more like a histogram of values, with the resulting pixels getting a number of entries equal to their frequency.
But that doesn't really tell us anything about the order things were done right? And I'm not sure what "history" really means if an op is multithreaded across each pixel in an image.
Also of note was that the map "output" pixels is an anonymous object created as part of a lambda, so it would be reasonable to expect these keys to be GC'd out of the WeakHashMap at any point.. which maybe makes this a moot issue?
So I guess the questions are:
Do we actually care about preserving the per-pixel history of an operation like Map?
If so, is that what we're actually doing now?
If not, should Map actually both recording history?
It looks like a lot of this was solved via scijava/incubator#64, right @hinerm? Is there anything left to do here? E.g. how should simplification/adaptation be handled?
@hinerm I'm sorry I never answered your questions:
Do we actually care about preserving the per-pixel history of an operation like Map?
I'm not sure that I really care - what I care about is that the return from history.executionsUpon(output) returns only the parent Op (i.e. not the dependencies). I feel like, in the case of Map, if history.executionsUpon(output.firstElement()) returns the dependency, that would be optimal. The histogram-like effect you're seeing in that image, though, means we can't obtain that behavior, which is unfortunate.
If so, is that what we're actually doing now?
Right now, we only record the history of Ops that are returned by an ops.op call (or the OpBuilder syntax, which calls that), so internal Op calls (dependencies, simplification, adaptation) shouldn't call that. Do you remember how you produced the mutationMap above?
If not, should Map actually both recording history?
Activity
gselzer commentedon Jul 12, 2023
It looks like a lot of this was solved via scijava/incubator#64, right @hinerm? Is there anything left to do here? E.g. how should simplification/adaptation be handled?
gselzer commentedon Sep 5, 2023
@hinerm I'm sorry I never answered your questions:
I'm not sure that I really care - what I care about is that the return from
history.executionsUpon(output)returns only the parent Op (i.e. not the dependencies). I feel like, in the case ofMap, ifhistory.executionsUpon(output.firstElement())returns the dependency, that would be optimal. The histogram-like effect you're seeing in that image, though, means we can't obtain that behavior, which is unfortunate.Right now, we only record the history of Ops that are returned by an
ops.opcall (or the OpBuilder syntax, which calls that), so internal Op calls (dependencies, simplification, adaptation) shouldn't call that. Do you remember how you produced themutationMapabove?What
Mapare we talking about? If it is themap.neighborhoodOps you altered in scijava/incubator#64, I'm hoping to get rid of those with scijava/incubator#33.Merge pull request #100 from scijava/scijava/scijava-ops-engine/clari…