Skip to content

Commit

Permalink
Merge pull request #11 from Co-Evolve/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
driesmarzougui authored Mar 25, 2024
2 parents 09fc72a + f2fd28e commit 77f9fcf
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions moojoco/environment/dual.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ def observation_space(self) -> SpaceType:
def step(
self, state: BaseEnvState, action: chex.Array, *args, **kwargs
) -> BaseEnvState:
return self._env.step(state=state, action=action, *args, **kwargs)
return self._env.step(state, action, *args, **kwargs)

def reset(
self, rng: np.random.RandomState | chex.PRNGKey, *args, **kwargs
) -> BaseEnvState:
return self._env.reset(rng=rng, *args, **kwargs)
return self._env.reset(rng, *args, **kwargs)

def render(self, state: BaseEnvState) -> List[RenderFrame] | None:
return self._env.render(state=state)
Expand Down
2 changes: 1 addition & 1 deletion moojoco/environment/mjc_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def step(
) -> VectorMJCEnvState:
self._states = list(
self._pool.map(
lambda env, ste, act: env.step(state=ste, action=act, *args, **kwargs),
lambda env, ste, act: env.step(ste, act, *args, **kwargs),
self._envs,
self._states,
action,
Expand Down
10 changes: 5 additions & 5 deletions moojoco/environment/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ def observation_space(self) -> SpaceType:
def step(
self, state: BaseEnvState, action: chex.Array, *args, **kwargs
) -> BaseEnvState:
return self._env.step(state=state, action=action, *args, **kwargs)
return self._env.step(state, action, *args, **kwargs)

def reset(
self, rng: np.random.RandomState | chex.PRNGKey, *args, **kwargs
) -> BaseEnvState:
return self._env.reset(rng=rng, *args, **kwargs)
return self._env.reset(rng, *args, **kwargs)

def render(self, state: BaseEnvState) -> List[RenderFrame] | None:
return self._env.render(state=state)
Expand All @@ -83,14 +83,14 @@ def _transform_observations(self, state: BaseEnvState) -> BaseEnvState:
def step(
self, state: BaseEnvState, action: chex.Array, *args, **kwargs
) -> BaseEnvState:
state = self._env.step(state=state, action=action, *args, **kwargs)
state = self._env.step(state, action, *args, **kwargs)
state = self._transform_observations(state=state)
return state

def reset(
self, rng: np.random.RandomState | chex.PRNGKey, *args, **kwargs
) -> BaseEnvState:
state = self._env.reset(rng=rng, *args, **kwargs)
state = self._env.reset(rng, *args, **kwargs)
state = self._transform_observations(state=state)
return state

Expand All @@ -114,5 +114,5 @@ def step(
self, state: BaseEnvState, action: chex.Array, *args, **kwargs
) -> BaseEnvState:
action, state = self._transform_action(action=action, state=state)
state = self._env.step(state=state, action=action, *args, **kwargs)
state = self._env.step(state, action, *args, **kwargs)
return state
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "moojoco"
version = "1.0.4"
version = "1.0.5"
authors = [
{ name = "Dries Marzougui", email = "[email protected]" },
]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

setup(
name='moojoco',
version='1.0.4',
version='1.0.5',
description='A unified framework for implementing and interfacing with MuJoCo and MuJoCo-XLA simulation '
'environments.',
long_description=readme,
Expand Down

0 comments on commit 77f9fcf

Please sign in to comment.