-
Notifications
You must be signed in to change notification settings - Fork 222
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
Add py311, remove py37 #320
Add py311, remove py37 #320
Conversation
I could do with a bit of help on this one. Two tests failing:
It looks like this is caused by an upgrade of
It doesn't seem to matter what versions of There are in general quite a few errors when running the tests, not sure what to make of them. |
I've had that issue for a while with multi-variate normal distribution - in my case i turned the I can try to have a deeper look later today ! |
I agree with removing support for 3.7 as it's end of like for Python as well. I'm working to get through some other PRs and I'll work to help figure out the failures here. Thanks for the PR |
@jack-mcivor can you re-run checks here? Logs have expired, would like to see the errors. Thanks |
@ryan-wolbeck those logs should be available now |
Here's what I'm working on testing here for an update:
I'm planning to work through these updates this week and will hopefully push some code here before the end of the week. |
@jack-mcivor I've been working through tests on the versions of SciPy and supported python versions here https://github.com/stanfordmlgroup/ngboost/tree/pr-320 though I've not been successful even when pushing SciPy beyond 1.8.1 which requires > python 3.8 and still run into the the same issues and seem to be stuck. In order to keep moving forward. I think we should create a new PR to just fix the issue with np.bool so that we can push an update to fix those issues for usability, once that is merged into main I then think we should work towards this removal of 3.7 (and maybe 3.8 but about 15% of downloads come from 3.8 still). I'm worried with this PR that we are going to struggle to find the root cause though I think you are likely right that it's a SciPy issue. Would you mind creating another PR just to address the np.bool issue since it should already be within the code you added here? If you don't have time I can also work towards splitting it out myself as well. |
Hello, Thank you for your work on NGBoost, and answering my comment on #336 😊 As mentioned in this issue, the bug with |
#337 is to fix the bool deprecation |
@ryan-wolbeck it's been a while since I looked at this, but is there anything else we can do? I think the failing test is not specific to Python versions at all, but scipy? According to the current constraints, a user could install scipy>=1.9 and get failing tests. So, I think we should xfail this test, or if it is a real problem, then constrain scipy<1.9. What do you think? |
@jack-mcivor lets merge the latest changes from master so we can build the tests faster. From there I'll pull this again and test out the versions to dig in further |
@ryan-wolbeck done, still seems to exhibit the same behaviour. A minimal & fast reproducer is pytest 'tests/test_distns.py::test_dists_runs_on_examples_logscore[learner0-T]' |
The error message indicates that a numpy.linalg.LinAlgError: Singular matrix error occurred. This error is raised when a function in the numpy.linalg module, such as numpy.linalg.solve, is applied to a singular (or non-invertible) matrix. In this case, the error occurred in the grad method of the Score class in ngboost/scores.py. This method tries to solve a linear system using the numpy.linalg.solve function, which fails if the input matrix is singular. The test_dists_runs_on_examples_logscore test is failing because it's trying to fit an NGBRegressor with a T distribution, which seems to be causing the singular matrix error. I think you are right that we should just allow this T in this case to fail (skip the test). I tested an implementation here https://github.com/stanfordmlgroup/ngboost/tree/pr-320-2 and got things to build. I did play around with the versions a bit as well but I don't think that's actually necessary to get the xfail to allow the failure to occur due to the singular matrix error. Can you push a similar implementation here? @alejandroschuler do you have any concerns with us allowing this case to fail in order to support 3.11? |
@ryan-wolbeck sure let's let that test fail, nbd |
@ryan-wolbeck thanks, that should be ready now |
Fixes #319
It is easiest to implement NEP-29. All current versions of numpy, scipy, scikit-learn are built for 3.8-3.11 (and do not support Python 3.7)
Pandas can be removed as it is a transitive dependency only.
np.bool
was deprecated in NumPy 1.20.