Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lihuoran committed Mar 20, 2023
1 parent b4ffb96 commit abbebba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion maro/rl/workflows/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def evaluate_only_workflow(rl_component_bundle: RLComponentBundle, env_attr: Wor
args = _get_args()
if args.seed is not None:
set_seeds(seed=args.seed)

scenario_path = get_env("SCENARIO_PATH")
scenario_path = os.path.normpath(scenario_path)
sys.path.insert(0, os.path.dirname(scenario_path))
Expand Down
11 changes: 6 additions & 5 deletions tests/rl/tasks/ddpg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@

class MyContinuousDDPGNet(ContinuousDDPGNet):
def __init__(
self,
state_dim: int,
action_dim: int,
action_limit: float,
action_space: spaces.Space,
self,
state_dim: int,
action_dim: int,
action_limit: float,
action_space: spaces.Space,
noise_scale: float = 0.1,
) -> None:
super(MyContinuousDDPGNet, self).__init__(state_dim=state_dim, action_dim=action_dim)
Expand Down Expand Up @@ -75,6 +75,7 @@ def _get_random_actions_impl(self, states: torch.Tensor) -> torch.Tensor:
[ndarray_to_tensor(self._action_space.sample(), device=self._device) for _ in range(states.shape[0])],
)


class MyQCriticNet(QNet):
def __init__(self, state_dim: int, action_dim: int) -> None:
super(MyQCriticNet, self).__init__(state_dim=state_dim, action_dim=action_dim)
Expand Down

0 comments on commit abbebba

Please sign in to comment.