Skip to content

Commit 0140f3b

Browse files
committed
Minor fix with an assertion
1 parent 5bbf2bd commit 0140f3b

File tree

4 files changed

+6
-9
lines changed

4 files changed

+6
-9
lines changed

gymie/__init__.py

Lines changed: 1 addition & 1 deletion
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.1.0'
5+
__version__ = '0.1.1'

gymie/api.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,11 @@ def override(func_name):
4040
Raises:
4141
AssertionError: wrong function to override
4242
"""
43-
43+
assert func_name in ['get_env', 'process_step'], \
44+
'Error overriding. Functions available: `get_env`, `process_step`'
45+
4446
def inner_override(fn):
45-
assert(
46-
func_name in ['get_env', 'process_step'],
47-
'Error overriding. Functions available: `get_env`, `process_step`')
48-
4947
globals()[func_name] = fn
50-
5148
return fn
5249

5350
return inner_override

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name="gymie",
8-
version="0.1.0",
8+
version="0.1.1",
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",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"count":1,"self":0.59151999999999993,"total":0.65144,"children":{"InitializeActuators":{"count":1,"self":0.0028049999999999998,"total":0.0028049999999999998,"children":null},"InitializeSensors":{"count":1,"self":0.002598,"total":0.002598,"children":null},"AgentSendState":{"count":10,"self":0.0024939999999999997,"total":0.015099,"children":{"CollectObservations":{"count":4,"self":3.7E-05,"total":3.7E-05,"children":null},"CollectDiscreteActionMasks":{"count":4,"self":0.00033,"total":0.00033,"children":null},"RequestDecision":{"count":4,"self":0.00328,"total":0.012237999999999999,"children":{"AgentInfo.ToProto":{"count":4,"self":0.000993,"total":0.0089579999999999989,"children":{"GenerateSensorData":{"count":4,"self":0.0038859999999999997,"total":0.007965,"children":{"RayPerceptionSensor.Perceive":{"count":8,"self":0.004079,"total":0.004079,"children":null}}}}}}}}},"DecideAction":{"count":10,"self":0.035276999999999996,"total":0.035276999999999996,"children":null},"AgentAct":{"count":10,"self":0.001748,"total":0.001748,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1602684683","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":"1602684683"}}
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"}}

0 commit comments

Comments
 (0)