-
Notifications
You must be signed in to change notification settings - Fork 14
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
Only count flags in reflux_star if star is not already flagged #178
Conversation
9b99a2a
to
d84fa54
Compare
I just fixed the problem in treegp for python 3.13 and it is working now. You need to use version 1.3.0 now (I just pushed it). |
Thanks. That seems to have worked. |
Do you want me to add a unit test for this? |
I did add one using mock to force the failure. But if you have something more realistic, that would be great. |
I asked, and I am allowed to put a sample of the data that made the original problem. I have an example with ~30 stamp of real stars, I would be happy to add it for this, but it will allow me to add other unit test latter on for the cpp solver. |
Perfect. Yeah, that would be great. |
I added the test that looks to work on all versions of Python except 3.8. Is it ok to not support python 3.8? It looks like python 3.8 is not maintained anymore (https://devguide.python.org/versions/) and when I am trying to have the last version of numpy (numpy>=2.0), it does not support python 3.8. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me. If you are happy with my last changes, this is good to me. I see the PR is in direction of v1.5, shall it be towards main or am I missing something?
This is a bugfix. So we can release it as a bugfix release on the 1.5.x series. I'll cherry-pick the commits over to main as well ofc. |
v1.5.1 is released with this bugfix. It's on pypi so far. Should be on conda later today. |
@PFLeget noticed a bug in reflux_stars that can cause an (almost) infinite loop. The problem is that any exception encountered while refluxing gets flagged. But this happens even if the star is already flagged. Then in the main fitting routine, it sees what it thinks is a new flagged object and iterates, even if it is the same object failing every time.
The fix is to only count the failure in nremoved if the object is not already flagged.