airbus / scikit-decide

AI framework for Reinforcement Learning, Automated Planning and Scheduling
https://airbus.github.io/scikit-decide
MIT License
137 stars 27 forks source link

V1.0.1 c++ solver import bug on Windows #425

Open NansDarraillan opened 1 day ago

NansDarraillan commented 1 day ago

🐛 Bug

C++ solvers import fails with scikit-decide 1.0.1. This seems to be very specific to Windows setups so please check the environment below. I'm trying with Astar, while debugging I saw that the line 37 (from __skdecide_hub_cpp import AStarSolver as astar_solver) of skdecide.hub.sovers.astar.py makes the python process halt without raising Exception. This does not happen with scikit-decide 1.0.0

To Reproduce

Steps to reproduce the behavior:

  1. Install scikit-decide 1.0.1 on Windows 10 Python 3.11 (oh, and discrete-optimization ;) )
  2. from skdecide.hub.solver.astar import Astar
  3. Python script exited, no Exception

Environment

PyTorch version: 2.3.1+cpu Is debug build: False CUDA used to build PyTorch: None ROCM used to build PyTorch: N/A

OS: Microsoft Windows 10 Enterprise GCC version: Could not collect Clang version: Could not collect CMake version: Could not collect Libc version: N/A

Python version: 3.11.4 (tags/v3.11.4:d2340ef, Jun 7 2023, 05:45:37) [MSC v.1934 64 bit (AMD64)] (64-bit runtime) Python platform: Windows-10-10.0.19045-SP0 Is CUDA available: False CUDA runtime version: No CUDA GPU models and configuration: No CUDA Nvidia driver version: No CUDA cuDNN version: No CUDA HIP runtime version: N/A MIOpen runtime version: N/A

Versions of relevant libraries: [pip3] numpy==1.26.4 [pip3] scikit-decide==1.0.1 [pip3] torch==2.3.1 [conda] Could not collect

Skdecide version: 1.0.1

nhuet commented 1 day ago

Here is the commands i tried, but without raising any issues:

conda create -n python311 "python==3.11"
conda activate python311
pip install -U pip
pip install scikit-decide
pip install discrete-optimization
python -c "from skdecide.hub.solver.astar import Astar; print('DONE')"

It displays "DONE" as expected which means that the import did not make the python process terminate. Is it working for you? How your procedure is different? If not using conda, how have you installed python 3.11 (maybe it is the only difference with me)?

I do not have windows 10 though, only windows 11, i am not sure how this is relevant. Could you try if using conda solves the issue for you?