Small improvements to CompilerEnv docstrings.
@@ -75,9 +75,12 @@ class CompilerEnv(gym.Env):
>>> env = gym.make("llvm-v0")
+ See :code:`compiler_gym.COMPILER_GYM_ENVS` for a list of registered
+ environment names.
+
Alternatively, an environment can be constructed directly, such as by
connecting to a running compiler service at :code:`localhost:8080` (see
- :doc:`/compiler_gym/service` for more details on connecting to services):
+ :doc:`this document </compiler_gym/service>` for more details):
>>> env = CompilerEnv(
... service="localhost:8080",
@@ -101,30 +104,37 @@ class CompilerEnv(gym.Env):
Reward after 100 steps: -0.32123
:ivar service: A connection to the underlying compiler service.
+
:vartype service: compiler_gym.service.CompilerGymServiceConnection
:ivar logger: A Logger instance used by the environment for communicating
info and warnings.
+
:vartype logger: logging.Logger
:ivar action_spaces: A list of supported action space names.
+
:vartype action_spaces: List[str]
- :ivar reward_range: A tuple indicating the range of reward values.
- Default range is (-inf, +inf).
+ :ivar reward_range: A tuple indicating the range of reward values. Default
+ range is (-inf, +inf).
+
:vartype reward_range: Tuple[float, float]
:ivar observation: A view of the available observation spaces that permits
on-demand computation of observations.
+
:vartype observation: compiler_gym.views.ObservationView
:ivar reward: A view of the available reward spaces that permits on-demand
computation of rewards.
+
:vartype reward: compiler_gym.views.RewardView
- :ivar episode_reward: If
- :func:`CompilerEnv.reward_space <compiler_gym.envs.CompilerGym.reward_space>`
- is set, this value is the sum of all rewards for the current episode.
+ :ivar episode_reward: If :func:`CompilerEnv.reward_space
+ <compiler_gym.envs.CompilerGym.reward_space>` is set, this value is the
+ sum of all rewards for the current episode.
+
:vartype episode_reward: float
"""
@@ -143,6 +153,9 @@ class CompilerEnv(gym.Env):
):
"""Construct and initialize a CompilerGym service environment.
+ In normal use you should use :code:`gym.make(...)` rather than calling
+ the constructor directly.
+
:param service: The hostname and port of a service that implements the
CompilerGym service interface, or the path of a binary file which
provides the CompilerGym service interface when executed. See
