diff --git a/docs/introduction/basic_usage.md b/docs/introduction/basic_usage.md index d212cd590..3d528840a 100644 --- a/docs/introduction/basic_usage.md +++ b/docs/introduction/basic_usage.md @@ -10,12 +10,12 @@ firstpage: There are 6 major benchmarks pre-packaged into Meta-World with support for making your own custom benchmarks. The benchmarks are divided into Multi-Task and Meta reinforcement learning benchmarks. ### Multi-Task Benchmarks -The MT1, MT10, and MT50 benchmarks are the Multi-Task Benchmarks. These benchmarks are used to learn a multi-task policy that can learn 1, 10, or 50 training tasks simultaneously. MT1 benchmarks can be created with any of the 50 tasks available in Meta-World. -In the MT10 and MT50 benchmarks, the observations returned by the benchmark will come with one-hot task IDs appended to the state. +The MT1, MT10, and MT50 benchmarks are the Multi-Task Benchmarks. These benchmarks are used to learn a multi-task policy that can learn 1, 10, or 50 training tasks simultaneously. MT1 benchmarks can be created with any of the 50 tasks available in Meta-World. +In the MT10 and MT50 benchmarks, the observations returned by the benchmark will come with one-hot task IDs appended to the state. ### Meta-Learning Benchmarks The ML1, ML10, and ML45 benchmarks are 3 meta-reinforcement learning benchmarks available in Meta-World. The ML1 benchmark can be used with any of the 50 tasks available in Meta-World. -The ML1 benchmark tests for few-shot adaptation to goal variations within a single task. The ML10 and ML45 both test few-shot adaptation to new tasks. ML10 comprises 10 train tasks with 5 test tasks, while ML45 comprises of 45 training tasks with 5 test tasks. +The ML1 benchmark tests for few-shot adaptation to goal variations within a single task. The ML10 and ML45 both test few-shot adaptation to new tasks. ML10 comprises 10 train tasks with 5 test tasks, while ML45 comprises of 45 training tasks with 5 test tasks. ## Creating Multi-Task Benchmarks @@ -23,7 +23,7 @@ The ML1 benchmark tests for few-shot adaptation to goal variations within a sing ### MT1 ```python import gymnasium as gym -import metaworld +import metaworld seed = 42 # for reproducibility @@ -36,8 +36,8 @@ obs, reward, truncate, terminate, info = env.step(a) # apply the randomly sample ``` ### MT10 -MT10 has two different versions that can be returned by gym.make. The first version is the synchronous version of the benchmark where all environments are contained within the same process. -For users with limited compute resources, the synchronous option needs the least resources. +MT10 has two different versions that can be returned by gym.make. The first version is the synchronous version of the benchmark where all environments are contained within the same process. +For users with limited compute resources, the synchronous option needs the least resources. ```python import gymnasium as gym import metaworld @@ -59,7 +59,7 @@ envs = gym.make('Meta-World/MT10-async', seed=seed) # this returns an Asynchrono ``` ### MT50 -MT50 also contains two different versions, a synchronous and an asynchronous version, of the environments. +MT50 also contains two different versions, a synchronous and an asynchronous version, of the environments. ```python import gymnasium as gym import metaworld @@ -68,7 +68,7 @@ seed = 42 envs = gym.make('Meta-World/MT50-sync', seed=seed) # this returns a Synchronous Vector Environment with 50 environments -obs, info = envs.reset() # reset all 50 environments +obs, info = envs.reset() # reset all 50 environments a = env.action_space.sample() # sample an action for each environment @@ -90,7 +90,7 @@ import metaworld seed = 42 -train_envs = gym.make('Meta-World/ML1-train-reach-V3', seed=seed) +train_envs = gym.make('Meta-World/ML1-train-reach-V3', seed=seed) test_envs = gym.make('Meta-World/ML1-test-reach-V3', seed=seed) # training procedure use train_envs @@ -100,10 +100,10 @@ test_envs = gym.make('Meta-World/ML1-test-reach-V3', seed=seed) ### ML10 -Similar to the Multi-Task benchmarks, the ML10 and ML45 environments can be run in synchronous or asynchronous modes. +Similar to the Multi-Task benchmarks, the ML10 and ML45 environments can be run in synchronous or asynchronous modes. -```python +```python import gymnasium as gym import metaworld @@ -113,7 +113,7 @@ test_envs = gym.make('Meta-World/ML10-test-sync', seed=seed) # or ML10-test-asyn ### ML45 -```python +```python import gymnasium as gym import metaworld @@ -123,10 +123,10 @@ test_envs = gym.make('Meta-World/ML45-test-sync', seed=seed) # or ML45-test-asyn ## Custom Benchmarks -Finally, we also provide support for creating custom benchmarks by combining any number of Meta-World environments. +Finally, we also provide support for creating custom benchmarks by combining any number of Meta-World environments. The prefix 'mt' will return environments that are goal observable for Multi-Task reinforcement learning, while the prefix 'ml' will return environments that are partially observable for Meta-reinforcement learning. -Like the included MT and ML benchmarks, these environments can also be run in synchronous or asyncronous mode. +Like the included MT and ML benchmarks, these environments can also be run in synchronous or asynchronous mode. In order to create a custom benchmark, the user must provide a list of environment names with the suffix '-V3'. ```python diff --git a/metaworld/__init__.py b/metaworld/__init__.py index 744c4b85e..ca430183a 100644 --- a/metaworld/__init__.py +++ b/metaworld/__init__.py @@ -11,12 +11,13 @@ import numpy.typing as npt import metaworld.env_dict as _env_dict -from metaworld.types import Task -from .sawyer_xyz_env import SawyerXYZEnv from metaworld.env_dict import ( ALL_V2_ENVIRONMENTS_GOAL_HIDDEN, ALL_V2_ENVIRONMENTS_GOAL_OBSERVABLE, ) +from metaworld.types import Task + +from .sawyer_xyz_env import SawyerXYZEnv class MetaWorldEnv(abc.ABC): @@ -290,4 +291,14 @@ def __init__(self, seed=None): ) -__all__ = ["ML1", "MT1", "ML10", "MT10", "ML45", "MT50", "ALL_V2_ENVIRONMENTS_GOAL_HIDDEN", "ALL_V2_ENVIRONMENTS_GOAL_OBSERVABLE", "SawyerXYZEnv"] +__all__ = [ + "ML1", + "MT1", + "ML10", + "MT10", + "ML45", + "MT50", + "ALL_V2_ENVIRONMENTS_GOAL_HIDDEN", + "ALL_V2_ENVIRONMENTS_GOAL_OBSERVABLE", + "SawyerXYZEnv", +] diff --git a/metaworld/env_dict.py b/metaworld/env_dict.py index 1722fcca0..5b4c826c8 100644 --- a/metaworld/env_dict.py +++ b/metaworld/env_dict.py @@ -12,8 +12,8 @@ import numpy as np from typing_extensions import TypeAlias -from metaworld.sawyer_xyz_env import SawyerXYZEnv from metaworld import envs +from metaworld.sawyer_xyz_env import SawyerXYZEnv # Utils diff --git a/metaworld/envs/__init__.py b/metaworld/envs/__init__.py index 636c0669b..4715834f1 100644 --- a/metaworld/envs/__init__.py +++ b/metaworld/envs/__init__.py @@ -1,131 +1,55 @@ -from metaworld.envs.sawyer_assembly_peg_v2 import ( - SawyerNutAssemblyEnvV2, -) -from metaworld.envs.sawyer_basketball_v2 import ( - SawyerBasketballEnvV2, -) -from metaworld.envs.sawyer_bin_picking_v2 import ( - SawyerBinPickingEnvV2, -) +from metaworld.envs.sawyer_assembly_peg_v2 import SawyerNutAssemblyEnvV2 +from metaworld.envs.sawyer_basketball_v2 import SawyerBasketballEnvV2 +from metaworld.envs.sawyer_bin_picking_v2 import SawyerBinPickingEnvV2 from metaworld.envs.sawyer_box_close_v2 import SawyerBoxCloseEnvV2 -from metaworld.envs.sawyer_button_press_topdown_v2 import ( - SawyerButtonPressTopdownEnvV2, -) +from metaworld.envs.sawyer_button_press_topdown_v2 import SawyerButtonPressTopdownEnvV2 from metaworld.envs.sawyer_button_press_topdown_wall_v2 import ( SawyerButtonPressTopdownWallEnvV2, ) -from metaworld.envs.sawyer_button_press_v2 import ( - SawyerButtonPressEnvV2, -) -from metaworld.envs.sawyer_button_press_wall_v2 import ( - SawyerButtonPressWallEnvV2, -) -from metaworld.envs.sawyer_coffee_button_v2 import ( - SawyerCoffeeButtonEnvV2, -) -from metaworld.envs.sawyer_coffee_pull_v2 import ( - SawyerCoffeePullEnvV2, -) -from metaworld.envs.sawyer_coffee_push_v2 import ( - SawyerCoffeePushEnvV2, -) +from metaworld.envs.sawyer_button_press_v2 import SawyerButtonPressEnvV2 +from metaworld.envs.sawyer_button_press_wall_v2 import SawyerButtonPressWallEnvV2 +from metaworld.envs.sawyer_coffee_button_v2 import SawyerCoffeeButtonEnvV2 +from metaworld.envs.sawyer_coffee_pull_v2 import SawyerCoffeePullEnvV2 +from metaworld.envs.sawyer_coffee_push_v2 import SawyerCoffeePushEnvV2 from metaworld.envs.sawyer_dial_turn_v2 import SawyerDialTurnEnvV2 -from metaworld.envs.sawyer_disassemble_peg_v2 import ( - SawyerNutDisassembleEnvV2, -) -from metaworld.envs.sawyer_door_close_v2 import ( - SawyerDoorCloseEnvV2, -) +from metaworld.envs.sawyer_disassemble_peg_v2 import SawyerNutDisassembleEnvV2 +from metaworld.envs.sawyer_door_close_v2 import SawyerDoorCloseEnvV2 from metaworld.envs.sawyer_door_lock_v2 import SawyerDoorLockEnvV2 -from metaworld.envs.sawyer_door_unlock_v2 import ( - SawyerDoorUnlockEnvV2, -) +from metaworld.envs.sawyer_door_unlock_v2 import SawyerDoorUnlockEnvV2 from metaworld.envs.sawyer_door_v2 import SawyerDoorEnvV2 -from metaworld.envs.sawyer_drawer_close_v2 import ( - SawyerDrawerCloseEnvV2, -) -from metaworld.envs.sawyer_drawer_open_v2 import ( - SawyerDrawerOpenEnvV2, -) -from metaworld.envs.sawyer_faucet_close_v2 import ( - SawyerFaucetCloseEnvV2, -) -from metaworld.envs.sawyer_faucet_open_v2 import ( - SawyerFaucetOpenEnvV2, -) +from metaworld.envs.sawyer_drawer_close_v2 import SawyerDrawerCloseEnvV2 +from metaworld.envs.sawyer_drawer_open_v2 import SawyerDrawerOpenEnvV2 +from metaworld.envs.sawyer_faucet_close_v2 import SawyerFaucetCloseEnvV2 +from metaworld.envs.sawyer_faucet_open_v2 import SawyerFaucetOpenEnvV2 from metaworld.envs.sawyer_hammer_v2 import SawyerHammerEnvV2 -from metaworld.envs.sawyer_hand_insert_v2 import ( - SawyerHandInsertEnvV2, -) -from metaworld.envs.sawyer_handle_press_side_v2 import ( - SawyerHandlePressSideEnvV2, -) -from metaworld.envs.sawyer_handle_press_v2 import ( - SawyerHandlePressEnvV2, -) -from metaworld.envs.sawyer_handle_pull_side_v2 import ( - SawyerHandlePullSideEnvV2, -) -from metaworld.envs.sawyer_handle_pull_v2 import ( - SawyerHandlePullEnvV2, -) -from metaworld.envs.sawyer_lever_pull_v2 import ( - SawyerLeverPullEnvV2, -) -from metaworld.envs.sawyer_peg_insertion_side_v2 import ( - SawyerPegInsertionSideEnvV2, -) -from metaworld.envs.sawyer_peg_unplug_side_v2 import ( - SawyerPegUnplugSideEnvV2, -) -from metaworld.envs.sawyer_pick_out_of_hole_v2 import ( - SawyerPickOutOfHoleEnvV2, -) -from metaworld.envs.sawyer_pick_place_v2 import ( - SawyerPickPlaceEnvV2, -) -from metaworld.envs.sawyer_pick_place_wall_v2 import ( - SawyerPickPlaceWallEnvV2, -) -from metaworld.envs.sawyer_plate_slide_back_side_v2 import ( - SawyerPlateSlideBackSideEnvV2, -) -from metaworld.envs.sawyer_plate_slide_back_v2 import ( - SawyerPlateSlideBackEnvV2, -) -from metaworld.envs.sawyer_plate_slide_side_v2 import ( - SawyerPlateSlideSideEnvV2, -) -from metaworld.envs.sawyer_plate_slide_v2 import ( - SawyerPlateSlideEnvV2, -) +from metaworld.envs.sawyer_hand_insert_v2 import SawyerHandInsertEnvV2 +from metaworld.envs.sawyer_handle_press_side_v2 import SawyerHandlePressSideEnvV2 +from metaworld.envs.sawyer_handle_press_v2 import SawyerHandlePressEnvV2 +from metaworld.envs.sawyer_handle_pull_side_v2 import SawyerHandlePullSideEnvV2 +from metaworld.envs.sawyer_handle_pull_v2 import SawyerHandlePullEnvV2 +from metaworld.envs.sawyer_lever_pull_v2 import SawyerLeverPullEnvV2 +from metaworld.envs.sawyer_peg_insertion_side_v2 import SawyerPegInsertionSideEnvV2 +from metaworld.envs.sawyer_peg_unplug_side_v2 import SawyerPegUnplugSideEnvV2 +from metaworld.envs.sawyer_pick_out_of_hole_v2 import SawyerPickOutOfHoleEnvV2 +from metaworld.envs.sawyer_pick_place_v2 import SawyerPickPlaceEnvV2 +from metaworld.envs.sawyer_pick_place_wall_v2 import SawyerPickPlaceWallEnvV2 +from metaworld.envs.sawyer_plate_slide_back_side_v2 import SawyerPlateSlideBackSideEnvV2 +from metaworld.envs.sawyer_plate_slide_back_v2 import SawyerPlateSlideBackEnvV2 +from metaworld.envs.sawyer_plate_slide_side_v2 import SawyerPlateSlideSideEnvV2 +from metaworld.envs.sawyer_plate_slide_v2 import SawyerPlateSlideEnvV2 from metaworld.envs.sawyer_push_back_v2 import SawyerPushBackEnvV2 from metaworld.envs.sawyer_push_v2 import SawyerPushEnvV2 from metaworld.envs.sawyer_push_wall_v2 import SawyerPushWallEnvV2 from metaworld.envs.sawyer_reach_v2 import SawyerReachEnvV2 -from metaworld.envs.sawyer_reach_wall_v2 import ( - SawyerReachWallEnvV2, -) -from metaworld.envs.sawyer_shelf_place_v2 import ( - SawyerShelfPlaceEnvV2, -) +from metaworld.envs.sawyer_reach_wall_v2 import SawyerReachWallEnvV2 +from metaworld.envs.sawyer_shelf_place_v2 import SawyerShelfPlaceEnvV2 from metaworld.envs.sawyer_soccer_v2 import SawyerSoccerEnvV2 -from metaworld.envs.sawyer_stick_pull_v2 import ( - SawyerStickPullEnvV2, -) -from metaworld.envs.sawyer_stick_push_v2 import ( - SawyerStickPushEnvV2, -) -from metaworld.envs.sawyer_sweep_into_goal_v2 import ( - SawyerSweepIntoGoalEnvV2, -) +from metaworld.envs.sawyer_stick_pull_v2 import SawyerStickPullEnvV2 +from metaworld.envs.sawyer_stick_push_v2 import SawyerStickPushEnvV2 +from metaworld.envs.sawyer_sweep_into_goal_v2 import SawyerSweepIntoGoalEnvV2 from metaworld.envs.sawyer_sweep_v2 import SawyerSweepEnvV2 -from metaworld.envs.sawyer_window_close_v2 import ( - SawyerWindowCloseEnvV2, -) -from metaworld.envs.sawyer_window_open_v2 import ( - SawyerWindowOpenEnvV2, -) +from metaworld.envs.sawyer_window_close_v2 import SawyerWindowCloseEnvV2 +from metaworld.envs.sawyer_window_open_v2 import SawyerWindowOpenEnvV2 __all__ = [ "SawyerNutAssemblyEnvV2", diff --git a/metaworld/envs/sawyer_assembly_peg_v2.py b/metaworld/envs/sawyer_assembly_peg_v2.py index 27499f611..adb0f5d68 100644 --- a/metaworld/envs/sawyer_assembly_peg_v2.py +++ b/metaworld/envs/sawyer_assembly_peg_v2.py @@ -8,8 +8,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils.reward_utils import tolerance from metaworld.types import InitConfigDict, ObservationDict +from metaworld.utils.reward_utils import tolerance class SawyerNutAssemblyEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_basketball_v2.py b/metaworld/envs/sawyer_basketball_v2.py index 6590ab69b..6df5a5d08 100644 --- a/metaworld/envs/sawyer_basketball_v2.py +++ b/metaworld/envs/sawyer_basketball_v2.py @@ -8,8 +8,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerBasketballEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_bin_picking_v2.py b/metaworld/envs/sawyer_bin_picking_v2.py index 8ea2c4ee2..b9688578e 100644 --- a/metaworld/envs/sawyer_bin_picking_v2.py +++ b/metaworld/envs/sawyer_bin_picking_v2.py @@ -8,8 +8,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerBinPickingEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_box_close_v2.py b/metaworld/envs/sawyer_box_close_v2.py index 61c05b04e..f471b6496 100644 --- a/metaworld/envs/sawyer_box_close_v2.py +++ b/metaworld/envs/sawyer_box_close_v2.py @@ -9,8 +9,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerBoxCloseEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_button_press_topdown_v2.py b/metaworld/envs/sawyer_button_press_topdown_v2.py index 4289beec6..048d1494c 100644 --- a/metaworld/envs/sawyer_button_press_topdown_v2.py +++ b/metaworld/envs/sawyer_button_press_topdown_v2.py @@ -9,8 +9,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerButtonPressTopdownEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_button_press_topdown_wall_v2.py b/metaworld/envs/sawyer_button_press_topdown_wall_v2.py index 3595cc7ec..fe1e085d7 100644 --- a/metaworld/envs/sawyer_button_press_topdown_wall_v2.py +++ b/metaworld/envs/sawyer_button_press_topdown_wall_v2.py @@ -9,8 +9,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerButtonPressTopdownWallEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_button_press_v2.py b/metaworld/envs/sawyer_button_press_v2.py index 7f6d4e5ae..72004c175 100644 --- a/metaworld/envs/sawyer_button_press_v2.py +++ b/metaworld/envs/sawyer_button_press_v2.py @@ -8,8 +8,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerButtonPressEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_button_press_wall_v2.py b/metaworld/envs/sawyer_button_press_wall_v2.py index 52bb79466..44b3f1007 100644 --- a/metaworld/envs/sawyer_button_press_wall_v2.py +++ b/metaworld/envs/sawyer_button_press_wall_v2.py @@ -8,8 +8,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerButtonPressWallEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_coffee_button_v2.py b/metaworld/envs/sawyer_coffee_button_v2.py index a1e1f3faa..d3537aa44 100644 --- a/metaworld/envs/sawyer_coffee_button_v2.py +++ b/metaworld/envs/sawyer_coffee_button_v2.py @@ -8,8 +8,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerCoffeeButtonEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_coffee_pull_v2.py b/metaworld/envs/sawyer_coffee_pull_v2.py index 99e47e1bf..16936c0a6 100644 --- a/metaworld/envs/sawyer_coffee_pull_v2.py +++ b/metaworld/envs/sawyer_coffee_pull_v2.py @@ -9,8 +9,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerCoffeePullEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_coffee_push_v2.py b/metaworld/envs/sawyer_coffee_push_v2.py index 043f808f5..9f96c8a3b 100644 --- a/metaworld/envs/sawyer_coffee_push_v2.py +++ b/metaworld/envs/sawyer_coffee_push_v2.py @@ -9,8 +9,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerCoffeePushEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_dial_turn_v2.py b/metaworld/envs/sawyer_dial_turn_v2.py index 303eab69b..e17d8eb2e 100644 --- a/metaworld/envs/sawyer_dial_turn_v2.py +++ b/metaworld/envs/sawyer_dial_turn_v2.py @@ -9,8 +9,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerDialTurnEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_disassemble_peg_v2.py b/metaworld/envs/sawyer_disassemble_peg_v2.py index 8f3b52d73..f4870fea5 100644 --- a/metaworld/envs/sawyer_disassemble_peg_v2.py +++ b/metaworld/envs/sawyer_disassemble_peg_v2.py @@ -9,8 +9,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerNutDisassembleEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_door_close_v2.py b/metaworld/envs/sawyer_door_close_v2.py index 5956d3241..cdc17d61c 100644 --- a/metaworld/envs/sawyer_door_close_v2.py +++ b/metaworld/envs/sawyer_door_close_v2.py @@ -9,8 +9,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerDoorCloseEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_door_lock_v2.py b/metaworld/envs/sawyer_door_lock_v2.py index b47bb70ef..3a889201d 100644 --- a/metaworld/envs/sawyer_door_lock_v2.py +++ b/metaworld/envs/sawyer_door_lock_v2.py @@ -9,8 +9,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerDoorLockEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_door_unlock_v2.py b/metaworld/envs/sawyer_door_unlock_v2.py index 9f540356d..1239d7e4c 100644 --- a/metaworld/envs/sawyer_door_unlock_v2.py +++ b/metaworld/envs/sawyer_door_unlock_v2.py @@ -8,8 +8,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerDoorUnlockEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_door_v2.py b/metaworld/envs/sawyer_door_v2.py index 19c7b4bbb..91960d589 100644 --- a/metaworld/envs/sawyer_door_v2.py +++ b/metaworld/envs/sawyer_door_v2.py @@ -9,8 +9,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerDoorEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_drawer_close_v2.py b/metaworld/envs/sawyer_drawer_close_v2.py index 37736d994..73902b503 100644 --- a/metaworld/envs/sawyer_drawer_close_v2.py +++ b/metaworld/envs/sawyer_drawer_close_v2.py @@ -8,8 +8,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerDrawerCloseEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_drawer_open_v2.py b/metaworld/envs/sawyer_drawer_open_v2.py index b5d31c194..9caeb10af 100644 --- a/metaworld/envs/sawyer_drawer_open_v2.py +++ b/metaworld/envs/sawyer_drawer_open_v2.py @@ -8,8 +8,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerDrawerOpenEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_faucet_close_v2.py b/metaworld/envs/sawyer_faucet_close_v2.py index 3300a1882..0aca507d9 100644 --- a/metaworld/envs/sawyer_faucet_close_v2.py +++ b/metaworld/envs/sawyer_faucet_close_v2.py @@ -9,8 +9,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerFaucetCloseEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_faucet_open_v2.py b/metaworld/envs/sawyer_faucet_open_v2.py index 72f5ad4b8..4364c1573 100644 --- a/metaworld/envs/sawyer_faucet_open_v2.py +++ b/metaworld/envs/sawyer_faucet_open_v2.py @@ -8,8 +8,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerFaucetOpenEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_hammer_v2.py b/metaworld/envs/sawyer_hammer_v2.py index 334257bef..46cade09e 100644 --- a/metaworld/envs/sawyer_hammer_v2.py +++ b/metaworld/envs/sawyer_hammer_v2.py @@ -8,8 +8,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import HammerInitConfigDict +from metaworld.utils import reward_utils class SawyerHammerEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_hand_insert_v2.py b/metaworld/envs/sawyer_hand_insert_v2.py index 1107ef655..cef626ed8 100644 --- a/metaworld/envs/sawyer_hand_insert_v2.py +++ b/metaworld/envs/sawyer_hand_insert_v2.py @@ -8,8 +8,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerHandInsertEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_handle_press_side_v2.py b/metaworld/envs/sawyer_handle_press_side_v2.py index ee247fecc..ad82dd054 100644 --- a/metaworld/envs/sawyer_handle_press_side_v2.py +++ b/metaworld/envs/sawyer_handle_press_side_v2.py @@ -8,8 +8,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerHandlePressSideEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_handle_press_v2.py b/metaworld/envs/sawyer_handle_press_v2.py index 80e57e62c..bba2b5a72 100644 --- a/metaworld/envs/sawyer_handle_press_v2.py +++ b/metaworld/envs/sawyer_handle_press_v2.py @@ -8,8 +8,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerHandlePressEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_handle_pull_side_v2.py b/metaworld/envs/sawyer_handle_pull_side_v2.py index 9a87db296..036b0e306 100644 --- a/metaworld/envs/sawyer_handle_pull_side_v2.py +++ b/metaworld/envs/sawyer_handle_pull_side_v2.py @@ -8,8 +8,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerHandlePullSideEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_handle_pull_v2.py b/metaworld/envs/sawyer_handle_pull_v2.py index 46bae46ed..834bc50e2 100644 --- a/metaworld/envs/sawyer_handle_pull_v2.py +++ b/metaworld/envs/sawyer_handle_pull_v2.py @@ -8,8 +8,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerHandlePullEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_lever_pull_v2.py b/metaworld/envs/sawyer_lever_pull_v2.py index 68a6acb82..2d9316508 100644 --- a/metaworld/envs/sawyer_lever_pull_v2.py +++ b/metaworld/envs/sawyer_lever_pull_v2.py @@ -10,8 +10,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerLeverPullEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_peg_insertion_side_v2.py b/metaworld/envs/sawyer_peg_insertion_side_v2.py index 32dc7b4da..e02f0ccbe 100644 --- a/metaworld/envs/sawyer_peg_insertion_side_v2.py +++ b/metaworld/envs/sawyer_peg_insertion_side_v2.py @@ -9,8 +9,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerPegInsertionSideEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_peg_unplug_side_v2.py b/metaworld/envs/sawyer_peg_unplug_side_v2.py index bd9c6eaeb..983db96d4 100644 --- a/metaworld/envs/sawyer_peg_unplug_side_v2.py +++ b/metaworld/envs/sawyer_peg_unplug_side_v2.py @@ -8,8 +8,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerPegUnplugSideEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_pick_out_of_hole_v2.py b/metaworld/envs/sawyer_pick_out_of_hole_v2.py index 02d5f1082..7b64596a4 100644 --- a/metaworld/envs/sawyer_pick_out_of_hole_v2.py +++ b/metaworld/envs/sawyer_pick_out_of_hole_v2.py @@ -8,8 +8,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerPickOutOfHoleEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_pick_place_v2.py b/metaworld/envs/sawyer_pick_place_v2.py index e5b245d05..596448681 100644 --- a/metaworld/envs/sawyer_pick_place_v2.py +++ b/metaworld/envs/sawyer_pick_place_v2.py @@ -9,8 +9,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerPickPlaceEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_pick_place_wall_v2.py b/metaworld/envs/sawyer_pick_place_wall_v2.py index 76a2590f9..cd6af8461 100644 --- a/metaworld/envs/sawyer_pick_place_wall_v2.py +++ b/metaworld/envs/sawyer_pick_place_wall_v2.py @@ -9,8 +9,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerPickPlaceWallEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_plate_slide_back_side_v2.py b/metaworld/envs/sawyer_plate_slide_back_side_v2.py index c847fe2b9..24dbc454f 100644 --- a/metaworld/envs/sawyer_plate_slide_back_side_v2.py +++ b/metaworld/envs/sawyer_plate_slide_back_side_v2.py @@ -9,8 +9,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerPlateSlideBackSideEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_plate_slide_back_v2.py b/metaworld/envs/sawyer_plate_slide_back_v2.py index 493262186..24448b1a6 100644 --- a/metaworld/envs/sawyer_plate_slide_back_v2.py +++ b/metaworld/envs/sawyer_plate_slide_back_v2.py @@ -9,8 +9,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerPlateSlideBackEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_plate_slide_side_v2.py b/metaworld/envs/sawyer_plate_slide_side_v2.py index 1284ea9e6..93e92087b 100644 --- a/metaworld/envs/sawyer_plate_slide_side_v2.py +++ b/metaworld/envs/sawyer_plate_slide_side_v2.py @@ -9,8 +9,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerPlateSlideSideEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_plate_slide_v2.py b/metaworld/envs/sawyer_plate_slide_v2.py index 0228f2b48..97b6e56b6 100644 --- a/metaworld/envs/sawyer_plate_slide_v2.py +++ b/metaworld/envs/sawyer_plate_slide_v2.py @@ -9,8 +9,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerPlateSlideEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_push_back_v2.py b/metaworld/envs/sawyer_push_back_v2.py index b7cd8ceae..40bd4b00f 100644 --- a/metaworld/envs/sawyer_push_back_v2.py +++ b/metaworld/envs/sawyer_push_back_v2.py @@ -9,8 +9,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerPushBackEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_push_v2.py b/metaworld/envs/sawyer_push_v2.py index 24223b4bf..1b75a96ee 100644 --- a/metaworld/envs/sawyer_push_v2.py +++ b/metaworld/envs/sawyer_push_v2.py @@ -9,8 +9,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerPushEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_push_wall_v2.py b/metaworld/envs/sawyer_push_wall_v2.py index 540823e5e..a5b06a8fd 100644 --- a/metaworld/envs/sawyer_push_wall_v2.py +++ b/metaworld/envs/sawyer_push_wall_v2.py @@ -11,8 +11,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerPushWallEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_reach_v2.py b/metaworld/envs/sawyer_reach_v2.py index 0b3ab9221..4db710d94 100644 --- a/metaworld/envs/sawyer_reach_v2.py +++ b/metaworld/envs/sawyer_reach_v2.py @@ -9,8 +9,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerReachEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_reach_wall_v2.py b/metaworld/envs/sawyer_reach_wall_v2.py index 0ef07a9e9..2afc9c993 100644 --- a/metaworld/envs/sawyer_reach_wall_v2.py +++ b/metaworld/envs/sawyer_reach_wall_v2.py @@ -9,8 +9,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerReachWallEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_shelf_place_v2.py b/metaworld/envs/sawyer_shelf_place_v2.py index a863feba2..027c43f65 100644 --- a/metaworld/envs/sawyer_shelf_place_v2.py +++ b/metaworld/envs/sawyer_shelf_place_v2.py @@ -10,8 +10,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerShelfPlaceEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_soccer_v2.py b/metaworld/envs/sawyer_soccer_v2.py index 7caad161e..c3e766e59 100644 --- a/metaworld/envs/sawyer_soccer_v2.py +++ b/metaworld/envs/sawyer_soccer_v2.py @@ -9,8 +9,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerSoccerEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_stick_pull_v2.py b/metaworld/envs/sawyer_stick_pull_v2.py index ff3f8e194..613fd3c3a 100644 --- a/metaworld/envs/sawyer_stick_pull_v2.py +++ b/metaworld/envs/sawyer_stick_pull_v2.py @@ -9,8 +9,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import ObservationDict, StickInitConfigDict +from metaworld.utils import reward_utils class SawyerStickPullEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_stick_push_v2.py b/metaworld/envs/sawyer_stick_push_v2.py index 8835fb0d2..037e16bc7 100644 --- a/metaworld/envs/sawyer_stick_push_v2.py +++ b/metaworld/envs/sawyer_stick_push_v2.py @@ -9,8 +9,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import ObservationDict, StickInitConfigDict +from metaworld.utils import reward_utils class SawyerStickPushEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_sweep_into_goal_v2.py b/metaworld/envs/sawyer_sweep_into_goal_v2.py index 41e60cb08..d3195f53f 100644 --- a/metaworld/envs/sawyer_sweep_into_goal_v2.py +++ b/metaworld/envs/sawyer_sweep_into_goal_v2.py @@ -9,8 +9,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerSweepIntoGoalEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_sweep_v2.py b/metaworld/envs/sawyer_sweep_v2.py index 8de288c0b..8596e2b43 100644 --- a/metaworld/envs/sawyer_sweep_v2.py +++ b/metaworld/envs/sawyer_sweep_v2.py @@ -8,8 +8,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerSweepEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_window_close_v2.py b/metaworld/envs/sawyer_window_close_v2.py index cc7c904dc..92056a839 100644 --- a/metaworld/envs/sawyer_window_close_v2.py +++ b/metaworld/envs/sawyer_window_close_v2.py @@ -8,8 +8,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerWindowCloseEnvV2(SawyerXYZEnv): diff --git a/metaworld/envs/sawyer_window_open_v2.py b/metaworld/envs/sawyer_window_open_v2.py index 65155bd9c..bd44912cd 100644 --- a/metaworld/envs/sawyer_window_open_v2.py +++ b/metaworld/envs/sawyer_window_open_v2.py @@ -8,8 +8,8 @@ from metaworld.asset_path_utils import full_v2_path_for from metaworld.sawyer_xyz_env import RenderMode, SawyerXYZEnv -from metaworld.utils import reward_utils from metaworld.types import InitConfigDict +from metaworld.utils import reward_utils class SawyerWindowOpenEnvV2(SawyerXYZEnv): diff --git a/metaworld/policies/__init__.py b/metaworld/policies/__init__.py index dba6d6c0d..60c72cfe1 100644 --- a/metaworld/policies/__init__.py +++ b/metaworld/policies/__init__.py @@ -2,10 +2,16 @@ from metaworld.policies.sawyer_basketball_v2_policy import SawyerBasketballV2Policy from metaworld.policies.sawyer_bin_picking_v2_policy import SawyerBinPickingV2Policy from metaworld.policies.sawyer_box_close_v2_policy import SawyerBoxCloseV2Policy -from metaworld.policies.sawyer_button_press_topdown_v2_policy import SawyerButtonPressTopdownV2Policy -from metaworld.policies.sawyer_button_press_topdown_wall_v2_policy import SawyerButtonPressTopdownWallV2Policy +from metaworld.policies.sawyer_button_press_topdown_v2_policy import ( + SawyerButtonPressTopdownV2Policy, +) +from metaworld.policies.sawyer_button_press_topdown_wall_v2_policy import ( + SawyerButtonPressTopdownWallV2Policy, +) from metaworld.policies.sawyer_button_press_v2_policy import SawyerButtonPressV2Policy -from metaworld.policies.sawyer_button_press_wall_v2_policy import SawyerButtonPressWallV2Policy +from metaworld.policies.sawyer_button_press_wall_v2_policy import ( + SawyerButtonPressWallV2Policy, +) from metaworld.policies.sawyer_coffee_button_v2_policy import SawyerCoffeeButtonV2Policy from metaworld.policies.sawyer_coffee_pull_v2_policy import SawyerCoffeePullV2Policy from metaworld.policies.sawyer_coffee_push_v2_policy import SawyerCoffeePushV2Policy @@ -21,19 +27,37 @@ from metaworld.policies.sawyer_faucet_open_v2_policy import SawyerFaucetOpenV2Policy from metaworld.policies.sawyer_hammer_v2_policy import SawyerHammerV2Policy from metaworld.policies.sawyer_hand_insert_v2_policy import SawyerHandInsertV2Policy -from metaworld.policies.sawyer_handle_press_side_v2_policy import SawyerHandlePressSideV2Policy +from metaworld.policies.sawyer_handle_press_side_v2_policy import ( + SawyerHandlePressSideV2Policy, +) from metaworld.policies.sawyer_handle_press_v2_policy import SawyerHandlePressV2Policy -from metaworld.policies.sawyer_handle_pull_side_v2_policy import SawyerHandlePullSideV2Policy +from metaworld.policies.sawyer_handle_pull_side_v2_policy import ( + SawyerHandlePullSideV2Policy, +) from metaworld.policies.sawyer_handle_pull_v2_policy import SawyerHandlePullV2Policy from metaworld.policies.sawyer_lever_pull_v2_policy import SawyerLeverPullV2Policy -from metaworld.policies.sawyer_peg_insertion_side_v2_policy import SawyerPegInsertionSideV2Policy -from metaworld.policies.sawyer_peg_unplug_side_v2_policy import SawyerPegUnplugSideV2Policy -from metaworld.policies.sawyer_pick_out_of_hole_v2_policy import SawyerPickOutOfHoleV2Policy +from metaworld.policies.sawyer_peg_insertion_side_v2_policy import ( + SawyerPegInsertionSideV2Policy, +) +from metaworld.policies.sawyer_peg_unplug_side_v2_policy import ( + SawyerPegUnplugSideV2Policy, +) +from metaworld.policies.sawyer_pick_out_of_hole_v2_policy import ( + SawyerPickOutOfHoleV2Policy, +) from metaworld.policies.sawyer_pick_place_v2_policy import SawyerPickPlaceV2Policy -from metaworld.policies.sawyer_pick_place_wall_v2_policy import SawyerPickPlaceWallV2Policy -from metaworld.policies.sawyer_plate_slide_back_side_v2_policy import SawyerPlateSlideBackSideV2Policy -from metaworld.policies.sawyer_plate_slide_back_v2_policy import SawyerPlateSlideBackV2Policy -from metaworld.policies.sawyer_plate_slide_side_v2_policy import SawyerPlateSlideSideV2Policy +from metaworld.policies.sawyer_pick_place_wall_v2_policy import ( + SawyerPickPlaceWallV2Policy, +) +from metaworld.policies.sawyer_plate_slide_back_side_v2_policy import ( + SawyerPlateSlideBackSideV2Policy, +) +from metaworld.policies.sawyer_plate_slide_back_v2_policy import ( + SawyerPlateSlideBackV2Policy, +) +from metaworld.policies.sawyer_plate_slide_side_v2_policy import ( + SawyerPlateSlideSideV2Policy, +) from metaworld.policies.sawyer_plate_slide_v2_policy import SawyerPlateSlideV2Policy from metaworld.policies.sawyer_push_back_v2_policy import SawyerPushBackV2Policy from metaworld.policies.sawyer_push_v2_policy import SawyerPushV2Policy diff --git a/metaworld/sawyer_xyz_env.py b/metaworld/sawyer_xyz_env.py index f41a77788..b143bc2e8 100644 --- a/metaworld/sawyer_xyz_env.py +++ b/metaworld/sawyer_xyz_env.py @@ -15,8 +15,8 @@ from gymnasium.utils.ezpickle import EzPickle from typing_extensions import TypeAlias -from metaworld.utils import reward_utils from metaworld.types import XYZ, EnvironmentStateDict, ObservationDict, Task +from metaworld.utils import reward_utils RenderMode: TypeAlias = "Literal['human', 'rgb_array', 'depth_array']" diff --git a/tests/metaworld/envs/mujoco/sawyer_xyz/test_obs_space_hand.py b/tests/metaworld/envs/mujoco/sawyer_xyz/test_obs_space_hand.py index d635c11f2..126d54089 100644 --- a/tests/metaworld/envs/mujoco/sawyer_xyz/test_obs_space_hand.py +++ b/tests/metaworld/envs/mujoco/sawyer_xyz/test_obs_space_hand.py @@ -2,9 +2,9 @@ import pytest from metaworld.env_dict import ALL_V2_ENVIRONMENTS -from metaworld.sawyer_xyz_env import SawyerXYZEnv from metaworld.policies.action import Action from metaworld.policies.policy import Policy, move +from metaworld.sawyer_xyz_env import SawyerXYZEnv class SawyerRandomReachPolicy(Policy):