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

[Question] All three ways of running the code failed in Windows #247

Closed
3 tasks done
623637719 opened this issue Jun 1, 2023 · 8 comments
Closed
3 tasks done

[Question] All three ways of running the code failed in Windows #247

623637719 opened this issue Jun 1, 2023 · 8 comments
Assignees
Labels
question Further information is requested

Comments

@623637719
Copy link

Required prerequisites

Questions

image
As the documentation shows,there are three ways to run the code

1.ca88bd501d03b0045bf97f3a296cd3e
2.725f9a1282b367fc4c3405aafaeca3c
3.51bcb9b069da653f61a5c9289b6f6a4
I've tried every way to run the code but it got errors.Help.....

@623637719 623637719 added the question Further information is requested label Jun 1, 2023
@PKU-Alignment PKU-Alignment deleted a comment from Gaiejj Jun 1, 2023
@PKU-Alignment PKU-Alignment deleted a comment from Gaiejj Jun 1, 2023
@zmsn-2077 zmsn-2077 changed the title [Question] All three ways of running the code failed [Question] All three ways of running the code failed in Windows Jun 1, 2023
@zmsn-2077 zmsn-2077 self-assigned this Jun 1, 2023
@zmsn-2077
Copy link
Member

Hi, @623637719,
I'm sorry, but the use case in the figure is intended for Windows. However, due to multiple dependencies, including the lack of official support for Windows by Gymnasium. Thus, OmniSafe doesn't work under Windows. We recommend using WSL to run the program under the Ubuntu environment on Windows. We have also re-checked our results on Ubuntu, shown in the following steps.

  1. Create a test environment via conda.
conda create -n test_omnisafe python=3.8
  1. Install OmniSafe from PyPI.
pip install omnisafe
  1. Test in ipython.
image

In addition to that, we also support running on Mac OS with Apple Silicon, but this requires some additional configuration. More details can be referred to [BUG] Omnisafe cannot run on a Mac M1 device #190.

@zmsn-2077
Copy link
Member

Feel free to ask to reopen this if you have more questions.

@zmsn-2077 zmsn-2077 reopened this Jun 3, 2023
@623637719
Copy link
Author

623637719 commented Jun 4, 2023 via email

@Gaiejj
Copy link
Member

Gaiejj commented Jun 5, 2023

As soon as I received your message, I immediately began testing.
First, I installed the latest version of Omnisafe from the main branch on my personal Linux computer and ran the main training program for CPO using the following command.

cd examples
python train_policy.py --algo CPO

Second, I also created a Docker image.

cd omnisafe
sudo docker build -t omnisafe .
sudo docker run -i -t omnisafe

Then run the same command

cd examples
python train_policy.py --algo CPO

Both testing methods yielded the same result, which is the successful completion of 1e7 steps in CPO's SafetyPointGoal1.
image
I noticed that in your previous questions, you mentioned installing Omnisafe via PyPI, which differs from the latest version of the source code. In my testing, I also tested Omnisafe installed via PyPI and did not encounter any issues. The version of Omnisafe I installed via PyPI is 0.4.0. I noticed that you mentioned providing a screenshot of an error message, but unfortunately, I didn't see it. If you can provide detailed version information, it would be helpful for us to assist you in resolving your issue.

@Gaiejj Gaiejj reopened this Jun 5, 2023
@623637719
Copy link
Author

623637719 commented Jun 5, 2023 via email

@XuehaiPan
Copy link
Member

@623637719 We do not officially support Windows. Please use WSL, docker, or a native Linux machine to run our code and examples. Also, please provide the relevant information before asking a question, such as your runtime environment and versions, package versions, hyperparameters, and command line options, etc.

PS: Please learn how to ask a question before asking a question and creating a new issue. There is a good lesson How do I ask a good question? for this.

不知道是否方便我们约个腾讯会议

Emailing open-source maintainers directly (or asking for offline help) instead of opening issues on their projects is a rude thing to do. Someone else may face the exact same issue that you are facing. It's not helpful that we resolve this only for you offline. You can post your information, comments, and thoughts on the GitHub page. The whole community can see and learn from that.

@623637719
Copy link
Author

623637719 commented Jun 7, 2023 via email

@zmsn-2077
Copy link
Member

hi, @623637719, we can schedule a meeting to help you resolve this issue. We can communicate via email to determine a mutually convenient time for both parties.

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

4 participants