-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpSearcher reduces OpListings too eagerly #649
Comments
I'll note that yesterday I made a very hacky fix that seemed to make things work for my current use case in napari-imagej. It did, as far as I can remember, two things:
|
I may not be understanding the issue correctly, but based on how op reduction works—i.e., what the In order for this op reduction thing to work, in general, we need to lean on the |
Yup, I agree.
I thought they did too, but that doesn't seem to be happening.
Keep in mind that the |
Here's a test (below) that fails. I placed it in
OpSearcherTest.java
.This test creates an Op
TooMuchReductionOp
, aUnaryComputerOp
that takes an image and aRealType
, and places its output in theRealType
.The test itself gets the
OpSearchResult
wrapping the Op, and tries to ensure that its arguments are the same type as the Op. It fails on the lineAssert.assertEquals(testRealType.getClass(), itr.next().getType());
The funny thing is that if you removed the type assertions, the test will pass, because
OpListings
are super lenient in the types they accept. But this means that GUIs like Fiji and napari-imagej will fail when trying to run Ops like this, because they are providing incorrect inputs due to the type hints.The crux of this issue is the
OpSearcher
s eagerness to reduceRealType
parameters toNumber
s. Thus Ops likeimage.invert
,imagemoments.__
, etc. are affected. The question is, what to do about it...The text was updated successfully, but these errors were encountered: