AI Slop Code RIsk Monitor

Farama-Foundation/Gymnasium

A standard API for single-agent reinforcement learning environments, with popular reference environments and related utilities (formerly Gym)

19.2 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for Farama-Foundation/Gymnasium, a Python project with 12,651 GitHub stars. SynthScan examined 77,015 lines of code across 443 source files, recording 1003 pattern matches distributed across 16 syntactic categories. The legacy adjusted pattern signal is 19.2 (Elevated pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

19.2
Adjusted Signal
19.2
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
12.7K
Stars
Python
Language
77.0K
Lines of Code
443
Files
1.0K
Pattern Hits
2026-10-12
Scan Date
0.18
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 37.9/100 · MEDIUM

Can maintainers explain intent, assumptions, and trade-offs? 598 finding(s).

Hallucinated Dependency & Supply Chain Risk 12.8/100 · LOW

Are imports declared and package/API names verified? 228 finding(s).

Agent Over-Engineering Ratio 46.4/100 · MEDIUM

Are wrappers, guards, and repeated structures necessary? 585 finding(s).

PR Review Velocity Impact 63.4/100 · HIGH

Which changes need focused human review? 1003 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 79MEDIUM 76LOW 848

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 1003 distinct pattern matches across 16 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers392 hits · 412 pts
SeverityFileLineSnippetContext
LOWgymnasium/wrappers/array_conversion.py89def _mapping_array_conversion(CODE
LOWgymnasium/wrappers/array_conversion.py97def _iterable_array_conversion(CODE
LOWgymnasium/wrappers/array_conversion.py114def _array_api_array_conversion(CODE
LOWgymnasium/wrappers/utils.py57def update_mean_var_count_from_moments(CODE
LOWgymnasium/wrappers/utils.py106def _create_discrete_zero_array(space: Discrete):CODE
LOWgymnasium/wrappers/utils.py111def _create_multidiscrete_zero_array(space: MultiDiscrete):CODE
LOWgymnasium/wrappers/utils.py131def _create_sequence_zero_array(space: Sequence):CODE
LOWgymnasium/wrappers/utils.py156def _create_one_of_zero_array(space: OneOf):CODE
LOWgymnasium/spaces/utils.py377def _unflatten_box_multibinary(CODE
LOWgymnasium/spaces/utils.py678def is_space_dtype_shape_equiv(space_1: Space, space_2: Space) -> bool:CODE
LOW⚡gymnasium/spaces/utils.py702def _is_space_fundamental_dtype_shape_equiv(space_1, space_2):CODE
LOW⚡gymnasium/spaces/utils.py712def _is_space_text_dtype_shape_equiv(space_1: Text, space_2):CODE
LOW⚡gymnasium/spaces/utils.py721def _is_space_dict_dtype_shape_equiv(space_1: Dict, space_2):CODE
LOWgymnasium/spaces/utils.py733def _is_space_tuple_dtype_shape_equiv(space_1, space_2):CODE
LOWgymnasium/spaces/utils.py745def _is_space_graph_dtype_shape_equiv(space_1: Graph, space_2):CODE
LOWgymnasium/spaces/utils.py761def _is_space_oneof_dtype_shape_equiv(space_1: OneOf, space_2):CODE
LOWgymnasium/spaces/utils.py773def _is_space_sequence_dtype_shape_equiv(space_1: Sequence, space_2):CODE
LOWgymnasium/utils/save_video.py20def capped_cubic_video_schedule(episode_id: int) -> bool:CODE
LOWgymnasium/utils/env_checker.py79def check_reset_seed_determinism(env: gym.Env) -> None:CODE
LOWgymnasium/utils/env_checker.py273def check_returned_data_not_reused(env: gym.Env, seed: int = 123) -> None:CODE
LOWgymnasium/utils/env_checker.py310def check_reset_return_info_deprecation(env: gym.Env) -> None:CODE
LOWgymnasium/utils/step_api_compatibility.py27def convert_to_terminated_truncated_step_api(CODE
LOWgymnasium/utils/passive_env_checker.py25def _check_box_observation_space(observation_space: spaces.Box) -> None:CODE
LOWgymnasium/utils/passive_env_checker.py221def env_data_reuse_passive_checker(CODE
LOWgymnasium/utils/passive_env_checker.py250def env_reset_passive_checker(CODE
LOWgymnasium/utils/passive_env_checker.py405def env_render_passive_checker(env: Env) -> RenderFrame | list[RenderFrame] | None:CODE
LOWgymnasium/envs/toy_text/cliffwalking.py166 def _calculate_transition_prob(CODE
LOWgymnasium/envs/toy_text/frozen_lake.py273 def update_probability_matrix(row, col, action):CODE
LOWgymnasium/envs/mujoco/mujoco_rendering.py119 def _legacy_add_marker_to_scene(self, marker: dict):CODE
LOW⚡gymnasium/vector/utils/shared_memory.py100def _create_tuple_shared_memory(CODE
LOW⚡gymnasium/vector/utils/shared_memory.py109def _create_dict_shared_memory(CODE
LOW⚡gymnasium/vector/utils/shared_memory.py119def _create_text_shared_memory(CODE
LOW⚡gymnasium/vector/utils/shared_memory.py126def _create_oneof_shared_memory(CODE
LOW⚡gymnasium/vector/utils/shared_memory.py136def _create_dynamic_shared_memory(CODE
LOW⚡gymnasium/vector/utils/shared_memory.py195def _read_tuple_from_shared_memory(CODE
LOW⚡gymnasium/vector/utils/shared_memory.py205def _read_dict_from_shared_memory(CODE
LOW⚡gymnasium/vector/utils/shared_memory.py215def _read_text_from_shared_memory(CODE
LOWgymnasium/vector/utils/shared_memory.py80def _create_base_shared_memory(CODE
LOWgymnasium/vector/utils/shared_memory.py181def _read_base_from_shared_memory(CODE
LOWgymnasium/vector/utils/shared_memory.py237def _read_one_of_from_shared_memory(CODE
LOWgymnasium/vector/utils/shared_memory.py286def _write_base_to_shared_memory(CODE
LOWgymnasium/vector/utils/shared_memory.py303def _write_tuple_to_shared_memory(CODE
LOWgymnasium/vector/utils/shared_memory.py316def _write_dict_to_shared_memory(CODE
LOWgymnasium/vector/utils/shared_memory.py324def _write_text_to_shared_memory(CODE
LOWgymnasium/vector/utils/shared_memory.py337def _write_oneof_to_shared_memory(CODE
LOWgymnasium/vector/utils/space_utils.py97def _batch_space_multidiscrete(space: MultiDiscrete, n: int = 1) -> Box:CODE
LOWgymnasium/vector/utils/space_utils.py189def _batch_differing_spaces_box(spaces: _PySequence[Box]) -> Box:CODE
LOWgymnasium/vector/utils/space_utils.py212def _batch_differing_spaces_discrete(spaces: _PySequence[Discrete]) -> MultiDiscrete:CODE
LOWgymnasium/vector/utils/space_utils.py228def _batch_differing_spaces_multi_discrete(spaces: _PySequence[MultiDiscrete]) -> Box:CODE
LOWgymnasium/vector/utils/space_utils.py251def _batch_differing_spaces_multi_binary(spaces: _PySequence[MultiBinary]) -> Box:CODE
LOWgymnasium/vector/utils/space_utils.py267def _batch_differing_spaces_tuple(spaces: _PySequence[Tuple]) -> Tuple:CODE
LOWgymnasium/vector/utils/space_utils.py278def _batch_differing_spaces_dict(spaces: _PySequence[Dict]) -> Dict:CODE
LOWgymnasium/vector/utils/space_utils.py510def _create_empty_array_multi(CODE
LOWgymnasium/vector/utils/space_utils.py517def _create_empty_array_tuple(CODE
LOWgymnasium/vector/utils/space_utils.py533def _create_empty_array_graph(CODE
LOWgymnasium/vector/utils/space_utils.py560def _create_empty_array_sequence(CODE
LOWgymnasium/vector/utils/space_utils.py572def _create_empty_array_oneof(CODE
LOWgymnasium/vector/utils/space_utils.py579def _create_empty_array_custom(CODE
LOWtests/test_core.py149def test_reward_observation_action_wrapper():CODE
LOWtests/test_core.py170def test_get_set_wrapper_attr():CODE
332 more matches not shown…
Cross-File Repetition53 hits · 265 pts
SeverityFileLineSnippetContext
HIGHgymnasium/wrappers/jax_to_torch.py0wrapper class to change inputs and outputs of environment to pytorch tensors. args: env: the numpy-based vector environmSTRING
HIGHgymnasium/wrappers/numpy_to_torch.py0wrapper class to change inputs and outputs of environment to pytorch tensors. args: env: the numpy-based vector environmSTRING
HIGHgymnasium/wrappers/vector/jax_to_torch.py0wrapper class to change inputs and outputs of environment to pytorch tensors. args: env: the numpy-based vector environmSTRING
HIGHgymnasium/wrappers/vector/numpy_to_torch.py0wrapper class to change inputs and outputs of environment to pytorch tensors. args: env: the numpy-based vector environmSTRING
HIGHgymnasium/wrappers/array_conversion.py0returns the object pickle state with args and kwargs.STRING
HIGHgymnasium/wrappers/vector/array_conversion.py0returns the object pickle state with args and kwargs.STRING
HIGHgymnasium/utils/ezpickle.py0returns the object pickle state with args and kwargs.STRING
HIGHgymnasium/spaces/tuple.py0checks whether this space can be flattened to a :class:`spaces.box`.STRING
HIGHgymnasium/spaces/box.py0checks whether this space can be flattened to a :class:`spaces.box`.STRING
HIGHgymnasium/spaces/multi_discrete.py0checks whether this space can be flattened to a :class:`spaces.box`.STRING
HIGHgymnasium/spaces/oneof.py0checks whether this space can be flattened to a :class:`spaces.box`.STRING
HIGHgymnasium/spaces/sequence.py0checks whether this space can be flattened to a :class:`spaces.box`.STRING
HIGHgymnasium/spaces/graph.py0checks whether this space can be flattened to a :class:`spaces.box`.STRING
HIGHgymnasium/spaces/discrete.py0checks whether this space can be flattened to a :class:`spaces.box`.STRING
HIGHgymnasium/spaces/dict.py0checks whether this space can be flattened to a :class:`spaces.box`.STRING
HIGHgymnasium/spaces/multi_binary.py0checks whether this space can be flattened to a :class:`spaces.box`.STRING
HIGHgymnasium/spaces/tuple.py0return boolean specifying if x is a valid member of this space.STRING
HIGHgymnasium/spaces/box.py0return boolean specifying if x is a valid member of this space.STRING
HIGHgymnasium/spaces/multi_discrete.py0return boolean specifying if x is a valid member of this space.STRING
HIGHgymnasium/spaces/oneof.py0return boolean specifying if x is a valid member of this space.STRING
HIGHgymnasium/spaces/sequence.py0return boolean specifying if x is a valid member of this space.STRING
HIGHgymnasium/spaces/graph.py0return boolean specifying if x is a valid member of this space.STRING
HIGHgymnasium/spaces/text.py0return boolean specifying if x is a valid member of this space.STRING
HIGHgymnasium/spaces/dict.py0return boolean specifying if x is a valid member of this space.STRING
HIGHgymnasium/spaces/space.py0return boolean specifying if x is a valid member of this space.STRING
HIGHgymnasium/spaces/multi_binary.py0return boolean specifying if x is a valid member of this space.STRING
HIGHgymnasium/spaces/tuple.py0convert a batch of samples from this space to a jsonable data type.STRING
HIGHgymnasium/spaces/box.py0convert a batch of samples from this space to a jsonable data type.STRING
HIGHgymnasium/spaces/multi_discrete.py0convert a batch of samples from this space to a jsonable data type.STRING
HIGHgymnasium/spaces/oneof.py0convert a batch of samples from this space to a jsonable data type.STRING
HIGHgymnasium/spaces/sequence.py0convert a batch of samples from this space to a jsonable data type.STRING
HIGHgymnasium/spaces/graph.py0convert a batch of samples from this space to a jsonable data type.STRING
HIGHgymnasium/spaces/dict.py0convert a batch of samples from this space to a jsonable data type.STRING
HIGHgymnasium/spaces/space.py0convert a batch of samples from this space to a jsonable data type.STRING
HIGHgymnasium/spaces/multi_binary.py0convert a batch of samples from this space to a jsonable data type.STRING
HIGHgymnasium/spaces/tuple.py0convert a jsonable data type to a batch of samples from this space.STRING
HIGHgymnasium/spaces/box.py0convert a jsonable data type to a batch of samples from this space.STRING
HIGHgymnasium/spaces/multi_discrete.py0convert a jsonable data type to a batch of samples from this space.STRING
HIGHgymnasium/spaces/oneof.py0convert a jsonable data type to a batch of samples from this space.STRING
HIGHgymnasium/spaces/sequence.py0convert a jsonable data type to a batch of samples from this space.STRING
HIGHgymnasium/spaces/graph.py0convert a jsonable data type to a batch of samples from this space.STRING
HIGHgymnasium/spaces/dict.py0convert a jsonable data type to a batch of samples from this space.STRING
HIGHgymnasium/spaces/space.py0convert a jsonable data type to a batch of samples from this space.STRING
HIGHgymnasium/spaces/multi_binary.py0convert a jsonable data type to a batch of samples from this space.STRING
HIGHgymnasium/spaces/tuple.py0check whether ``other`` is equivalent to this instance.STRING
HIGHgymnasium/spaces/multi_discrete.py0check whether ``other`` is equivalent to this instance.STRING
HIGHgymnasium/spaces/oneof.py0check whether ``other`` is equivalent to this instance.STRING
HIGHgymnasium/spaces/sequence.py0check whether ``other`` is equivalent to this instance.STRING
HIGHgymnasium/spaces/discrete.py0check whether ``other`` is equivalent to this instance.STRING
HIGHgymnasium/spaces/text.py0check whether ``other`` is equivalent to this instance.STRING
HIGHgymnasium/spaces/graph.py0check whether `other` is equivalent to this instance.STRING
HIGHgymnasium/spaces/dict.py0check whether `other` is equivalent to this instance.STRING
HIGHgymnasium/spaces/multi_binary.py0check whether `other` is equivalent to this instance.STRING
Unused Imports228 hits · 210 pts
SeverityFileLineSnippetContext
LOWgymnasium/__init__.py5CODE
LOWgymnasium/__init__.py5CODE
LOWgymnasium/__init__.py5CODE
LOWgymnasium/__init__.py5CODE
LOWgymnasium/__init__.py5CODE
LOWgymnasium/__init__.py12CODE
LOWgymnasium/__init__.py13CODE
LOWgymnasium/__init__.py13CODE
LOWgymnasium/__init__.py13CODE
LOWgymnasium/__init__.py13CODE
LOWgymnasium/__init__.py13CODE
LOWgymnasium/__init__.py13CODE
LOWgymnasium/__init__.py13CODE
LOWgymnasium/__init__.py13CODE
LOWgymnasium/__init__.py23CODE
LOWgymnasium/__init__.py23CODE
LOWgymnasium/__init__.py23CODE
LOWgymnasium/__init__.py23CODE
LOWgymnasium/__init__.py23CODE
LOWgymnasium/__init__.py23CODE
LOWgymnasium/__init__.py23CODE
LOWgymnasium/__init__.py31CODE
LOWgymnasium/core.py3CODE
LOWgymnasium/wrappers/transform_action.py9CODE
LOWgymnasium/wrappers/rendering.py10CODE
LOWgymnasium/wrappers/rendering.py318CODE
LOWgymnasium/wrappers/jax_to_torch.py11CODE
LOWgymnasium/wrappers/stateful_reward.py6CODE
LOWgymnasium/wrappers/transform_observation.py15CODE
LOWgymnasium/wrappers/__init__.py52CODE
LOWgymnasium/wrappers/__init__.py53CODE
LOWgymnasium/wrappers/__init__.py54CODE
LOWgymnasium/wrappers/__init__.py54CODE
LOWgymnasium/wrappers/__init__.py54CODE
LOWgymnasium/wrappers/__init__.py54CODE
LOWgymnasium/wrappers/__init__.py54CODE
LOWgymnasium/wrappers/__init__.py61CODE
LOWgymnasium/wrappers/__init__.py61CODE
LOWgymnasium/wrappers/__init__.py61CODE
LOWgymnasium/wrappers/__init__.py61CODE
LOWgymnasium/wrappers/__init__.py61CODE
LOWgymnasium/wrappers/__init__.py68CODE
LOWgymnasium/wrappers/__init__.py68CODE
LOWgymnasium/wrappers/__init__.py69CODE
LOWgymnasium/wrappers/__init__.py69CODE
LOWgymnasium/wrappers/__init__.py69CODE
LOWgymnasium/wrappers/__init__.py69CODE
LOWgymnasium/wrappers/__init__.py69CODE
LOWgymnasium/wrappers/__init__.py76CODE
LOWgymnasium/wrappers/__init__.py77CODE
LOWgymnasium/wrappers/__init__.py77CODE
LOWgymnasium/wrappers/__init__.py77CODE
LOWgymnasium/wrappers/__init__.py77CODE
LOWgymnasium/wrappers/__init__.py83CODE
LOWgymnasium/wrappers/__init__.py83CODE
LOWgymnasium/wrappers/__init__.py83CODE
LOWgymnasium/wrappers/__init__.py83CODE
LOWgymnasium/wrappers/__init__.py83CODE
LOWgymnasium/wrappers/__init__.py83CODE
LOWgymnasium/wrappers/__init__.py83CODE
168 more matches not shown…
Decorative Section Separators58 hits · 180 pts
SeverityFileLineSnippetContext
MEDIUMgymnasium/envs/__init__.py16# ----------------------------------------COMMENT
MEDIUMgymnasium/envs/__init__.py63# ----------------------------------------COMMENT
MEDIUMgymnasium/envs/__init__.py92# ----------------------------------------COMMENT
MEDIUMgymnasium/envs/__init__.py132# ----------------------------------------COMMENT
MEDIUMgymnasium/envs/__init__.py176# ----------------------------------------COMMENT
MEDIUMgymnasium/envs/__init__.py192# ----------------------------------------COMMENT
MEDIUMgymnasium/envs/mujoco/mujoco_env.py212 # ----------------------------COMMENT
MEDIUMgymnasium/envs/mujoco/mujoco_env.py229 # -----------------------------COMMENT
MEDIUMdocs/tutorials/gymnasium_basics/load_quadruped_model.py40# ---------------------------------COMMENT
MEDIUMdocs/tutorials/gymnasium_basics/load_quadruped_model.py55# -----------------------COMMENT
MEDIUM⚡docs/tutorials/gymnasium_basics/load_quadruped_model.py83# --------------------------------------------COMMENT
MEDIUM⚡docs/tutorials/gymnasium_basics/load_quadruped_model.py90# ---------------------------------------------------------COMMENT
MEDIUMdocs/tutorials/gymnasium_basics/load_quadruped_model.py129# ----------------------------------------------------------COMMENT
MEDIUMdocs/tutorials/gymnasium_basics/load_quadruped_model.py167# -----------------------------------------------------COMMENT
MEDIUMdocs/tutorials/gymnasium_basics/load_quadruped_model.py202# ----------------------------------------------------------COMMENT
MEDIUMdocs/tutorials/gymnasium_basics/load_quadruped_model.py230# -------------------------COMMENT
MEDIUMdocs/tutorials/gymnasium_basics/load_quadruped_model.py280# -------------------------COMMENT
MEDIUM…rials/gymnasium_basics/implementing_custom_wrappers.py22# -----------------------------------------------------COMMENT
MEDIUM…rials/gymnasium_basics/implementing_custom_wrappers.py53# ------------------------------------------------COMMENT
MEDIUM…rials/gymnasium_basics/implementing_custom_wrappers.py83# ------------------------------------------------COMMENT
MEDIUM…rials/gymnasium_basics/implementing_custom_wrappers.py107# ------------------------------------------COMMENT
MEDIUMdocs/tutorials/gymnasium_basics/environment_creation.py406# ----------------COMMENT
MEDIUMdocs/tutorials/gymnasium_basics/environment_creation.py481# ------------------COMMENT
MEDIUMdocs/tutorials/gymnasium_basics/environment_creation.py503# ------------------------------COMMENT
MEDIUMdocs/tutorials/gymnasium_basics/environment_creation.py535# --------------COMMENT
MEDIUMdocs/tutorials/gymnasium_basics/handling_time_limits.py34# ---------------------------COMMENT
MEDIUMdocs/tutorials/gymnasium_basics/handling_time_limits.py72# ----------COMMENT
MEDIUMdocs/tutorials/training_agents/action_masking_taxi.py142# ======================COMMENT
MEDIUMdocs/tutorials/training_agents/action_masking_taxi.py203# ===================COMMENT
MEDIUMdocs/tutorials/training_agents/action_masking_taxi.py274# ================COMMENT
MEDIUMdocs/tutorials/training_agents/frozenlake_q_learning.py38# --------------------COMMENT
MEDIUMdocs/tutorials/training_agents/frozenlake_q_learning.py75# --------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/frozenlake_q_learning.py531# ----------COMMENT
MEDIUM⚡docs/tutorials/training_agents/vector_a2c.py19# ------------------------------COMMENT
MEDIUM⚡docs/tutorials/training_agents/vector_a2c.py25# ------------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py52# ------------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py73# ----------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py88# ------------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py258# -----------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py276# --------------------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py311# ------------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py340# ------------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py415# ----------------------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py569# ----------------------------------------------------------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py574# ------------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py590# ------------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py606# ------------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py627# -----------------------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py657# ------------------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py708# ------------------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py719# ----------COMMENT
MEDIUMdocs/tutorials/training_agents/blackjack_q_learning.py42# ------------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/blackjack_q_learning.py81# ------------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/blackjack_q_learning.py108# ------------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/blackjack_q_learning.py165# ------------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/blackjack_q_learning.py300# ------------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/blackjack_q_learning.py338# ------------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/blackjack_q_learning.py442# ------------------------------COMMENT
Docstring Block Structure21 hits · 105 pts
SeverityFileLineSnippetContext
HIGHgymnasium/wrappers/__init__.py166Load a wrapper by name. This optimizes the loading of gymnasium wrappers by only loading the wrapper if it is used.STRING
HIGHgymnasium/wrappers/vector/__init__.py94Load a wrapper by name. This optimizes the loading of gymnasium wrappers by only loading the wrapper if it is uSTRING
HIGHgymnasium/spaces/box.py380Checks whether the box is bounded in some sense. Args: manner (str): One of ``"both"``, ``"below"``STRING
HIGHgymnasium/spaces/utils.py102Return the number of dimensions a flattened equivalent of this space would have. Args: space: The space to STRING
HIGHgymnasium/spaces/utils.py183Flatten a data point from a space. This is useful when e.g. points from spaces must be passed to a neural netwoSTRING
HIGHgymnasium/spaces/utils.py357Unflatten a data point from a space. This reverses the transformation applied by :func:`flatten`. You must ensure STRING
HIGHgymnasium/spaces/utils.py533Flatten a space into a space that is as flat as possible. This function will attempt to flatten ``space`` into a siSTRING
HIGHgymnasium/utils/seeding.py11Returns a NumPy random number generator (RNG) along with seed value from the inputted seed. If ``seed`` is ``None``STRING
HIGHgymnasium/envs/registration.py259Parse environment ID string format - ``[namespace/](env-name)[-v(version)]`` where the namespace and version are optionaSTRING
HIGHgymnasium/envs/registration.py646Creates an environment previously registered with :meth:`gymnasium.register` or a :class:`EnvSpec`. To find all avaSTRING
HIGHgymnasium/envs/registration.py843Create a vector environment according to the given ID. To find all available environments use :func:`gymnasium.ppriSTRING
HIGHgymnasium/envs/registration.py994Retrieve the :class:`EnvSpec` for the environment id from the :attr:`registry`. Args: env_id: The environmeSTRING
HIGHgymnasium/envs/box2d/lunar_lander.py792 The heuristic for 1. Testing 2. Demonstration rollout. Args: env: The environment s (lSTRING
HIGHgymnasium/vector/async_vector_env.py418Waits for the calls triggered by :meth:`reset_async` to finish and returns the results. Args: timeoSTRING
HIGHgymnasium/vector/async_vector_env.py516Wait for the calls to :obj:`step` in each sub-environment to finish. Args: timeout: Number of seconSTRING
HIGHgymnasium/vector/async_vector_env.py615Calls all parent pipes and waits for the results. Args: timeout: Number of seconds before the call STRING
HIGHgymnasium/vector/utils/shared_memory.py51Create a shared memory object, to be shared across processes. This eventually contains the observations from the veSTRING
HIGHgymnasium/vector/utils/shared_memory.py148Read the batch of observations from shared memory as a numpy array. ..notes:: The numpy array objects returSTRING
HIGHgymnasium/vector/utils/space_utils.py52Batch spaces of size `n` optimized for neural networks. Args: space: Space (e.g. the observation space for STRING
HIGHgymnasium/vector/utils/space_utils.py399Concatenate multiple samples from space into a single object. Args: space: Space of each item (e.g. `singleSTRING
HIGHgymnasium/vector/utils/space_utils.py472Create an empty (possibly nested and normally numpy-based) array, used in conjunction with ``concatenate(..., out=array)STRING
Deep Nesting64 hits · 64 pts
SeverityFileLineSnippetContext
LOWgymnasium/wrappers/transform_observation.py585CODE
LOWgymnasium/wrappers/atari_preprocessing.py177CODE
LOWgymnasium/wrappers/stateful_action.py47CODE
LOWgymnasium/wrappers/vector/dict_info_to_list.py99CODE
LOWgymnasium/wrappers/vector/rendering.py102CODE
LOWgymnasium/spaces/tuple.py56CODE
LOWgymnasium/spaces/box.py124CODE
LOWgymnasium/spaces/box.py235CODE
LOWgymnasium/spaces/box.py302CODE
LOWgymnasium/spaces/oneof.py67CODE
LOWgymnasium/spaces/sequence.py68CODE
LOWgymnasium/spaces/graph.py85CODE
LOWgymnasium/spaces/graph.py260CODE
LOWgymnasium/spaces/text.py103CODE
LOWgymnasium/spaces/dict.py70CODE
LOWgymnasium/spaces/dict.py141CODE
LOWgymnasium/utils/env_match.py9CODE
LOWgymnasium/utils/env_checker.py36CODE
LOWgymnasium/utils/env_checker.py79CODE
LOWgymnasium/utils/env_checker.py368CODE
LOWgymnasium/utils/step_api_compatibility.py27CODE
LOWgymnasium/utils/step_api_compatibility.py82CODE
LOWgymnasium/utils/passive_env_checker.py61CODE
LOWgymnasium/utils/passive_env_checker.py131CODE
LOWgymnasium/utils/passive_env_checker.py179CODE
LOWgymnasium/utils/passive_env_checker.py353CODE
LOWgymnasium/utils/passive_env_checker.py405CODE
LOWgymnasium/utils/play.py185CODE
LOWgymnasium/utils/play.py127CODE
LOWgymnasium/envs/registration.py835CODE
LOWgymnasium/envs/registration.py1017CODE
LOWgymnasium/envs/toy_text/cliffwalking.py235CODE
LOWgymnasium/envs/toy_text/cliffwalking.py317CODE
LOWgymnasium/envs/toy_text/taxi.py213CODE
LOWgymnasium/envs/toy_text/taxi.py319CODE
LOWgymnasium/envs/toy_text/frozen_lake.py36CODE
LOWgymnasium/envs/toy_text/frozen_lake.py231CODE
LOWgymnasium/envs/toy_text/frozen_lake.py365CODE
LOWgymnasium/envs/toy_text/frozen_lake.py262CODE
LOWgymnasium/envs/tabular/cliffwalking.py274CODE
LOWgymnasium/envs/mujoco/mujoco_rendering.py119CODE
LOWgymnasium/envs/mujoco/mujoco_rendering.py238CODE
LOWgymnasium/envs/mujoco/mujoco_rendering.py505CODE
LOWgymnasium/envs/box2d/car_racing.py307CODE
LOWgymnasium/envs/box2d/bipedal_walker.py283CODE
LOWgymnasium/envs/box2d/bipedal_walker.py615CODE
LOWgymnasium/envs/box2d/lunar_lander.py791CODE
LOWgymnasium/envs/box2d/car_dynamics.py182CODE
LOWgymnasium/vector/sync_vector_env.py275CODE
LOWgymnasium/vector/vector_env.py284CODE
LOWgymnasium/vector/async_vector_env.py823CODE
LOWtests/wrappers/test_array_conversion.py44CODE
LOWtests/wrappers/test_jax_to_torch.py22CODE
LOWtests/spaces/test_spaces.py119CODE
LOWtests/spaces/test_spaces.py358CODE
LOWtests/utils/test_passive_env_checker.py287CODE
LOWtests/utils/test_play.py147CODE
LOWtests/utils/test_step_api_compatibility.py115CODE
LOWtests/envs/test_env_implementation.py147CODE
LOWtests/envs/test_rendering.py40CODE
4 more matches not shown…
Over-Commented Block65 hits · 60 pts
SeverityFileLineSnippetContext
LOWgymnasium/wrappers/array_conversion.py1# This wrapper will convert array inputs from an Array API compatible framework A for the actionsCOMMENT
LOWgymnasium/envs/box2d/bipedal_walker.py241 np.array([1, 1, 1, 1]).astype(np.float32),COMMENT
LOWtests/spaces/utils.py141 # Graph(COMMENT
LOWtests/envs/registration/test_make.py21 TimeLimit,COMMENT
LOWdocs/tutorials/gymnasium_basics/load_quadruped_model.py21# The reader is expected to be familiar with the `Gymnasium` API & library, the basics of robotics,COMMENT
LOWdocs/tutorials/gymnasium_basics/load_quadruped_model.py41# In this tutorial we will load the Unitree Go1 robot from the excellent MuJoCo Menagerie robot model collection.COMMENT
LOWdocs/tutorials/gymnasium_basics/load_quadruped_model.py81# %%COMMENT
LOWdocs/tutorials/gymnasium_basics/load_quadruped_model.py121 exclude_current_positions_from_observation=False,COMMENT
LOWdocs/tutorials/gymnasium_basics/load_quadruped_model.py161COMMENT
LOWdocs/tutorials/gymnasium_basics/load_quadruped_model.py221 max_episode_steps=1000,COMMENT
LOWdocs/tutorials/gymnasium_basics/load_quadruped_model.py281# You can follow this guide to create most quadruped environments.COMMENT
LOW…rials/gymnasium_basics/implementing_custom_wrappers.py21# Inheriting from :class:`gymnasium.ObservationWrapper`COMMENT
LOW…rials/gymnasium_basics/implementing_custom_wrappers.py101 def reward(self, r: SupportsFloat) -> SupportsFloat:COMMENT
LOWdocs/tutorials/gymnasium_basics/environment_creation.py101COMMENT
LOWdocs/tutorials/gymnasium_basics/environment_creation.py121# The ``__init__`` method of our environment will accept the integerCOMMENT
LOWdocs/tutorials/gymnasium_basics/environment_creation.py221 }COMMENT
LOWdocs/tutorials/gymnasium_basics/environment_creation.py241# worry much about seeding, *but you need to remember to callCOMMENT
LOWdocs/tutorials/gymnasium_basics/environment_creation.py401# or release other resources. You shouldn’t interact with the environmentCOMMENT
LOWdocs/tutorials/gymnasium_basics/environment_creation.py421# %%COMMENT
LOWdocs/tutorials/gymnasium_basics/environment_creation.py441# | Name | Type | Default | Description COMMENT
LOWdocs/tutorials/gymnasium_basics/environment_creation.py461# ``gymnasium_env/envs/__init__.py`` should have:COMMENT
LOWdocs/tutorials/gymnasium_basics/environment_creation.py481# ------------------COMMENT
LOWdocs/tutorials/gymnasium_basics/environment_creation.py501#COMMENT
LOWdocs/tutorials/gymnasium_basics/environment_creation.py521# You can also pass keyword arguments of your environment’s constructor toCOMMENT
LOWdocs/tutorials/gymnasium_basics/environment_creation.py541# Check out the `wrapper documentation </api/wrappers/>`__ for details onCOMMENT
LOWdocs/tutorials/gymnasium_basics/environment_creation.py561# GridWorld, you might only want to look at the relative position of theCOMMENT
LOWdocs/tutorials/gymnasium_basics/handling_time_limits.py41# More formally, a common example of bootstrapping in RL is updating the estimate of the Q-value function,COMMENT
LOWdocs/tutorials/gymnasium_basics/handling_time_limits.py61# A simple example of value functions is shown below. This is an illustrative example and not part of any specific algorCOMMENT
LOWdocs/tutorials/gymnasium_basics/handling_time_limits.py81# # This was needed in previous versions.COMMENT
LOWdocs/tutorials/training_agents/action_masking_taxi.py141# Running the ExperimentCOMMENT
LOWdocs/tutorials/training_agents/action_masking_taxi.py261savefig_folder.mkdir(parents=True, exist_ok=True)COMMENT
LOWdocs/tutorials/training_agents/action_masking_taxi.py281# invalid actions.COMMENT
LOWdocs/tutorials/training_agents/frozenlake_q_learning.py1"""COMMENT
LOWdocs/tutorials/training_agents/frozenlake_q_learning.py401#COMMENT
LOWdocs/tutorials/training_agents/frozenlake_q_learning.py421#COMMENT
LOWdocs/tutorials/training_agents/frozenlake_q_learning.py441COMMENT
LOWdocs/tutorials/training_agents/frozenlake_q_learning.py501COMMENT
LOWdocs/tutorials/training_agents/frozenlake_q_learning.py521# different exploration algorithm could overcome this. The other parameterCOMMENT
LOWdocs/tutorials/training_agents/frozenlake_q_learning.py541# Wikipedia <https://en.wikipedia.org/wiki/Q-learning>`__COMMENT
LOWdocs/tutorials/training_agents/mujoco_reinforce.py121 1 + torch.exp(self.policy_stddev_net(shared_features))COMMENT
LOWdocs/tutorials/training_agents/mujoco_reinforce.py221# Following is the overview of the training procedureCOMMENT
LOWdocs/tutorials/training_agents/mujoco_reinforce.py301sns.lineplot(x="episodes", y="reward", data=df1).set(COMMENT
LOWdocs/tutorials/training_agents/vector_a2c.py1"""COMMENT
LOWdocs/tutorials/training_agents/vector_a2c.py21COMMENT
LOWdocs/tutorials/training_agents/vector_a2c.py41# the learning rates and the number of environments that run in parallel to collect experiences. The actor and critic neCOMMENT
LOWdocs/tutorials/training_agents/vector_a2c.py261# we can play with `n_envs` in parallel and thus get up to a linear speedup (meaning that in theory, we collect samples COMMENT
LOWdocs/tutorials/training_agents/vector_a2c.py341#COMMENT
LOWdocs/tutorials/training_agents/vector_a2c.py561# %%COMMENT
LOWdocs/tutorials/training_agents/vector_a2c.py581#COMMENT
LOWdocs/tutorials/training_agents/vector_a2c.py601# :alt: karp_flatt_metricCOMMENT
LOWdocs/tutorials/training_agents/vector_a2c.py701 done = terminated or truncatedCOMMENT
LOWdocs/tutorials/training_agents/vector_a2c.py721# [1] V. Mnih, A. P. Badia, M. Mirza, A. Graves, T. P. Lillicrap, T. Harley, D. Silver, K. Kavukcuoglu. "Asynchronous MeCOMMENT
LOWdocs/tutorials/training_agents/blackjack_q_learning.py1"""COMMENT
LOWdocs/tutorials/training_agents/blackjack_q_learning.py21# **Blackjack** is one of the most popular casino card games that is alsoCOMMENT
LOWdocs/tutorials/training_agents/blackjack_q_learning.py61# Note: We are going to follow the rules from Sutton & Barto.COMMENT
LOWdocs/tutorials/training_agents/blackjack_q_learning.py81# ------------------------------COMMENT
LOWdocs/tutorials/training_agents/blackjack_q_learning.py101# - Boolean whether the player holds a usable ace (An ace is usable if itCOMMENT
LOWdocs/tutorials/training_agents/blackjack_q_learning.py121# not the environment has terminated.COMMENT
LOWdocs/tutorials/training_agents/blackjack_q_learning.py141action = env.action_space.sample()COMMENT
LOWdocs/tutorials/training_agents/blackjack_q_learning.py161COMMENT
5 more matches not shown…
Modern Structural Boilerplate48 hits · 48 pts
SeverityFileLineSnippetContext
LOWgymnasium/__init__.py34__all__ = [CODE
LOWgymnasium/wrappers/transform_action.py20__all__ = ["TransformAction", "ClipAction", "RescaleAction"]CODE
LOWgymnasium/wrappers/rendering.py25__all__ = [CODE
LOWgymnasium/wrappers/jax_to_torch.py41__all__ = ["JaxToTorch", "jax_to_torch", "torch_to_jax", "Device"]CODE
LOWgymnasium/wrappers/stateful_reward.py17__all__ = ["NormalizeReward"]CODE
LOWgymnasium/wrappers/transform_observation.py27__all__ = [CODE
LOWgymnasium/wrappers/__init__.py97__all__ = [CODE
LOWgymnasium/wrappers/transform_reward.py18__all__ = ["TransformReward", "ClipReward"]CODE
LOWgymnasium/wrappers/jax_to_numpy.py25__all__ = ["JaxToNumpy", "jax_to_numpy", "numpy_to_jax"]CODE
LOWgymnasium/wrappers/stateful_observation.py26__all__ = [CODE
LOWgymnasium/wrappers/array_conversion.py48__all__ = ["ArrayConversion", "array_conversion"]CODE
LOWgymnasium/wrappers/numpy_to_torch.py27__all__ = ["NumpyToTorch", "torch_to_numpy", "numpy_to_torch", "Device"]CODE
LOWgymnasium/wrappers/common.py34__all__ = [CODE
LOWgymnasium/wrappers/utils.py28__all__ = ["RunningMeanStd", "update_mean_var_count_from_moments", "create_zero_array"]CODE
LOWgymnasium/wrappers/atari_preprocessing.py13__all__ = ["AtariPreprocessing"]CODE
LOWgymnasium/wrappers/stateful_action.py13__all__ = ["StickyAction", "RepeatAction"]CODE
LOWgymnasium/wrappers/vector/dict_info_to_list.py12__all__ = ["DictInfoToList"]CODE
LOWgymnasium/wrappers/vector/jax_to_torch.py12__all__ = ["JaxToTorch"]CODE
LOWgymnasium/wrappers/vector/stateful_reward.py18__all__ = ["NormalizeReward"]CODE
LOWgymnasium/wrappers/vector/stateful_reward.py129 def update_running_mean(self, setting: bool) -> None:CODE
LOWgymnasium/wrappers/vector/__init__.py34__all__ = [CODE
LOWgymnasium/wrappers/vector/jax_to_numpy.py12__all__ = ["JaxToNumpy"]CODE
LOWgymnasium/wrappers/vector/stateful_observation.py26__all__ = ["NormalizeObservation"]CODE
LOWgymnasium/wrappers/vector/stateful_observation.py133 def update_running_mean(self, setting: bool) -> None:CODE
LOWgymnasium/wrappers/vector/array_conversion.py17__all__ = ["ArrayConversion"]CODE
LOWgymnasium/wrappers/vector/numpy_to_torch.py12__all__ = ["NumpyToTorch"]CODE
LOWgymnasium/wrappers/vector/common.py20__all__ = ["RecordEpisodeStatistics"]CODE
LOWgymnasium/spaces/__init__.py27__all__ = [CODE
LOWgymnasium/utils/passive_env_checker.py13__all__ = [CODE
LOWgymnasium/utils/__init__.py13__all__ = ["colorize", "EzPickle", "RecordConstructorArgs"]CODE
LOWgymnasium/envs/registration.py29__all__ = [CODE
LOWgymnasium/envs/__init__.py7__all__ = [CODE
LOWgymnasium/envs/toy_text/__init__.py6__all__ = [CODE
LOWgymnasium/envs/tabular/__init__.py6__all__ = [CODE
LOWgymnasium/envs/mujoco/__init__.py4__all__ = ["MujocoEnv", "MujocoRenderer"]CODE
LOWgymnasium/envs/classic_control/__init__.py9__all__ = [CODE
LOWgymnasium/envs/box2d/__init__.py5__all__ = [CODE
LOWgymnasium/envs/phys2d/__init__.py6__all__ = [CODE
LOWgymnasium/vector/sync_vector_env.py24__all__ = ["SyncVectorEnv"]CODE
LOWgymnasium/vector/sync_vector_env.py394 def set_attr(self, name: str, values: list[Any] | tuple[Any, ...] | Any) -> None:CODE
LOWgymnasium/vector/vector_env.py30__all__ = [CODE
LOWgymnasium/vector/__init__.py15__all__ = [CODE
LOWgymnasium/vector/async_vector_env.py44__all__ = ["AsyncVectorEnv", "AsyncState"]CODE
LOWgymnasium/vector/async_vector_env.py660 def set_attr(self, name: str, values: list[Any] | tuple[Any] | object) -> None:CODE
LOWgymnasium/vector/utils/misc.py21__all__ = ["CloudpickleWrapper", "clear_mpi_env_vars"]CODE
LOWgymnasium/vector/utils/shared_memory.py37__all__ = ["create_shared_memory", "read_from_shared_memory", "write_to_shared_memory"]CODE
LOWgymnasium/vector/utils/__init__.py17__all__ = [CODE
LOWgymnasium/vector/utils/space_utils.py39__all__ = [CODE
Self-Referential Comments14 hits · 31 pts
SeverityFileLineSnippetContext
MEDIUMgymnasium/spaces/__init__.py1"""This module implements various spaces.STRING
MEDIUMgymnasium/envs/tabular/cliffwalking.py1"""This module provides a CliffWalking functional environment and Gymnasium environment wrapper CliffWalkingJaxEnv."""STRING
MEDIUMgymnasium/envs/tabular/blackjack.py1"""This module provides a Blackjack functional environment and Gymnasium environment wrapper BlackJackJaxEnv."""STRING
MEDIUMgymnasium/envs/tabular/blackjack.py77 """This function is called if the player has decided to take a card."""STRING
MEDIUMgymnasium/envs/tabular/blackjack.py111 """This function is called if the player has decided to not take a card.STRING
MEDIUMgymnasium/vector/async_vector_env.py218 # Create a dummy environment to gather the metadata and observation / action space of the environmentCOMMENT
MEDIUMtests/spaces/test_graph.py148 # Define a probability distribution for nodesCOMMENT
MEDIUMtests/spaces/test_graph.py175 # Define a probability distribution for edgesCOMMENT
MEDIUMtests/envs/registration/test_env_spec.py19 # Create an environment to test withCOMMENT
MEDIUMtests/vector/utils/test_space_utils.py42 # Create an empty array and check that space is within the batch spaceCOMMENT
MEDIUMdocs/tutorials/gymnasium_basics/environment_creation.py480# Creating a PackageCOMMENT
MEDIUMdocs/tutorials/training_agents/frozenlake_q_learning.py48 seed: int # Define a seed so that we get reproducible resultsCODE
MEDIUMdocs/tutorials/training_agents/frozenlake_q_learning.py89# Creating the Q-tableCOMMENT
MEDIUMdocs/tutorials/training_agents/mujoco_reinforce.py68# The following function estimates a mean and standard deviation of a normal distribution from which an action is sampleCOMMENT
Empty Error Handlers5 hits · 25 pts
SeverityFileLineSnippetContext
HIGHgymnasium/__init__.py69except Exception: # nosecCODE
HIGHgymnasium/envs/mujoco/mujoco_rendering.py218except: # noqa:E722CODE
HIGHtests/wrappers/test_array_conversion.py38except ImportError:CODE
HIGHtests/wrappers/vector/test_array_conversion.py32except ImportError:CODE
HIGHtests/utils/test_seeding.py11except error.Error:CODE
Redundant / Tautological Comments15 hits · 24 pts
SeverityFileLineSnippetContext
LOWgymnasium/wrappers/__init__.py181 # Check if the requested wrapper is in the _wrapper_to_class dictionaryCOMMENT
LOWgymnasium/wrappers/vector/__init__.py109 # Check if the requested wrapper is in the _wrapper_to_class dictionaryCOMMENT
LOWgymnasium/envs/registration.py328 # Check if the namespace exists in one of the registry's specsCOMMENT
LOWgymnasium/envs/registration.py783 # Check if pre-wrapped wrappersCOMMENT
LOWgymnasium/envs/toy_text/taxi.py278 # Check if the primary move is possible. When it is not (wall or gridCOMMENT
LOWgymnasium/envs/box2d/lunar_lander.py40INITIAL_RANDOM = 1000.0 # Set 1500 to make game harderCODE
LOWtests/spaces/test_sequence.py14 # Check if the sample is in 2d formatCOMMENT
LOWtests/spaces/test_sequence.py20 # Check if the sample is a `np.ndarray` as supposed to a tupleCOMMENT
LOW⚡tests/spaces/test_multidiscrete.py164 # Check if space can be flattened and unflattened without an integer overflowCOMMENT
LOW⚡tests/spaces/test_multidiscrete.py209 # Check if two spaces are equivalent.COMMENT
LOWtests/spaces/test_box.py365 # Check if only the expected precision warning is emittedCOMMENT
LOWtests/spaces/test_box.py401 # Check if two spaces are equivalent.COMMENT
LOWtests/spaces/test_spaces.py88 # Check if the samples are equivalentCOMMENT
LOWtests/envs/registration/test_register.py192 # Check if the namespace context manager worksCOMMENT
LOW.github/workflows/run-tutorial.yml146 # Output results to console immediatelyCOMMENT
AI Structural Patterns16 hits · 16 pts
SeverityFileLineSnippetContext
LOWgymnasium/wrappers/vector/rendering.py268CODE
LOWgymnasium/spaces/dict.py290CODE
LOWgymnasium/utils/play.py185CODE
LOWgymnasium/envs/registration.py563CODE
LOWgymnasium/envs/mujoco/hopper_v5.py163CODE
LOWgymnasium/envs/mujoco/walker2d_v4.py26CODE
LOWgymnasium/envs/mujoco/walker2d_v5.py172CODE
LOWgymnasium/envs/mujoco/hopper_v4.py26CODE
LOWgymnasium/envs/mujoco/mujoco_env.py38CODE
LOWgymnasium/envs/mujoco/ant_v5.py228CODE
LOWgymnasium/envs/mujoco/ant_v4.py23CODE
LOWgymnasium/envs/mujoco/humanoidstandup_v5.py286CODE
LOWgymnasium/envs/mujoco/humanoid_v5.py307CODE
LOWgymnasium/vector/async_vector_env.py124CODE
LOWtests/testing_env.py63CODE
LOWtests/testing_env.py177CODE
AI Slop Vocabulary5 hits · 14 pts
SeverityFileLineSnippetContext
LOWgymnasium/vector/vector_env.py329 # Otherwise, just use the array that already existsCOMMENT
LOWdocs/tutorials/gymnasium_basics/environment_creation.py545# environment implementation to fix this! We can simply add a wrapper onCOMMENT
MEDIUMdocs/tutorials/training_agents/action_masking_taxi.py145# We'll use multiple random seeds to ensure robust statistical comparison.COMMENT
MEDIUM⚡docs/tutorials/training_agents/vector_a2c.py30# Vectorized environments [3] can help to achieve quicker and more robust training by allowing multiple instancesCOMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py278# If we want to randomize the environment for training to get more robust agents (that can deal with different parameterCOMMENT
Excessive Try-Catch Wrapping13 hits · 13 pts
SeverityFileLineSnippetContext
LOWgymnasium/__init__.py69except Exception: # nosecCODE
LOWgymnasium/core.py400 except Exception as e:CODE
LOWgymnasium/wrappers/common.py164 except Exception as e:CODE
LOWgymnasium/wrappers/common.py347 except Exception as e:CODE
LOWgymnasium/wrappers/common.py364 except Exception as e:CODE
LOWgymnasium/wrappers/common.py458 except Exception as e:CODE
LOWgymnasium/utils/env_checker.py505 except Exception as e:CODE
LOWgymnasium/utils/passive_env_checker.py175 except Exception as e:CODE
LOWgymnasium/envs/registration.py175 except Exception as e:CODE
LOWgymnasium/envs/registration.py183 except Exception as e:CODE
LOWgymnasium/vector/utils/space_utils.py371 except Exception as e:CODE
LOWtests/envs/test_rendering.py101 except Exception as e:CODE
LOWdocs/introduction/create_custom_env.md383except Exception as e:CODE
Structural Annotation Overuse3 hits · 5 pts
SeverityFileLineSnippetContext
LOWdocs/tutorials/gymnasium_basics/load_quadruped_model.py54# Step 1 - Load the modelCOMMENT
LOW⚡docs/tutorials/gymnasium_basics/load_quadruped_model.py82# Step 2 - Tweaking the Environment ParametersCOMMENT
LOWdocs/tutorials/gymnasium_basics/load_quadruped_model.py229# Step 3 - Train your AgentCOMMENT
Slop Phrases3 hits · 4 pts
SeverityFileLineSnippetContext
LOWgymnasium/core.py317 If you inherit from :class:`Wrapper`, don't forget to call ``super().__init__(env)``STRING
LOWgymnasium/vector/vector_env.py377 Don't forget to call ``super().__init__(env)`` if the subclass overrides :meth:`__init__`.STRING
MEDIUMdocs/tutorials/gymnasium_basics/load_quadruped_model.py172# we have to pick values that make sense for our robot, you can use the default `MuJoCo/Ant`COMMENT