Open lldelisle opened 1 week ago
(I don't think it is the origin of the bug but just to let you know, I trained the model with version 1.0.0 and upgraded to 1.1.0 to plot)
Haven't seen this before, we normally have unit tests for this. I'll try to reproduce asap.
I have numpy 1.22.4, I think this is the issue...
Actually I have seen this before. I remember that upgrading to numpy 2.+ indeed fixed this. How did you create your environment? When I create a standard crested environment with python 3.10 then numpy 2.1.2 gets installed and I don't run into any issues. For python 3.10 numpy also recommend version 1.23+
I am a newbie in GPU so I made the virtual environment on my HPC using module load to be sure pytorch will recognize the GPU and then tried to install other dependencies without overwritting existing installation. Here are the command lines:
module purge
module load gcc/11.3.0 python/3.10.4 openmpi/4.1.3-cuda
# With openmpi comes cuda/11.8.0
# Only the first time:
virtualenv --system-site-packages venv9
# Activate
source venv9/bin/activate
pip install --no-cache-dir torch
pip install --no-cache-dir keras
pip install --no-cache-dir crested urllib3==1.26.6 numpy=='1.22.4' platformdirs=='2.4.0' sentry_sdk==1.9.0
I've just created a new virtualenv with:
# Try pytorch with pip
module purge
module load gcc/11.3.0 python/3.10.4
# Only the first time:
virtualenv venv7
# Activate
source venv7/bin/activate
pip install --no-cache-dir torch
pip install --no-cache-dir crested
And it solved the issue (but I got another bug, I will write a different issue).
Then I would say that you should set numpy>2 in dependencies no?
Then I would say that you should set numpy>2 in dependencies no?
Yes, I'll do just this. Thanks for bringing this up.
You are welcome. I like when people report bugs to my project so I prevent other people to face the same bug but being too shy to report it and not use the package... I hope you are in the same spirit because it seems that I faced other bugs...
Absolutely, feedback is greatly appreciated! I just realized the solution is not as simple here after all, since torch would require >2 but tensorflow only works with <2 🙃 . I'll see if I can fix this in the code itself early next week.
Report
Hi, I got the following error when trying to use calculate_contribution_scores_regions with pytorch:
If you need more info, tell me I can try to make a minimal example.
Version information
I don't have session_info but I can give you the output of pip list: