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

Replicate code for Pretrained Policy #1

Open
Maya199x opened this issue Sep 16, 2022 · 0 comments
Open

Replicate code for Pretrained Policy #1

Maya199x opened this issue Sep 16, 2022 · 0 comments

Comments

@Maya199x
Copy link

Maya199x commented Sep 16, 2022

Hey there I am trying to replicate the code and I've got a question! This is my first time opening an issue - if I forget something vital to include please tell me.

Installing the requirements with pip install -r requirements.txt and executing python policy/reinforce.py --exp_name MultiBandit and also python policy/reinforce.py --exp_name GridWorld has worked.

The problem I have encountered is in trying to execute 'python policy/reinforce.py --exp_name CartPole'.

I get this error log:

❯ python policy/reinforce.py --exp_name CartPole
/Users/maya199x/miniforge3/envs/testCode/lib/python3.10/site-packages/gym/envs/registration.py:555: UserWarning: WARN: The environment CartPole-v0 is out of date. You should consider upgrading to version `v1`.
  logger.warn(
training: CartPole, config: (<TimeLimit<OrderEnforcing<PassiveEnvChecker<CartPoleEnv<CartPole-v0>>>>>, 200, 0.99, 0.001, [1000])
Traceback (most recent call last):
  File "/Users/maya199x/Documents/PythonFiles/RobustOnPolicyData/policy/reinforce.py", line 301, in <module>
    train()
  File "/Users/maya199x/Documents/PythonFiles/RobustOnPolicyData/policy/reinforce.py", line 181, in train
    env.seed(0)
  File "/Users/maya199x/miniforge3/envs/testCode/lib/python3.10/site-packages/gym/core.py", line 242, in __getattr__
    return getattr(self.env, name)
  File "/Users/maya199x/miniforge3/envs/testCode/lib/python3.10/site-packages/gym/core.py", line 242, in __getattr__
    return getattr(self.env, name)
  File "/Users/maya199x/miniforge3/envs/testCode/lib/python3.10/site-packages/gym/core.py", line 242, in __getattr__
    return getattr(self.env, name)
AttributeError: 'CartPoleEnv' object has no attribute 'seed'

Is there some issue with my installation? Or is it something else entirely? Any help would be much appreciated!

I am running the code on a macbook m1 2020, in a conda virtual environment with python version 3.10.6.

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

No branches or pull requests

1 participant