Skip to content

Commit

Permalink
Add docstring to environment entrypoint.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gamenot committed Jan 27, 2023
1 parent 33b994e commit 42334ff
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions smarts/env/gymnasium/bubble_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
from textwrap import dedent
from typing import Optional

import gymnasium as gym


Expand All @@ -34,7 +31,27 @@ def checked_bubble_env_v0(
seed: int = 42,
**kwargs,
):
"""Imports and generates the `bubble_env` environment which converts nearby replay
traffic (non-reactive) into model based traffic (reactive). This uses the NGSIM i80
dataset as a basis.
Args:
traffic_mode (Literal["traffic_A"]): The version of bubble traffic to use.
action_space (ActionSpaceType): The action space the agent should use.
img_meters (float): The square side dimensions of the surface the top-down rgb image
portrays. This affects resolution.
img_pixels (float): The total number of pixels in the top-down rgb image. This affects
resolution.
headless (bool): If the environment should display sumo-gui.
seed (int): The seed of the environment.
Returns:
(gymnasium.Env): The bubble_env environment.
Raises:
ImportError: If `bubble_env` is not installed.
"""
try:
import bubble_env_contrib
except ImportError as err:
Expand Down

0 comments on commit 42334ff

Please sign in to comment.