mirror of
https://github.com/gryf/coach.git
synced 2026-02-19 16:25:52 +01:00
removing datasets + imports optimization
This commit is contained in:
@@ -1,10 +1,25 @@
|
||||
#
|
||||
# Copyright (c) 2017 Intel Corporation
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
import random
|
||||
import sys
|
||||
from os import path, environ
|
||||
|
||||
from rl_coach.filters.observation.observation_to_uint8_filter import ObservationToUInt8Filter
|
||||
|
||||
from rl_coach.filters.observation.observation_rgb_to_y_filter import ObservationRGBToYFilter
|
||||
from rl_coach.filters.observation.observation_to_uint8_filter import ObservationToUInt8Filter
|
||||
|
||||
try:
|
||||
if 'CARLA_ROOT' in environ:
|
||||
|
||||
@@ -26,18 +26,18 @@ from os import path, environ
|
||||
from typing import Union, List
|
||||
|
||||
import numpy as np
|
||||
|
||||
from rl_coach.base_parameters import VisualizationParameters
|
||||
from rl_coach.environments.environment import Environment, EnvironmentParameters, LevelSelection
|
||||
from rl_coach.filters.action.full_discrete_action_space_map import FullDiscreteActionSpaceMap
|
||||
from rl_coach.filters.filter import InputFilter, OutputFilter
|
||||
from rl_coach.filters.observation.observation_rescale_to_size_filter import ObservationRescaleToSizeFilter
|
||||
from rl_coach.filters.observation.observation_rgb_to_y_filter import ObservationRGBToYFilter
|
||||
from rl_coach.filters.observation.observation_stacking_filter import ObservationStackingFilter
|
||||
from rl_coach.filters.observation.observation_to_uint8_filter import ObservationToUInt8Filter
|
||||
from rl_coach.spaces import MultiSelectActionSpace, ImageObservationSpace, \
|
||||
VectorObservationSpace, StateSpace
|
||||
|
||||
from rl_coach.filters.observation.observation_rgb_to_y_filter import ObservationRGBToYFilter
|
||||
|
||||
|
||||
# enum of the available levels and their path
|
||||
class DoomLevel(Enum):
|
||||
|
||||
@@ -20,17 +20,17 @@ from collections import OrderedDict
|
||||
from typing import Union, List, Tuple, Dict
|
||||
|
||||
import numpy as np
|
||||
|
||||
from rl_coach import logger
|
||||
from rl_coach.base_parameters import Parameters
|
||||
from rl_coach.base_parameters import VisualizationParameters
|
||||
from rl_coach.core_types import GoalType, ActionType, EnvResponse, RunPhase
|
||||
from rl_coach.environments.environment_interface import EnvironmentInterface
|
||||
from rl_coach.logger import screen
|
||||
from rl_coach.renderer import Renderer
|
||||
from rl_coach.spaces import ActionSpace, ObservationSpace, DiscreteActionSpace, RewardSpace, StateSpace
|
||||
from rl_coach.utils import squeeze_list, force_list
|
||||
|
||||
from rl_coach import logger
|
||||
from rl_coach.environments.environment_interface import EnvironmentInterface
|
||||
from rl_coach.logger import screen
|
||||
|
||||
|
||||
class LevelSelection(object):
|
||||
def __init__(self, level: str):
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
|
||||
from typing import Union, Dict
|
||||
|
||||
from rl_coach.spaces import ActionSpace
|
||||
|
||||
from rl_coach.core_types import ActionType, EnvResponse, RunPhase
|
||||
from rl_coach.spaces import ActionSpace
|
||||
|
||||
|
||||
class EnvironmentInterface(object):
|
||||
|
||||
@@ -1,10 +1,26 @@
|
||||
import numpy as np
|
||||
import gym
|
||||
#
|
||||
# Copyright (c) 2017 Intel Corporation
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
import os
|
||||
|
||||
import gym
|
||||
import numpy as np
|
||||
from gym import spaces
|
||||
from gym.envs.registration import EnvSpec
|
||||
|
||||
from mujoco_py import load_model_from_path, MjSim , MjViewer, MjRenderContextOffscreen
|
||||
from mujoco_py import load_model_from_path, MjSim, MjViewer, MjRenderContextOffscreen
|
||||
|
||||
|
||||
class PendulumWithGoals(gym.Env):
|
||||
|
||||
@@ -19,6 +19,7 @@ from enum import Enum
|
||||
from typing import Union, List
|
||||
|
||||
import numpy as np
|
||||
|
||||
from rl_coach.filters.observation.observation_move_axis_filter import ObservationMoveAxisFilter
|
||||
|
||||
try:
|
||||
|
||||
@@ -1,8 +1,25 @@
|
||||
import numpy as np
|
||||
import gym
|
||||
from gym import spaces
|
||||
#
|
||||
# Copyright (c) 2017 Intel Corporation
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
import random
|
||||
|
||||
import gym
|
||||
import numpy as np
|
||||
from gym import spaces
|
||||
|
||||
|
||||
class BitFlip(gym.Env):
|
||||
metadata = {
|
||||
|
||||
@@ -1,8 +1,25 @@
|
||||
import numpy as np
|
||||
import gym
|
||||
from gym import spaces
|
||||
#
|
||||
# Copyright (c) 2017 Intel Corporation
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
from enum import Enum
|
||||
|
||||
import gym
|
||||
import numpy as np
|
||||
from gym import spaces
|
||||
|
||||
|
||||
class ExplorationChain(gym.Env):
|
||||
metadata = {
|
||||
|
||||
Reference in New Issue
Block a user