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

Update gym version #50

Merged
merged 4 commits into from
Mar 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ docker-compose \
softlearning run_example_local examples.development \
--universe=gym \
--domain=HalfCheetah \
--task=v2 \
--task=v3 \
--exp-name=my-sac-experiment-1 \
--checkpoint-frequency=1000 # Save the checkpoint to resume training later
```

2. To simulate the resulting policy:
First, find the path that the checkpoint is saved to. By default (i.e. without specifying the `log-dir` argument to the previous script), the data is saved under `~/ray_results/<universe>/<domain>/<task>/<datatimestamp>-<exp-name>/<trial-id>/<checkpoint-id>`. For example: `~/ray_results/gym/HalfCheetah/v2/2018-12-12T16-48-37-my-sac-experiment-1-0/mujoco-runner_0_seed=7585_2018-12-12_16-48-37xuadh9vd/checkpoint_1000/`. The next command assumes that this path is found from `${SAC_CHECKPOINT_DIR}` environment variable.
First, find the path that the checkpoint is saved to. By default (i.e. without specifying the `log-dir` argument to the previous script), the data is saved under `~/ray_results/<universe>/<domain>/<task>/<datatimestamp>-<exp-name>/<trial-id>/<checkpoint-id>`. For example: `~/ray_results/gym/HalfCheetah/v3/2018-12-12T16-48-37-my-sac-experiment-1-0/mujoco-runner_0_seed=7585_2018-12-12_16-48-37xuadh9vd/checkpoint_1000/`. The next command assumes that this path is found from `${SAC_CHECKPOINT_DIR}` environment variable.

```
python -m examples.development.simulate_policy \
Expand Down Expand Up @@ -146,7 +146,7 @@ In order to resume training from previous checkpoint, run the original example m
softlearning run_example_local examples.development \
--universe=gym \
--domain=HalfCheetah \
--task=v2 \
--task=v3 \
--exp-name=my-sac-experiment-1 \
--checkpoint-frequency=1000 \
--restore=${SAC_CHECKPOINT_PATH}
Expand Down
6 changes: 3 additions & 3 deletions examples/development/variants.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,21 +136,21 @@
'Walker2d': { # 6 DoF
},
'Ant': { # 8 DoF
'Parameterizable-v0': {
'Parameterizable-v3': {
'healthy_reward': 0.0,
'healthy_z_range': (-np.inf, np.inf),
'exclude_current_positions_from_observation': False,
}
},
'Humanoid': { # 17 DoF
'Parameterizable-v0': {
'Parameterizable-v3': {
'healthy_reward': 0.0,
'healthy_z_range': (-np.inf, np.inf),
'exclude_current_positions_from_observation': False,
}
},
'Pusher2d': { # 3 DoF
'Default-v0': {
'Default-v3': {
'arm_object_distance_cost_coeff': 0.0,
'goal_object_distance_cost_coeff': 1.0,
'goal': (0, -1),
Expand Down
3 changes: 2 additions & 1 deletion examples/instrument.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,8 @@ def run_example_cluster(example_module_name, example_argv):
experiments,
with_server=example_args.with_server,
server_port=4321,
scheduler=None)
scheduler=None,
queue_trials=True)


def launch_example_cluster(example_module_name,
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ google-auth==1.6.1
google-auth-httplib2==0.0.3
grpcio==1.16.1
gtimer==1.0.0b5
gym==0.11.0
gym==0.12.0
h5py==2.8.0
httplib2==0.12.0
idna==2.7
Expand Down
30 changes: 12 additions & 18 deletions softlearning/environments/gym/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,28 @@

MUJOCO_ENVIRONMENT_SPECS = (
{
'id': 'Swimmer-Parameterizable-v0',
'entry_point': (f'{MUJOCO_ENVIRONMENTS_PATH}'
'.swimmer:SwimmerEnv'),
'id': 'Swimmer-Parameterizable-v3',
'entry_point': (f'gym.envs.mujoco.swimmer_v3:SwimmerEnv'),
},
{
'id': 'Hopper-Parameterizable-v0',
'entry_point': (f'{MUJOCO_ENVIRONMENTS_PATH}'
'.hopper:HopperEnv'),
'id': 'Hopper-Parameterizable-v3',
'entry_point': (f'gym.envs.mujoco.hopper_v3:HopperEnv'),
},
{
'id': 'Walker2d-Parameterizable-v0',
'entry_point': (f'{MUJOCO_ENVIRONMENTS_PATH}'
'.walker2d:Walker2dEnv'),
'id': 'Walker2d-Parameterizable-v3',
'entry_point': (f'gym.envs.mujoco.walker2d_v3:Walker2dEnv'),
},
{
'id': 'HalfCheetah-Parameterizable-v0',
'entry_point': (f'{MUJOCO_ENVIRONMENTS_PATH}'
'.half_cheetah:HalfCheetahEnv'),
'id': 'HalfCheetah-Parameterizable-v3',
'entry_point': (f'gym.envs.mujoco.half_cheetah_v3:HalfCheetahEnv'),
},
{
'id': 'Ant-Parameterizable-v0',
'entry_point': (f'{MUJOCO_ENVIRONMENTS_PATH}'
'.ant:AntEnv'),
'id': 'Ant-Parameterizable-v3',
'entry_point': (f'gym.envs.mujoco.ant_v3:AntEnv'),
},
{
'id': 'Humanoid-Parameterizable-v0',
'entry_point': (f'{MUJOCO_ENVIRONMENTS_PATH}'
'.humanoid:HumanoidEnv'),
'id': 'Humanoid-Parameterizable-v3',
'entry_point': (f'gym.envs.mujoco.humanoid_v3:HumanoidEnv'),
},
{
'id': 'Pusher2d-Default-v0',
Expand Down
136 changes: 0 additions & 136 deletions softlearning/environments/gym/mujoco/ant.py

This file was deleted.

88 changes: 0 additions & 88 deletions softlearning/environments/gym/mujoco/half_cheetah.py

This file was deleted.

Loading