Skip to content
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

Running Stable Baselines on M1 Macs? #1152

Open
adamnhaka opened this issue Feb 25, 2022 · 1 comment
Open

Running Stable Baselines on M1 Macs? #1152

adamnhaka opened this issue Feb 25, 2022 · 1 comment
Labels
question Further information is requested

Comments

@adamnhaka
Copy link

Hi everyone,

A while ago (early 2020) to be precise I compiled a DRL project using SB. Since that time, I've moved on to other things. Recently I purchased an ARM-architecture (i.e. M1) Mac and transferred my files over; however, Stable Baselines doesn't function. When I run the project, the kernel keeps restarting with no error message being displayed; I've followed the installation instructions and even matched the version numbers of TF etc. from my old Intel-based machine (on which the code still appears to run fine).

I also tried experimenting with SB-3, for which the Cartpole training example using PPO from the website ([https://stable-baselines3.readthedocs.io/en/master/guide/examples.html]) does appear to run; however, it is extremely slow.

I'd really appreciate if someone could answer the following questions:

  1. Is there a special procedure for installing Stable Baselines and associated components (e.g. TensorFlow) on M1-based Macs?
  2. Is there a performance penalty of running code on these machines?

Cheers!

@Miffyli Miffyli added the question Further information is requested label Feb 25, 2022
@Miffyli
Copy link
Collaborator

Miffyli commented Feb 25, 2022

Hey! As you already pointed out, SB3 is an option, and I think it might be the best one.
As for your questions:

  1. I do not have exact answers, but Tensorflow is definitely the achilles heel. I am not sure if there is M1 support for tensorflow (you have look online for this). However if you are able to install this, installing stable-baselines should then work.

  2. I imagine so, as M1 is not generally that performant of a chip (but very power efficient!), and especially on Rosetta. I would imagine you experience the same as you did with SB3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants