Skip to content

Commit

Permalink
TESTS: Updating tests to check everything for different versions. Add…
Browse files Browse the repository at this point in the history
…ing test for stable baselines
  • Loading branch information
vikashplus committed Jan 1, 2024
1 parent fbcc87c commit 0069093
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
11 changes: 11 additions & 0 deletions robohive/tests/test_sb.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from stable_baselines3 import PPO
import robohive
from robohive.utils import gym

from robohive import robohive_arm_suite
for env_name in sorted(robohive_arm_suite):
print(f"Training {env_name} ========================================")
env = gym.make(env_name)
model = PPO("MlpPolicy", env, verbose=0)
model.learn(total_timesteps=2)
break
14 changes: 7 additions & 7 deletions robohive/tests/test_versions.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
pip uninstall -y gym
pip uninstall -y gymnasium
pip uninstall -y stable-baselines3

echo "=================== Testing gym==0.13 ==================="
pip install gym==0.13
python tests/test_arms.py
python tests/test_examine_env.py
python tests/test_examine_robot.py
python tests/test_logger.py
python tests/test_robot.py
python tests/test_all.py
pip uninstall -y gym

echo "=================== Testing gym==0.26.2 ==================="
pip install gym==0.26.2
python tests/test_arms.py
python tests/test_all.py
pip uninstall -y gym

echo "=================== Testing gymnasium ==================="
pip install gymnasium
python tests/test_arms.py
python tests/test_all.py

echo "=================== Testing Stable Baselines ==================="
pip install stable-baselines3
python tests/test_sb.py
pip uninstall -y gymnasium
pip uninstall -y stable-baselines3

0 comments on commit 0069093

Please sign in to comment.