Skip to content

Infinite loop in ordering of waveform transforms #3762

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

Closed
a-r-williamson opened this issue Aug 9, 2021 · 1 comment
Closed

Infinite loop in ordering of waveform transforms #3762

a-r-williamson opened this issue Aug 9, 2021 · 1 comment
Assignees

Comments

@a-r-williamson
Copy link
Contributor

When applying the rigid rotational transform being worked on in #3756 I hit an infinite loop in the order_transforms function. This happened in a case when I defined priors on the cartesian spin components, which are both input to and output by the transform, and this was the only transform being applied. As a result this line resolves as False and we get stuck.

I would be interested in hearing suggestions about how to overcome this. Is this a bug that could recur in other cases that we should fix? (There look to be other transforms that have parameters common between their inputs and outputs, e.g.). Or would it be preferable to change our new transform to avoid this?

@a-r-williamson a-r-williamson self-assigned this Aug 9, 2021
@cdcapano
Copy link
Contributor

Interesting... I forgot we had transforms that can have shared input and output parameters (we really haven't used the other spin transforms; they were written as a part of a master's student's project, then never really put to use). The ordering function should be able to handle that. I think the easiest solution is to modify order_transforms to pull out new outputs rather than all outputs. In other words, change line 2268 to:

outputs = set().union(*[set(t.outputs)-set(t.inputs) for t in transforms])

I think that should do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants