Skip to content

Commit 16ee36c

Browse files
committed
Added test runner and minor changes in the doc
1 parent 352ab19 commit 16ee36c

File tree

5 files changed

+15
-5
lines changed

5 files changed

+15
-5
lines changed

gymie/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
from gymie.api import override
33
from gymie.exceptions import *
44

5-
__version__ = '0.2.0'
5+
__version__ = '0.3.0'

gymie/api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def space_info(space):
210210

211211
@public_api
212212
def observation_space(ws, instance_id):
213-
"""API method. Generate a dictionary with space info
213+
"""API method. Generates a dictionary with space info
214214
and sends it to the client
215215
216216
Args:
@@ -222,7 +222,7 @@ def observation_space(ws, instance_id):
222222

223223
@public_api
224224
def action_space(ws, instance_id):
225-
"""API method. Generate a dictionary with space info
225+
"""API method. Generates a dictionary with space info
226226
and sends it to the client
227227
228228
Args:

run_tests.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
echo "Testing OpenAI Gym..."
4+
python tests/test_gymie.py
5+
6+
echo "Testing Gym Retro..."
7+
python tests/test_gymie_retro.py
8+
9+
echo "Testing Unity ML-Agents..."
10+
python tests/test_gymie_unity.py

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name="gymie",
8-
version="0.2.0",
8+
version="0.3.0",
99
author="Francisco Ramos",
1010
author_email="francisco.ramos@researchlab.ai",
1111
description="WebSocket server that exposes an API to train AI agents on OpenAI Gym and gym-api-like Environments",
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"count":1,"self":20360.5835776,"total":20411.081261,"children":{"InitializeActuators":{"count":1,"self":0.002441,"total":0.002441,"children":null},"InitializeSensors":{"count":1,"self":0.0026579999999999998,"total":0.0026579999999999998,"children":null},"AgentSendState":{"count":480052,"self":9.5747552,"total":25.378849,"children":{"CollectObservations":{"count":96011,"self":0.486523,"total":0.486523,"children":null},"CollectDiscreteActionMasks":{"count":96011,"self":0.55143599999999993,"total":0.55143599999999993,"children":null},"RequestDecision":{"count":96011,"self":3.103964,"total":14.766134999999998,"children":{"RayPerceptionSensor.Perceive":{"count":192022,"self":11.6621712,"total":11.662170999999999,"children":null}}}}},"DecideAction":{"count":480052,"self":19.3603296,"total":19.360329999999998,"children":null},"AgentAct":{"count":480052,"self":5.7394472,"total":5.750506,"children":{"RayPerceptionSensor.Perceive":{"count":192,"self":0.011059,"total":0.011059,"children":null}}}},"gauges":{"PushBlock.CumulativeReward":{"count":96,"max":-0.99994123,"min":-0.99994123,"runningAverage":-0.99994123,"value":-0.99994123,"weightedAverage":-0.99994123}},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1602684619","unity_version":"2019.4.0f1","command_line_arguments":"\/Users\/franciscoramos\/Personal\/Gymie-Server\/tests\/unity_env\/PushBlock.app\/Contents\/MacOS\/UnityEnvironment --mlagents-port 5005","communication_protocol_version":"1.1.0","com.unity.ml-agents_version":"1.4.0-preview","scene_name":"PushBlock","end_time_seconds":"1602705030"}}
1+
{"count":1,"self":0.852541,"total":0.94473599999999991,"children":{"InitializeActuators":{"count":1,"self":0.00449,"total":0.00449,"children":null},"InitializeSensors":{"count":1,"self":0.0042569999999999995,"total":0.0042569999999999995,"children":null},"AgentSendState":{"count":8,"self":0.003731,"total":0.022983999999999997,"children":{"CollectObservations":{"count":4,"self":4.9999999999999996E-05,"total":4.9999999999999996E-05,"children":null},"CollectDiscreteActionMasks":{"count":4,"self":0.000484,"total":0.000484,"children":null},"RequestDecision":{"count":4,"self":0.0050339999999999994,"total":0.018719,"children":{"AgentInfo.ToProto":{"count":4,"self":0.001419,"total":0.013685,"children":{"GenerateSensorData":{"count":4,"self":0.005931,"total":0.012265999999999999,"children":{"RayPerceptionSensor.Perceive":{"count":8,"self":0.0063349999999999995,"total":0.0063349999999999995,"children":null}}}}}}}}},"DecideAction":{"count":8,"self":0.053612,"total":0.053612,"children":null},"AgentAct":{"count":8,"self":0.002849,"total":0.002849,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1602751468","unity_version":"2019.4.0f1","command_line_arguments":"\/Users\/franciscoramos\/Personal\/Gymie-Server\/tests\/unity_env\/PushBlock.app\/Contents\/MacOS\/UnityEnvironment --mlagents-port 5005","communication_protocol_version":"1.1.0","com.unity.ml-agents_version":"1.4.0-preview","scene_name":"PushBlock","end_time_seconds":"1602751469"}}

0 commit comments

Comments
 (0)