Fix tests for upgraded dependencies #184
Merged
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.
Update: The root issue was numpy 2. This is a recent upgrade (June 2024), and it seems like many of the packages required for cebra do not easily work with npy2 (yet). Errors included
pandas/pytables, but alsotorch. It would be probably possible to work around these errors, but I think it is not worth yet --- in half a year or so, the situation is probably more stable, and we can remove the pinning.This PR now does the following changes:
numpybelow v2.nlb_toolsto allow use of more recent pandas versions. This will only affect users who want to use the monkey dataset. We provide guidance on how to post-hoc install the package directly via a warning for these users.I propose to merge as-is. From the user perspective, it is slightly annoying that CEBRA does not run with numpy 2 for now, but given the errors caused in other upstream packages, chances are that no one uses numpy 2 (yet) in the first place. We just still aim to remove the pinning again as soon as possible.
Old description:
This PR aims to solve some of the broken tests we saw in recent PRs (e.g. #166 #183 #175 #180 ). My hypothesis is that the
nlb_toolspackage which we require for the test workflow right now is the root cause, which cases pandas to be downgraded to1.3.4(https://github.com/neurallatents/nlb_tools/blob/main/requirements.txt#L1), while the current pandas version is 2.2.3 (https://pypi.org/project/pandas/).The build issue was a pandas <> numpy version mismatch (numpy was >2, pandas at 1.3.4 before), so hopefully this fixes the build.
I removed this depedency which causes more recent versions of all packages to be installed. This caused some plotly tests to break, which now do stricter checking on the colormaps. I also updated one of the helper functions there.
Let's see if this passes as-is on github, local tests look good.