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

Quickstart Examples Not Working #461

Open
avilay opened this issue Apr 25, 2021 · 2 comments
Open

Quickstart Examples Not Working #461

avilay opened this issue Apr 25, 2021 · 2 comments

Comments

@avilay
Copy link

avilay commented Apr 25, 2021

The following commands result in an AttributeError: module 'reagent.gym.tests.test_gym' has no attribute 'run_test’ because the module test_gym does not exist.

export CONFIG=reagent/gym/tests/configs/cartpole/discrete_dqn_cartpole_online.yaml
./reagent/workflow/cli.py run reagent.gym.tests.test_gym.run_test $CONFIG

See full stacktrace here.

Even when I try to run one of the existing modules like run_test_online_episode I get a KeyError: 'state_features'...float_features=batch[InputColumn.STATE_FEATURES]

Here is the full command:

./reagent/workflow/cli.py run reagent.gym.tests.test_gym.run_test_online_episode $CONFIG

See full stacktrace here

On further trying the batch RL example the first command running the offline_gym module works fine. However, the second command running the timeline_operator errors out with java.lang.StringIndexOutOfBoundsException: begin 0, end 3, length 2. Here are the full commands that I ran:

export CONFIG=reagent/workflow/sample_configs/discrete_dqn_cartpole_offline.yaml
./reagent/workflow/cli.py run reagent.workflow.gym_batch_rl.offline_gym $CONFIG
./reagent/workflow/cli.py run reagent.workflow.gym_batch_rl.timeline_operator $CONFIG

See full stacktrace here

Here are my environment details:

  • Hardware: Apple M1

  • OS: Big Sur 11.2

  • Anaconda Python 3.7

  • JRE Details

    • openjdk 16 2021-03-16
    • OpenJDK Runtime Environment Zulu16.28+11-CA (build 16+36)
    • OpenJDK 64-Bit Server VM Zulu16.28+11-CA (build 16+36, mixed mode)
  • ReAgent master branch cloned on 4/23.

  • I had to install a later version of OpenAI gym (0.18.0) because of compatibility issues with M1.

@oshrinm
Copy link

oshrinm commented Jun 23, 2021

I was having the same issue, and after looking through test_gym.py code change history, I believe run_test was renamed run_test_replay_buffer. I tried:

./reagent/workflow/cli.py run reagent.gym.tests.test_gym.run_test_replay_buffer $CONFIG

and got it to work.

@rangi513
Copy link

rangi513 commented Aug 2, 2021

For your first problem, @oshrinm's solution above worked for me. Similar solution to the 2nd problem where you had:

./reagent/workflow/cli.py run reagent.workflow.gym_batch_rl.offline_gym $CONFIG

Replace that with:

./reagent/workflow/cli.py run reagent.workflow.gym_batch_rl.offline_gym_random $CONFIG

Looks like this was also renamed - I think the documentation just needs to be updated.

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

3 participants