Workaround (on_pointing_axis_tracking): Take a minimum of 2 timesteps to prevent axes loss to ravels#10
Open
David-McKenna wants to merge 1 commit into2baOrNot2ba:masterfrom
Open
Conversation
3da7565 to
7333ebd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey Tobia,
Ran into a lovely bug in
on_pointing_axis_trackingwhere by if some floating point math causes the observation duration to fall below the observation integration value, dreamBeam exits as a result of the time axes being deleted in a squeeze on a working array.This PR is a workaround for the issue, by requiring at least 2 timesteps be generated for every input, preventing the axes loss and runtime error as a result. I attempted to follow through the code path and see if I could, for example, swap the wildcard indices on jones.py:220 for elipses, but that just caused worse issues later on (0-dim arrays).
A better solution would likely be to manually delete/index axes at jones.py:309 and jones.py:429, but from a brief inspection I wasn't sure which axes you were attempting to get rid of there, leading to this interim patch.
Cheers,
David
Here's the full stack of the original error: