-
Notifications
You must be signed in to change notification settings - Fork 130
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
SliceNdLayer added set_tag_on_size_tensor for dynamic size case #661
SliceNdLayer added set_tag_on_size_tensor for dynamic size case #661
Conversation
Yea looks good. Why is this a draft? Is this still incomplete? You again might want to add a simple test case. |
Because of the other error I described in my comment. Or should I open an issue for that instead? |
Is that a separate issue or not? This sounds very much like a totally independent problem (in |
It's separate, I'll open an issue for that.
What kind of test? The behavior did not really change. Or should I create a simple test where I check whether the |
No.
You said it can lead to an error. So you could write a test which leads to this error. And as I understand you, your fix resolves the error then. |
The fact that the |
No, the test should not check for that. I don't understand. You get an error. You can write a test case which reproduces exactly the error. Then you fix it (via |
Oh okay, so the test should fail before my commit and it should succeed after my commit? I can do that. What would be the appropriate test file for that? |
Yes exactly. Like basically most tests. Esp via PRs which fix certain issues.
Yes. Just next/below the other slice-nd-layer or related tests. But keep the test really simple, minimal (short) and fast. |
In general, it's maybe not always needed to write a test. Maybe also not here. Although it also doesn't hurt. For more complex issues where the origin of the issue is not really clear, this is almost always helpful. This is basically my workflow. First have a reduced test case which reproduces the problem. This is usually also much faster and easier to run and to debug. Then debug it and try to understand it better. Maybe reduce it even further. Maybe write other further test cases to test for specific other things. Until I finally understand the issue. Then I try to fix it. Once the test runs through, this is mostly done. And test cases are also helpful such that this will not break accidentally by some other change in the future. Because we always make sure that all tests are passing. |
85b48b0
to
3b60489
Compare
This is the simplest test I could come up with right now in order to reproduce my error. It seems to be caused if |
This has to be inside a rec layer to be triggered? |
Btw, again, why is this a draft? Is this still incomplete? |
Yes, I first tried doing it outside the rec layer and there were no problems. Actually: let me try again |
So the simpler test is also valid now? I wondered why the rec layer was needed. This did not make sense to me. |
Yes, the simpler test is valid too. When I tried first without the rec layer, I thought the problem was somewhere else that's why I used the rec layer |
If we do not do the
set_tag_on_size_tensor
, then the"_is_size_of_dim_tag"
attribute of the tag will not be set and this can lead to an error in follow-up layers: