kengz / SLM-Lab

Modular Deep Reinforcement Learning framework in PyTorch. Companion library of the book "Foundations of Deep Reinforcement Learning".
https://slm-lab.gitbook.io/slm-lab/
MIT License
1.23k stars 263 forks source link

Compatibility to M1 Mac #521

Open jmSNU opened 6 months ago

jmSNU commented 6 months ago

Describe the bug A clear and concise description of what the bug is.

I have successfully completed the entire setup, but I am encountering an issue with the 'python run_lab.py' command. Despite diligently following the provided instructions and attempting to troubleshoot the problem on my own, I have been unable to identify the source of the issue. I would appreciate it if you could confirm whether SLM-Lab works on an ARM64 Macbook. If successful, please share the detailed process, including preparation steps for Linux.

To Reproduce

  1. OS and environment: M1 MacBook air Sonoma 14.2.1
  2. SLM Lab git SHA (run git rev-parse HEAD to get it): 5fa5ee3d034a38d5644f6f96b4c02ec366c831d0
  3. spec file used: slm_lab/spec/demo.json

Additional context Add any other context about the problem here.

Python shut down sometime.

Error logs

(lab) ijeongmin@ijeongmin-ui-MacBookAir SLM-Lab % python run_lab.py slm_lab/spec/demo.json dqn_cartpole dev
zsh: illegal hardware instruction  python run_lab.py slm_lab/spec/demo.json dqn_cartpole dev
kengz commented 5 months ago

apologies - haven't had time to take a look, but indeed this project precedes Apple Silicon - so the fix would be to update the dependencies with their updated ARM support (e.g. Pytorch)