Skip to content

Commit

Permalink
updated to new version of gdown to fix download bug; fixed myochallen…
Browse files Browse the repository at this point in the history
…ge baseline example file; docs to be fixed as well;
  • Loading branch information
Pierre Schumacher committed Mar 13, 2024
1 parent dd539f1 commit 6f9567e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions examples/example_load_baseline_myosuite.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
# This example requires the installation of myosuite
# pip install myosuite

import time

import gym
import myosuite # noqa

import deprl

# create the sconegym env
env = gym.make("myoLegChaseTagP1-v0")

env = gym.make("myoChallengeChaseTagP1-v0")
policy = deprl.load_baseline(env)

env.seed(0)
for ep in range(5):
for ep in range(10):
ep_steps = 0
ep_tot_reward = 0
state = env.reset()
Expand All @@ -25,15 +26,14 @@

ep_steps += 1
ep_tot_reward += reward
env.render()
env.mj_render()
time.sleep(0.01)

# check if done
if done or (ep_steps >= 1000):
print(
f"Episode {ep} ending; steps={ep_steps}; reward={ep_tot_reward:0.3f}; \
com={env.model.com_pos()}"
f"Episode {ep} ending; steps={ep_steps}; reward={ep_tot_reward:0.3f};"
)
env.write_now()
env.reset()
break

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pyyaml = "^6.0"
numpy = "^1.22.4"
termcolor = "^2.2.0"
pandas = "^2.0.1"
gdown = "^4.7.1"
gdown = "^5.1.0"
gym = "0.13.0"
wandb = "^0.15.4"
# torch = {version="2.1.0", source="pytorch-cpu"}
Expand Down

0 comments on commit 6f9567e

Please sign in to comment.