A standard API for single-agent reinforcement learning environments, with popular reference environments and related utilities (formerly Gym)
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.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 598 finding(s).
Are imports declared and package/API names verified? 228 finding(s).
Are wrappers, guards, and repeated structures necessary? 585 finding(s).
Which changes need focused human review? 1003 finding(s).
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.
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.
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.
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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | gymnasium/wrappers/array_conversion.py | 89 | def _mapping_array_conversion( | CODE |
| LOW | gymnasium/wrappers/array_conversion.py | 97 | def _iterable_array_conversion( | CODE |
| LOW | gymnasium/wrappers/array_conversion.py | 114 | def _array_api_array_conversion( | CODE |
| LOW | gymnasium/wrappers/utils.py | 57 | def update_mean_var_count_from_moments( | CODE |
| LOW | gymnasium/wrappers/utils.py | 106 | def _create_discrete_zero_array(space: Discrete): | CODE |
| LOW | gymnasium/wrappers/utils.py | 111 | def _create_multidiscrete_zero_array(space: MultiDiscrete): | CODE |
| LOW | gymnasium/wrappers/utils.py | 131 | def _create_sequence_zero_array(space: Sequence): | CODE |
| LOW | gymnasium/wrappers/utils.py | 156 | def _create_one_of_zero_array(space: OneOf): | CODE |
| LOW | gymnasium/spaces/utils.py | 377 | def _unflatten_box_multibinary( | CODE |
| LOW | gymnasium/spaces/utils.py | 678 | def is_space_dtype_shape_equiv(space_1: Space, space_2: Space) -> bool: | CODE |
| LOW⚡ | gymnasium/spaces/utils.py | 702 | def _is_space_fundamental_dtype_shape_equiv(space_1, space_2): | CODE |
| LOW⚡ | gymnasium/spaces/utils.py | 712 | def _is_space_text_dtype_shape_equiv(space_1: Text, space_2): | CODE |
| LOW⚡ | gymnasium/spaces/utils.py | 721 | def _is_space_dict_dtype_shape_equiv(space_1: Dict, space_2): | CODE |
| LOW | gymnasium/spaces/utils.py | 733 | def _is_space_tuple_dtype_shape_equiv(space_1, space_2): | CODE |
| LOW | gymnasium/spaces/utils.py | 745 | def _is_space_graph_dtype_shape_equiv(space_1: Graph, space_2): | CODE |
| LOW | gymnasium/spaces/utils.py | 761 | def _is_space_oneof_dtype_shape_equiv(space_1: OneOf, space_2): | CODE |
| LOW | gymnasium/spaces/utils.py | 773 | def _is_space_sequence_dtype_shape_equiv(space_1: Sequence, space_2): | CODE |
| LOW | gymnasium/utils/save_video.py | 20 | def capped_cubic_video_schedule(episode_id: int) -> bool: | CODE |
| LOW | gymnasium/utils/env_checker.py | 79 | def check_reset_seed_determinism(env: gym.Env) -> None: | CODE |
| LOW | gymnasium/utils/env_checker.py | 273 | def check_returned_data_not_reused(env: gym.Env, seed: int = 123) -> None: | CODE |
| LOW | gymnasium/utils/env_checker.py | 310 | def check_reset_return_info_deprecation(env: gym.Env) -> None: | CODE |
| LOW | gymnasium/utils/step_api_compatibility.py | 27 | def convert_to_terminated_truncated_step_api( | CODE |
| LOW | gymnasium/utils/passive_env_checker.py | 25 | def _check_box_observation_space(observation_space: spaces.Box) -> None: | CODE |
| LOW | gymnasium/utils/passive_env_checker.py | 221 | def env_data_reuse_passive_checker( | CODE |
| LOW | gymnasium/utils/passive_env_checker.py | 250 | def env_reset_passive_checker( | CODE |
| LOW | gymnasium/utils/passive_env_checker.py | 405 | def env_render_passive_checker(env: Env) -> RenderFrame | list[RenderFrame] | None: | CODE |
| LOW | gymnasium/envs/toy_text/cliffwalking.py | 166 | def _calculate_transition_prob( | CODE |
| LOW | gymnasium/envs/toy_text/frozen_lake.py | 273 | def update_probability_matrix(row, col, action): | CODE |
| LOW | gymnasium/envs/mujoco/mujoco_rendering.py | 119 | def _legacy_add_marker_to_scene(self, marker: dict): | CODE |
| LOW⚡ | gymnasium/vector/utils/shared_memory.py | 100 | def _create_tuple_shared_memory( | CODE |
| LOW⚡ | gymnasium/vector/utils/shared_memory.py | 109 | def _create_dict_shared_memory( | CODE |
| LOW⚡ | gymnasium/vector/utils/shared_memory.py | 119 | def _create_text_shared_memory( | CODE |
| LOW⚡ | gymnasium/vector/utils/shared_memory.py | 126 | def _create_oneof_shared_memory( | CODE |
| LOW⚡ | gymnasium/vector/utils/shared_memory.py | 136 | def _create_dynamic_shared_memory( | CODE |
| LOW⚡ | gymnasium/vector/utils/shared_memory.py | 195 | def _read_tuple_from_shared_memory( | CODE |
| LOW⚡ | gymnasium/vector/utils/shared_memory.py | 205 | def _read_dict_from_shared_memory( | CODE |
| LOW⚡ | gymnasium/vector/utils/shared_memory.py | 215 | def _read_text_from_shared_memory( | CODE |
| LOW | gymnasium/vector/utils/shared_memory.py | 80 | def _create_base_shared_memory( | CODE |
| LOW | gymnasium/vector/utils/shared_memory.py | 181 | def _read_base_from_shared_memory( | CODE |
| LOW | gymnasium/vector/utils/shared_memory.py | 237 | def _read_one_of_from_shared_memory( | CODE |
| LOW | gymnasium/vector/utils/shared_memory.py | 286 | def _write_base_to_shared_memory( | CODE |
| LOW | gymnasium/vector/utils/shared_memory.py | 303 | def _write_tuple_to_shared_memory( | CODE |
| LOW | gymnasium/vector/utils/shared_memory.py | 316 | def _write_dict_to_shared_memory( | CODE |
| LOW | gymnasium/vector/utils/shared_memory.py | 324 | def _write_text_to_shared_memory( | CODE |
| LOW | gymnasium/vector/utils/shared_memory.py | 337 | def _write_oneof_to_shared_memory( | CODE |
| LOW | gymnasium/vector/utils/space_utils.py | 97 | def _batch_space_multidiscrete(space: MultiDiscrete, n: int = 1) -> Box: | CODE |
| LOW | gymnasium/vector/utils/space_utils.py | 189 | def _batch_differing_spaces_box(spaces: _PySequence[Box]) -> Box: | CODE |
| LOW | gymnasium/vector/utils/space_utils.py | 212 | def _batch_differing_spaces_discrete(spaces: _PySequence[Discrete]) -> MultiDiscrete: | CODE |
| LOW | gymnasium/vector/utils/space_utils.py | 228 | def _batch_differing_spaces_multi_discrete(spaces: _PySequence[MultiDiscrete]) -> Box: | CODE |
| LOW | gymnasium/vector/utils/space_utils.py | 251 | def _batch_differing_spaces_multi_binary(spaces: _PySequence[MultiBinary]) -> Box: | CODE |
| LOW | gymnasium/vector/utils/space_utils.py | 267 | def _batch_differing_spaces_tuple(spaces: _PySequence[Tuple]) -> Tuple: | CODE |
| LOW | gymnasium/vector/utils/space_utils.py | 278 | def _batch_differing_spaces_dict(spaces: _PySequence[Dict]) -> Dict: | CODE |
| LOW | gymnasium/vector/utils/space_utils.py | 510 | def _create_empty_array_multi( | CODE |
| LOW | gymnasium/vector/utils/space_utils.py | 517 | def _create_empty_array_tuple( | CODE |
| LOW | gymnasium/vector/utils/space_utils.py | 533 | def _create_empty_array_graph( | CODE |
| LOW | gymnasium/vector/utils/space_utils.py | 560 | def _create_empty_array_sequence( | CODE |
| LOW | gymnasium/vector/utils/space_utils.py | 572 | def _create_empty_array_oneof( | CODE |
| LOW | gymnasium/vector/utils/space_utils.py | 579 | def _create_empty_array_custom( | CODE |
| LOW | tests/test_core.py | 149 | def test_reward_observation_action_wrapper(): | CODE |
| LOW | tests/test_core.py | 170 | def test_get_set_wrapper_attr(): | CODE |
| 332 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | gymnasium/wrappers/jax_to_torch.py | 0 | wrapper class to change inputs and outputs of environment to pytorch tensors. args: env: the numpy-based vector environm | STRING |
| HIGH | gymnasium/wrappers/numpy_to_torch.py | 0 | wrapper class to change inputs and outputs of environment to pytorch tensors. args: env: the numpy-based vector environm | STRING |
| HIGH | gymnasium/wrappers/vector/jax_to_torch.py | 0 | wrapper class to change inputs and outputs of environment to pytorch tensors. args: env: the numpy-based vector environm | STRING |
| HIGH | gymnasium/wrappers/vector/numpy_to_torch.py | 0 | wrapper class to change inputs and outputs of environment to pytorch tensors. args: env: the numpy-based vector environm | STRING |
| HIGH | gymnasium/wrappers/array_conversion.py | 0 | returns the object pickle state with args and kwargs. | STRING |
| HIGH | gymnasium/wrappers/vector/array_conversion.py | 0 | returns the object pickle state with args and kwargs. | STRING |
| HIGH | gymnasium/utils/ezpickle.py | 0 | returns the object pickle state with args and kwargs. | STRING |
| HIGH | gymnasium/spaces/tuple.py | 0 | checks whether this space can be flattened to a :class:`spaces.box`. | STRING |
| HIGH | gymnasium/spaces/box.py | 0 | checks whether this space can be flattened to a :class:`spaces.box`. | STRING |
| HIGH | gymnasium/spaces/multi_discrete.py | 0 | checks whether this space can be flattened to a :class:`spaces.box`. | STRING |
| HIGH | gymnasium/spaces/oneof.py | 0 | checks whether this space can be flattened to a :class:`spaces.box`. | STRING |
| HIGH | gymnasium/spaces/sequence.py | 0 | checks whether this space can be flattened to a :class:`spaces.box`. | STRING |
| HIGH | gymnasium/spaces/graph.py | 0 | checks whether this space can be flattened to a :class:`spaces.box`. | STRING |
| HIGH | gymnasium/spaces/discrete.py | 0 | checks whether this space can be flattened to a :class:`spaces.box`. | STRING |
| HIGH | gymnasium/spaces/dict.py | 0 | checks whether this space can be flattened to a :class:`spaces.box`. | STRING |
| HIGH | gymnasium/spaces/multi_binary.py | 0 | checks whether this space can be flattened to a :class:`spaces.box`. | STRING |
| HIGH | gymnasium/spaces/tuple.py | 0 | return boolean specifying if x is a valid member of this space. | STRING |
| HIGH | gymnasium/spaces/box.py | 0 | return boolean specifying if x is a valid member of this space. | STRING |
| HIGH | gymnasium/spaces/multi_discrete.py | 0 | return boolean specifying if x is a valid member of this space. | STRING |
| HIGH | gymnasium/spaces/oneof.py | 0 | return boolean specifying if x is a valid member of this space. | STRING |
| HIGH | gymnasium/spaces/sequence.py | 0 | return boolean specifying if x is a valid member of this space. | STRING |
| HIGH | gymnasium/spaces/graph.py | 0 | return boolean specifying if x is a valid member of this space. | STRING |
| HIGH | gymnasium/spaces/text.py | 0 | return boolean specifying if x is a valid member of this space. | STRING |
| HIGH | gymnasium/spaces/dict.py | 0 | return boolean specifying if x is a valid member of this space. | STRING |
| HIGH | gymnasium/spaces/space.py | 0 | return boolean specifying if x is a valid member of this space. | STRING |
| HIGH | gymnasium/spaces/multi_binary.py | 0 | return boolean specifying if x is a valid member of this space. | STRING |
| HIGH | gymnasium/spaces/tuple.py | 0 | convert a batch of samples from this space to a jsonable data type. | STRING |
| HIGH | gymnasium/spaces/box.py | 0 | convert a batch of samples from this space to a jsonable data type. | STRING |
| HIGH | gymnasium/spaces/multi_discrete.py | 0 | convert a batch of samples from this space to a jsonable data type. | STRING |
| HIGH | gymnasium/spaces/oneof.py | 0 | convert a batch of samples from this space to a jsonable data type. | STRING |
| HIGH | gymnasium/spaces/sequence.py | 0 | convert a batch of samples from this space to a jsonable data type. | STRING |
| HIGH | gymnasium/spaces/graph.py | 0 | convert a batch of samples from this space to a jsonable data type. | STRING |
| HIGH | gymnasium/spaces/dict.py | 0 | convert a batch of samples from this space to a jsonable data type. | STRING |
| HIGH | gymnasium/spaces/space.py | 0 | convert a batch of samples from this space to a jsonable data type. | STRING |
| HIGH | gymnasium/spaces/multi_binary.py | 0 | convert a batch of samples from this space to a jsonable data type. | STRING |
| HIGH | gymnasium/spaces/tuple.py | 0 | convert a jsonable data type to a batch of samples from this space. | STRING |
| HIGH | gymnasium/spaces/box.py | 0 | convert a jsonable data type to a batch of samples from this space. | STRING |
| HIGH | gymnasium/spaces/multi_discrete.py | 0 | convert a jsonable data type to a batch of samples from this space. | STRING |
| HIGH | gymnasium/spaces/oneof.py | 0 | convert a jsonable data type to a batch of samples from this space. | STRING |
| HIGH | gymnasium/spaces/sequence.py | 0 | convert a jsonable data type to a batch of samples from this space. | STRING |
| HIGH | gymnasium/spaces/graph.py | 0 | convert a jsonable data type to a batch of samples from this space. | STRING |
| HIGH | gymnasium/spaces/dict.py | 0 | convert a jsonable data type to a batch of samples from this space. | STRING |
| HIGH | gymnasium/spaces/space.py | 0 | convert a jsonable data type to a batch of samples from this space. | STRING |
| HIGH | gymnasium/spaces/multi_binary.py | 0 | convert a jsonable data type to a batch of samples from this space. | STRING |
| HIGH | gymnasium/spaces/tuple.py | 0 | check whether ``other`` is equivalent to this instance. | STRING |
| HIGH | gymnasium/spaces/multi_discrete.py | 0 | check whether ``other`` is equivalent to this instance. | STRING |
| HIGH | gymnasium/spaces/oneof.py | 0 | check whether ``other`` is equivalent to this instance. | STRING |
| HIGH | gymnasium/spaces/sequence.py | 0 | check whether ``other`` is equivalent to this instance. | STRING |
| HIGH | gymnasium/spaces/discrete.py | 0 | check whether ``other`` is equivalent to this instance. | STRING |
| HIGH | gymnasium/spaces/text.py | 0 | check whether ``other`` is equivalent to this instance. | STRING |
| HIGH | gymnasium/spaces/graph.py | 0 | check whether `other` is equivalent to this instance. | STRING |
| HIGH | gymnasium/spaces/dict.py | 0 | check whether `other` is equivalent to this instance. | STRING |
| HIGH | gymnasium/spaces/multi_binary.py | 0 | check whether `other` is equivalent to this instance. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | gymnasium/__init__.py | 5 | CODE | |
| LOW | gymnasium/__init__.py | 5 | CODE | |
| LOW | gymnasium/__init__.py | 5 | CODE | |
| LOW | gymnasium/__init__.py | 5 | CODE | |
| LOW | gymnasium/__init__.py | 5 | CODE | |
| LOW | gymnasium/__init__.py | 12 | CODE | |
| LOW | gymnasium/__init__.py | 13 | CODE | |
| LOW | gymnasium/__init__.py | 13 | CODE | |
| LOW | gymnasium/__init__.py | 13 | CODE | |
| LOW | gymnasium/__init__.py | 13 | CODE | |
| LOW | gymnasium/__init__.py | 13 | CODE | |
| LOW | gymnasium/__init__.py | 13 | CODE | |
| LOW | gymnasium/__init__.py | 13 | CODE | |
| LOW | gymnasium/__init__.py | 13 | CODE | |
| LOW | gymnasium/__init__.py | 23 | CODE | |
| LOW | gymnasium/__init__.py | 23 | CODE | |
| LOW | gymnasium/__init__.py | 23 | CODE | |
| LOW | gymnasium/__init__.py | 23 | CODE | |
| LOW | gymnasium/__init__.py | 23 | CODE | |
| LOW | gymnasium/__init__.py | 23 | CODE | |
| LOW | gymnasium/__init__.py | 23 | CODE | |
| LOW | gymnasium/__init__.py | 31 | CODE | |
| LOW | gymnasium/core.py | 3 | CODE | |
| LOW | gymnasium/wrappers/transform_action.py | 9 | CODE | |
| LOW | gymnasium/wrappers/rendering.py | 10 | CODE | |
| LOW | gymnasium/wrappers/rendering.py | 318 | CODE | |
| LOW | gymnasium/wrappers/jax_to_torch.py | 11 | CODE | |
| LOW | gymnasium/wrappers/stateful_reward.py | 6 | CODE | |
| LOW | gymnasium/wrappers/transform_observation.py | 15 | CODE | |
| LOW | gymnasium/wrappers/__init__.py | 52 | CODE | |
| LOW | gymnasium/wrappers/__init__.py | 53 | CODE | |
| LOW | gymnasium/wrappers/__init__.py | 54 | CODE | |
| LOW | gymnasium/wrappers/__init__.py | 54 | CODE | |
| LOW | gymnasium/wrappers/__init__.py | 54 | CODE | |
| LOW | gymnasium/wrappers/__init__.py | 54 | CODE | |
| LOW | gymnasium/wrappers/__init__.py | 54 | CODE | |
| LOW | gymnasium/wrappers/__init__.py | 61 | CODE | |
| LOW | gymnasium/wrappers/__init__.py | 61 | CODE | |
| LOW | gymnasium/wrappers/__init__.py | 61 | CODE | |
| LOW | gymnasium/wrappers/__init__.py | 61 | CODE | |
| LOW | gymnasium/wrappers/__init__.py | 61 | CODE | |
| LOW | gymnasium/wrappers/__init__.py | 68 | CODE | |
| LOW | gymnasium/wrappers/__init__.py | 68 | CODE | |
| LOW | gymnasium/wrappers/__init__.py | 69 | CODE | |
| LOW | gymnasium/wrappers/__init__.py | 69 | CODE | |
| LOW | gymnasium/wrappers/__init__.py | 69 | CODE | |
| LOW | gymnasium/wrappers/__init__.py | 69 | CODE | |
| LOW | gymnasium/wrappers/__init__.py | 69 | CODE | |
| LOW | gymnasium/wrappers/__init__.py | 76 | CODE | |
| LOW | gymnasium/wrappers/__init__.py | 77 | CODE | |
| LOW | gymnasium/wrappers/__init__.py | 77 | CODE | |
| LOW | gymnasium/wrappers/__init__.py | 77 | CODE | |
| LOW | gymnasium/wrappers/__init__.py | 77 | CODE | |
| LOW | gymnasium/wrappers/__init__.py | 83 | CODE | |
| LOW | gymnasium/wrappers/__init__.py | 83 | CODE | |
| LOW | gymnasium/wrappers/__init__.py | 83 | CODE | |
| LOW | gymnasium/wrappers/__init__.py | 83 | CODE | |
| LOW | gymnasium/wrappers/__init__.py | 83 | CODE | |
| LOW | gymnasium/wrappers/__init__.py | 83 | CODE | |
| LOW | gymnasium/wrappers/__init__.py | 83 | CODE | |
| 168 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | gymnasium/envs/__init__.py | 16 | # ---------------------------------------- | COMMENT |
| MEDIUM | gymnasium/envs/__init__.py | 63 | # ---------------------------------------- | COMMENT |
| MEDIUM | gymnasium/envs/__init__.py | 92 | # ---------------------------------------- | COMMENT |
| MEDIUM | gymnasium/envs/__init__.py | 132 | # ---------------------------------------- | COMMENT |
| MEDIUM | gymnasium/envs/__init__.py | 176 | # ---------------------------------------- | COMMENT |
| MEDIUM | gymnasium/envs/__init__.py | 192 | # ---------------------------------------- | COMMENT |
| MEDIUM | gymnasium/envs/mujoco/mujoco_env.py | 212 | # ---------------------------- | COMMENT |
| MEDIUM | gymnasium/envs/mujoco/mujoco_env.py | 229 | # ----------------------------- | COMMENT |
| MEDIUM | docs/tutorials/gymnasium_basics/load_quadruped_model.py | 40 | # --------------------------------- | COMMENT |
| MEDIUM | docs/tutorials/gymnasium_basics/load_quadruped_model.py | 55 | # ----------------------- | COMMENT |
| MEDIUM⚡ | docs/tutorials/gymnasium_basics/load_quadruped_model.py | 83 | # -------------------------------------------- | COMMENT |
| MEDIUM⚡ | docs/tutorials/gymnasium_basics/load_quadruped_model.py | 90 | # --------------------------------------------------------- | COMMENT |
| MEDIUM | docs/tutorials/gymnasium_basics/load_quadruped_model.py | 129 | # ---------------------------------------------------------- | COMMENT |
| MEDIUM | docs/tutorials/gymnasium_basics/load_quadruped_model.py | 167 | # ----------------------------------------------------- | COMMENT |
| MEDIUM | docs/tutorials/gymnasium_basics/load_quadruped_model.py | 202 | # ---------------------------------------------------------- | COMMENT |
| MEDIUM | docs/tutorials/gymnasium_basics/load_quadruped_model.py | 230 | # ------------------------- | COMMENT |
| MEDIUM | docs/tutorials/gymnasium_basics/load_quadruped_model.py | 280 | # ------------------------- | COMMENT |
| MEDIUM | …rials/gymnasium_basics/implementing_custom_wrappers.py | 22 | # ----------------------------------------------------- | COMMENT |
| MEDIUM | …rials/gymnasium_basics/implementing_custom_wrappers.py | 53 | # ------------------------------------------------ | COMMENT |
| MEDIUM | …rials/gymnasium_basics/implementing_custom_wrappers.py | 83 | # ------------------------------------------------ | COMMENT |
| MEDIUM | …rials/gymnasium_basics/implementing_custom_wrappers.py | 107 | # ------------------------------------------ | COMMENT |
| MEDIUM | docs/tutorials/gymnasium_basics/environment_creation.py | 406 | # ---------------- | COMMENT |
| MEDIUM | docs/tutorials/gymnasium_basics/environment_creation.py | 481 | # ------------------ | COMMENT |
| MEDIUM | docs/tutorials/gymnasium_basics/environment_creation.py | 503 | # ------------------------------ | COMMENT |
| MEDIUM | docs/tutorials/gymnasium_basics/environment_creation.py | 535 | # -------------- | COMMENT |
| MEDIUM | docs/tutorials/gymnasium_basics/handling_time_limits.py | 34 | # --------------------------- | COMMENT |
| MEDIUM | docs/tutorials/gymnasium_basics/handling_time_limits.py | 72 | # ---------- | COMMENT |
| MEDIUM | docs/tutorials/training_agents/action_masking_taxi.py | 142 | # ====================== | COMMENT |
| MEDIUM | docs/tutorials/training_agents/action_masking_taxi.py | 203 | # =================== | COMMENT |
| MEDIUM | docs/tutorials/training_agents/action_masking_taxi.py | 274 | # ================ | COMMENT |
| MEDIUM | docs/tutorials/training_agents/frozenlake_q_learning.py | 38 | # -------------------- | COMMENT |
| MEDIUM | docs/tutorials/training_agents/frozenlake_q_learning.py | 75 | # -------------------------- | COMMENT |
| MEDIUM | docs/tutorials/training_agents/frozenlake_q_learning.py | 531 | # ---------- | COMMENT |
| MEDIUM⚡ | docs/tutorials/training_agents/vector_a2c.py | 19 | # ------------------------------ | COMMENT |
| MEDIUM⚡ | docs/tutorials/training_agents/vector_a2c.py | 25 | # ------------ | COMMENT |
| MEDIUM | docs/tutorials/training_agents/vector_a2c.py | 52 | # ------------------------------ | COMMENT |
| MEDIUM | docs/tutorials/training_agents/vector_a2c.py | 73 | # ---------------------------- | COMMENT |
| MEDIUM | docs/tutorials/training_agents/vector_a2c.py | 88 | # ------------------------------ | COMMENT |
| MEDIUM | docs/tutorials/training_agents/vector_a2c.py | 258 | # ----------------------------- | COMMENT |
| MEDIUM | docs/tutorials/training_agents/vector_a2c.py | 276 | # -------------------- | COMMENT |
| MEDIUM | docs/tutorials/training_agents/vector_a2c.py | 311 | # ------------------------------ | COMMENT |
| MEDIUM | docs/tutorials/training_agents/vector_a2c.py | 340 | # ------------------------------ | COMMENT |
| MEDIUM | docs/tutorials/training_agents/vector_a2c.py | 415 | # ---------------------- | COMMENT |
| MEDIUM | docs/tutorials/training_agents/vector_a2c.py | 569 | # ---------------------------------------------------------------------------- | COMMENT |
| MEDIUM | docs/tutorials/training_agents/vector_a2c.py | 574 | # ------------------------------ | COMMENT |
| MEDIUM | docs/tutorials/training_agents/vector_a2c.py | 590 | # ------------------------------ | COMMENT |
| MEDIUM | docs/tutorials/training_agents/vector_a2c.py | 606 | # ------------------------------ | COMMENT |
| MEDIUM | docs/tutorials/training_agents/vector_a2c.py | 627 | # ----------------------- | COMMENT |
| MEDIUM | docs/tutorials/training_agents/vector_a2c.py | 657 | # ------------------ | COMMENT |
| MEDIUM | docs/tutorials/training_agents/vector_a2c.py | 708 | # ------------------------------------ | COMMENT |
| MEDIUM | docs/tutorials/training_agents/vector_a2c.py | 719 | # ---------- | COMMENT |
| MEDIUM | docs/tutorials/training_agents/blackjack_q_learning.py | 42 | # ------------------------------ | COMMENT |
| MEDIUM | docs/tutorials/training_agents/blackjack_q_learning.py | 81 | # ------------------------------ | COMMENT |
| MEDIUM | docs/tutorials/training_agents/blackjack_q_learning.py | 108 | # ------------------------------ | COMMENT |
| MEDIUM | docs/tutorials/training_agents/blackjack_q_learning.py | 165 | # ------------------------------ | COMMENT |
| MEDIUM | docs/tutorials/training_agents/blackjack_q_learning.py | 300 | # ------------------------------ | COMMENT |
| MEDIUM | docs/tutorials/training_agents/blackjack_q_learning.py | 338 | # ------------------------------ | COMMENT |
| MEDIUM | docs/tutorials/training_agents/blackjack_q_learning.py | 442 | # ------------------------------ | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | gymnasium/wrappers/__init__.py | 166 | Load a wrapper by name. This optimizes the loading of gymnasium wrappers by only loading the wrapper if it is used. | STRING |
| HIGH | gymnasium/wrappers/vector/__init__.py | 94 | Load a wrapper by name. This optimizes the loading of gymnasium wrappers by only loading the wrapper if it is u | STRING |
| HIGH | gymnasium/spaces/box.py | 380 | Checks whether the box is bounded in some sense. Args: manner (str): One of ``"both"``, ``"below"`` | STRING |
| HIGH | gymnasium/spaces/utils.py | 102 | Return the number of dimensions a flattened equivalent of this space would have. Args: space: The space to | STRING |
| HIGH | gymnasium/spaces/utils.py | 183 | Flatten a data point from a space. This is useful when e.g. points from spaces must be passed to a neural netwo | STRING |
| HIGH | gymnasium/spaces/utils.py | 357 | Unflatten a data point from a space. This reverses the transformation applied by :func:`flatten`. You must ensure | STRING |
| HIGH | gymnasium/spaces/utils.py | 533 | Flatten a space into a space that is as flat as possible. This function will attempt to flatten ``space`` into a si | STRING |
| HIGH | gymnasium/utils/seeding.py | 11 | Returns a NumPy random number generator (RNG) along with seed value from the inputted seed. If ``seed`` is ``None`` | STRING |
| HIGH | gymnasium/envs/registration.py | 259 | Parse environment ID string format - ``[namespace/](env-name)[-v(version)]`` where the namespace and version are optiona | STRING |
| HIGH | gymnasium/envs/registration.py | 646 | Creates an environment previously registered with :meth:`gymnasium.register` or a :class:`EnvSpec`. To find all ava | STRING |
| HIGH | gymnasium/envs/registration.py | 843 | Create a vector environment according to the given ID. To find all available environments use :func:`gymnasium.ppri | STRING |
| HIGH | gymnasium/envs/registration.py | 994 | Retrieve the :class:`EnvSpec` for the environment id from the :attr:`registry`. Args: env_id: The environme | STRING |
| HIGH | gymnasium/envs/box2d/lunar_lander.py | 792 | The heuristic for 1. Testing 2. Demonstration rollout. Args: env: The environment s (l | STRING |
| HIGH | gymnasium/vector/async_vector_env.py | 418 | Waits for the calls triggered by :meth:`reset_async` to finish and returns the results. Args: timeo | STRING |
| HIGH | gymnasium/vector/async_vector_env.py | 516 | Wait for the calls to :obj:`step` in each sub-environment to finish. Args: timeout: Number of secon | STRING |
| HIGH | gymnasium/vector/async_vector_env.py | 615 | Calls all parent pipes and waits for the results. Args: timeout: Number of seconds before the call | STRING |
| HIGH | gymnasium/vector/utils/shared_memory.py | 51 | Create a shared memory object, to be shared across processes. This eventually contains the observations from the ve | STRING |
| HIGH | gymnasium/vector/utils/shared_memory.py | 148 | Read the batch of observations from shared memory as a numpy array. ..notes:: The numpy array objects retur | STRING |
| HIGH | gymnasium/vector/utils/space_utils.py | 52 | Batch spaces of size `n` optimized for neural networks. Args: space: Space (e.g. the observation space for | STRING |
| HIGH | gymnasium/vector/utils/space_utils.py | 399 | Concatenate multiple samples from space into a single object. Args: space: Space of each item (e.g. `single | STRING |
| HIGH | gymnasium/vector/utils/space_utils.py | 472 | Create an empty (possibly nested and normally numpy-based) array, used in conjunction with ``concatenate(..., out=array) | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | gymnasium/wrappers/transform_observation.py | 585 | CODE | |
| LOW | gymnasium/wrappers/atari_preprocessing.py | 177 | CODE | |
| LOW | gymnasium/wrappers/stateful_action.py | 47 | CODE | |
| LOW | gymnasium/wrappers/vector/dict_info_to_list.py | 99 | CODE | |
| LOW | gymnasium/wrappers/vector/rendering.py | 102 | CODE | |
| LOW | gymnasium/spaces/tuple.py | 56 | CODE | |
| LOW | gymnasium/spaces/box.py | 124 | CODE | |
| LOW | gymnasium/spaces/box.py | 235 | CODE | |
| LOW | gymnasium/spaces/box.py | 302 | CODE | |
| LOW | gymnasium/spaces/oneof.py | 67 | CODE | |
| LOW | gymnasium/spaces/sequence.py | 68 | CODE | |
| LOW | gymnasium/spaces/graph.py | 85 | CODE | |
| LOW | gymnasium/spaces/graph.py | 260 | CODE | |
| LOW | gymnasium/spaces/text.py | 103 | CODE | |
| LOW | gymnasium/spaces/dict.py | 70 | CODE | |
| LOW | gymnasium/spaces/dict.py | 141 | CODE | |
| LOW | gymnasium/utils/env_match.py | 9 | CODE | |
| LOW | gymnasium/utils/env_checker.py | 36 | CODE | |
| LOW | gymnasium/utils/env_checker.py | 79 | CODE | |
| LOW | gymnasium/utils/env_checker.py | 368 | CODE | |
| LOW | gymnasium/utils/step_api_compatibility.py | 27 | CODE | |
| LOW | gymnasium/utils/step_api_compatibility.py | 82 | CODE | |
| LOW | gymnasium/utils/passive_env_checker.py | 61 | CODE | |
| LOW | gymnasium/utils/passive_env_checker.py | 131 | CODE | |
| LOW | gymnasium/utils/passive_env_checker.py | 179 | CODE | |
| LOW | gymnasium/utils/passive_env_checker.py | 353 | CODE | |
| LOW | gymnasium/utils/passive_env_checker.py | 405 | CODE | |
| LOW | gymnasium/utils/play.py | 185 | CODE | |
| LOW | gymnasium/utils/play.py | 127 | CODE | |
| LOW | gymnasium/envs/registration.py | 835 | CODE | |
| LOW | gymnasium/envs/registration.py | 1017 | CODE | |
| LOW | gymnasium/envs/toy_text/cliffwalking.py | 235 | CODE | |
| LOW | gymnasium/envs/toy_text/cliffwalking.py | 317 | CODE | |
| LOW | gymnasium/envs/toy_text/taxi.py | 213 | CODE | |
| LOW | gymnasium/envs/toy_text/taxi.py | 319 | CODE | |
| LOW | gymnasium/envs/toy_text/frozen_lake.py | 36 | CODE | |
| LOW | gymnasium/envs/toy_text/frozen_lake.py | 231 | CODE | |
| LOW | gymnasium/envs/toy_text/frozen_lake.py | 365 | CODE | |
| LOW | gymnasium/envs/toy_text/frozen_lake.py | 262 | CODE | |
| LOW | gymnasium/envs/tabular/cliffwalking.py | 274 | CODE | |
| LOW | gymnasium/envs/mujoco/mujoco_rendering.py | 119 | CODE | |
| LOW | gymnasium/envs/mujoco/mujoco_rendering.py | 238 | CODE | |
| LOW | gymnasium/envs/mujoco/mujoco_rendering.py | 505 | CODE | |
| LOW | gymnasium/envs/box2d/car_racing.py | 307 | CODE | |
| LOW | gymnasium/envs/box2d/bipedal_walker.py | 283 | CODE | |
| LOW | gymnasium/envs/box2d/bipedal_walker.py | 615 | CODE | |
| LOW | gymnasium/envs/box2d/lunar_lander.py | 791 | CODE | |
| LOW | gymnasium/envs/box2d/car_dynamics.py | 182 | CODE | |
| LOW | gymnasium/vector/sync_vector_env.py | 275 | CODE | |
| LOW | gymnasium/vector/vector_env.py | 284 | CODE | |
| LOW | gymnasium/vector/async_vector_env.py | 823 | CODE | |
| LOW | tests/wrappers/test_array_conversion.py | 44 | CODE | |
| LOW | tests/wrappers/test_jax_to_torch.py | 22 | CODE | |
| LOW | tests/spaces/test_spaces.py | 119 | CODE | |
| LOW | tests/spaces/test_spaces.py | 358 | CODE | |
| LOW | tests/utils/test_passive_env_checker.py | 287 | CODE | |
| LOW | tests/utils/test_play.py | 147 | CODE | |
| LOW | tests/utils/test_step_api_compatibility.py | 115 | CODE | |
| LOW | tests/envs/test_env_implementation.py | 147 | CODE | |
| LOW | tests/envs/test_rendering.py | 40 | CODE | |
| 4 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | gymnasium/wrappers/array_conversion.py | 1 | # This wrapper will convert array inputs from an Array API compatible framework A for the actions | COMMENT |
| LOW | gymnasium/envs/box2d/bipedal_walker.py | 241 | np.array([1, 1, 1, 1]).astype(np.float32), | COMMENT |
| LOW | tests/spaces/utils.py | 141 | # Graph( | COMMENT |
| LOW | tests/envs/registration/test_make.py | 21 | TimeLimit, | COMMENT |
| LOW | docs/tutorials/gymnasium_basics/load_quadruped_model.py | 21 | # The reader is expected to be familiar with the `Gymnasium` API & library, the basics of robotics, | COMMENT |
| LOW | docs/tutorials/gymnasium_basics/load_quadruped_model.py | 41 | # In this tutorial we will load the Unitree Go1 robot from the excellent MuJoCo Menagerie robot model collection. | COMMENT |
| LOW | docs/tutorials/gymnasium_basics/load_quadruped_model.py | 81 | # %% | COMMENT |
| LOW | docs/tutorials/gymnasium_basics/load_quadruped_model.py | 121 | exclude_current_positions_from_observation=False, | COMMENT |
| LOW | docs/tutorials/gymnasium_basics/load_quadruped_model.py | 161 | COMMENT | |
| LOW | docs/tutorials/gymnasium_basics/load_quadruped_model.py | 221 | max_episode_steps=1000, | COMMENT |
| LOW | docs/tutorials/gymnasium_basics/load_quadruped_model.py | 281 | # You can follow this guide to create most quadruped environments. | COMMENT |
| LOW | …rials/gymnasium_basics/implementing_custom_wrappers.py | 21 | # Inheriting from :class:`gymnasium.ObservationWrapper` | COMMENT |
| LOW | …rials/gymnasium_basics/implementing_custom_wrappers.py | 101 | def reward(self, r: SupportsFloat) -> SupportsFloat: | COMMENT |
| LOW | docs/tutorials/gymnasium_basics/environment_creation.py | 101 | COMMENT | |
| LOW | docs/tutorials/gymnasium_basics/environment_creation.py | 121 | # The ``__init__`` method of our environment will accept the integer | COMMENT |
| LOW | docs/tutorials/gymnasium_basics/environment_creation.py | 221 | } | COMMENT |
| LOW | docs/tutorials/gymnasium_basics/environment_creation.py | 241 | # worry much about seeding, *but you need to remember to call | COMMENT |
| LOW | docs/tutorials/gymnasium_basics/environment_creation.py | 401 | # or release other resources. You shouldn’t interact with the environment | COMMENT |
| LOW | docs/tutorials/gymnasium_basics/environment_creation.py | 421 | # %% | COMMENT |
| LOW | docs/tutorials/gymnasium_basics/environment_creation.py | 441 | # | Name | Type | Default | Description | COMMENT |
| LOW | docs/tutorials/gymnasium_basics/environment_creation.py | 461 | # ``gymnasium_env/envs/__init__.py`` should have: | COMMENT |
| LOW | docs/tutorials/gymnasium_basics/environment_creation.py | 481 | # ------------------ | COMMENT |
| LOW | docs/tutorials/gymnasium_basics/environment_creation.py | 501 | # | COMMENT |
| LOW | docs/tutorials/gymnasium_basics/environment_creation.py | 521 | # You can also pass keyword arguments of your environment’s constructor to | COMMENT |
| LOW | docs/tutorials/gymnasium_basics/environment_creation.py | 541 | # Check out the `wrapper documentation </api/wrappers/>`__ for details on | COMMENT |
| LOW | docs/tutorials/gymnasium_basics/environment_creation.py | 561 | # GridWorld, you might only want to look at the relative position of the | COMMENT |
| LOW | docs/tutorials/gymnasium_basics/handling_time_limits.py | 41 | # More formally, a common example of bootstrapping in RL is updating the estimate of the Q-value function, | COMMENT |
| LOW | docs/tutorials/gymnasium_basics/handling_time_limits.py | 61 | # A simple example of value functions is shown below. This is an illustrative example and not part of any specific algor | COMMENT |
| LOW | docs/tutorials/gymnasium_basics/handling_time_limits.py | 81 | # # This was needed in previous versions. | COMMENT |
| LOW | docs/tutorials/training_agents/action_masking_taxi.py | 141 | # Running the Experiment | COMMENT |
| LOW | docs/tutorials/training_agents/action_masking_taxi.py | 261 | savefig_folder.mkdir(parents=True, exist_ok=True) | COMMENT |
| LOW | docs/tutorials/training_agents/action_masking_taxi.py | 281 | # invalid actions. | COMMENT |
| LOW | docs/tutorials/training_agents/frozenlake_q_learning.py | 1 | """ | COMMENT |
| LOW | docs/tutorials/training_agents/frozenlake_q_learning.py | 401 | # | COMMENT |
| LOW | docs/tutorials/training_agents/frozenlake_q_learning.py | 421 | # | COMMENT |
| LOW | docs/tutorials/training_agents/frozenlake_q_learning.py | 441 | COMMENT | |
| LOW | docs/tutorials/training_agents/frozenlake_q_learning.py | 501 | COMMENT | |
| LOW | docs/tutorials/training_agents/frozenlake_q_learning.py | 521 | # different exploration algorithm could overcome this. The other parameter | COMMENT |
| LOW | docs/tutorials/training_agents/frozenlake_q_learning.py | 541 | # Wikipedia <https://en.wikipedia.org/wiki/Q-learning>`__ | COMMENT |
| LOW | docs/tutorials/training_agents/mujoco_reinforce.py | 121 | 1 + torch.exp(self.policy_stddev_net(shared_features)) | COMMENT |
| LOW | docs/tutorials/training_agents/mujoco_reinforce.py | 221 | # Following is the overview of the training procedure | COMMENT |
| LOW | docs/tutorials/training_agents/mujoco_reinforce.py | 301 | sns.lineplot(x="episodes", y="reward", data=df1).set( | COMMENT |
| LOW | docs/tutorials/training_agents/vector_a2c.py | 1 | """ | COMMENT |
| LOW | docs/tutorials/training_agents/vector_a2c.py | 21 | COMMENT | |
| LOW | docs/tutorials/training_agents/vector_a2c.py | 41 | # the learning rates and the number of environments that run in parallel to collect experiences. The actor and critic ne | COMMENT |
| LOW | docs/tutorials/training_agents/vector_a2c.py | 261 | # we can play with `n_envs` in parallel and thus get up to a linear speedup (meaning that in theory, we collect samples | COMMENT |
| LOW | docs/tutorials/training_agents/vector_a2c.py | 341 | # | COMMENT |
| LOW | docs/tutorials/training_agents/vector_a2c.py | 561 | # %% | COMMENT |
| LOW | docs/tutorials/training_agents/vector_a2c.py | 581 | # | COMMENT |
| LOW | docs/tutorials/training_agents/vector_a2c.py | 601 | # :alt: karp_flatt_metric | COMMENT |
| LOW | docs/tutorials/training_agents/vector_a2c.py | 701 | done = terminated or truncated | COMMENT |
| LOW | docs/tutorials/training_agents/vector_a2c.py | 721 | # [1] V. Mnih, A. P. Badia, M. Mirza, A. Graves, T. P. Lillicrap, T. Harley, D. Silver, K. Kavukcuoglu. "Asynchronous Me | COMMENT |
| LOW | docs/tutorials/training_agents/blackjack_q_learning.py | 1 | """ | COMMENT |
| LOW | docs/tutorials/training_agents/blackjack_q_learning.py | 21 | # **Blackjack** is one of the most popular casino card games that is also | COMMENT |
| LOW | docs/tutorials/training_agents/blackjack_q_learning.py | 61 | # Note: We are going to follow the rules from Sutton & Barto. | COMMENT |
| LOW | docs/tutorials/training_agents/blackjack_q_learning.py | 81 | # ------------------------------ | COMMENT |
| LOW | docs/tutorials/training_agents/blackjack_q_learning.py | 101 | # - Boolean whether the player holds a usable ace (An ace is usable if it | COMMENT |
| LOW | docs/tutorials/training_agents/blackjack_q_learning.py | 121 | # not the environment has terminated. | COMMENT |
| LOW | docs/tutorials/training_agents/blackjack_q_learning.py | 141 | action = env.action_space.sample() | COMMENT |
| LOW | docs/tutorials/training_agents/blackjack_q_learning.py | 161 | COMMENT | |
| 5 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | gymnasium/__init__.py | 34 | __all__ = [ | CODE |
| LOW | gymnasium/wrappers/transform_action.py | 20 | __all__ = ["TransformAction", "ClipAction", "RescaleAction"] | CODE |
| LOW | gymnasium/wrappers/rendering.py | 25 | __all__ = [ | CODE |
| LOW | gymnasium/wrappers/jax_to_torch.py | 41 | __all__ = ["JaxToTorch", "jax_to_torch", "torch_to_jax", "Device"] | CODE |
| LOW | gymnasium/wrappers/stateful_reward.py | 17 | __all__ = ["NormalizeReward"] | CODE |
| LOW | gymnasium/wrappers/transform_observation.py | 27 | __all__ = [ | CODE |
| LOW | gymnasium/wrappers/__init__.py | 97 | __all__ = [ | CODE |
| LOW | gymnasium/wrappers/transform_reward.py | 18 | __all__ = ["TransformReward", "ClipReward"] | CODE |
| LOW | gymnasium/wrappers/jax_to_numpy.py | 25 | __all__ = ["JaxToNumpy", "jax_to_numpy", "numpy_to_jax"] | CODE |
| LOW | gymnasium/wrappers/stateful_observation.py | 26 | __all__ = [ | CODE |
| LOW | gymnasium/wrappers/array_conversion.py | 48 | __all__ = ["ArrayConversion", "array_conversion"] | CODE |
| LOW | gymnasium/wrappers/numpy_to_torch.py | 27 | __all__ = ["NumpyToTorch", "torch_to_numpy", "numpy_to_torch", "Device"] | CODE |
| LOW | gymnasium/wrappers/common.py | 34 | __all__ = [ | CODE |
| LOW | gymnasium/wrappers/utils.py | 28 | __all__ = ["RunningMeanStd", "update_mean_var_count_from_moments", "create_zero_array"] | CODE |
| LOW | gymnasium/wrappers/atari_preprocessing.py | 13 | __all__ = ["AtariPreprocessing"] | CODE |
| LOW | gymnasium/wrappers/stateful_action.py | 13 | __all__ = ["StickyAction", "RepeatAction"] | CODE |
| LOW | gymnasium/wrappers/vector/dict_info_to_list.py | 12 | __all__ = ["DictInfoToList"] | CODE |
| LOW | gymnasium/wrappers/vector/jax_to_torch.py | 12 | __all__ = ["JaxToTorch"] | CODE |
| LOW | gymnasium/wrappers/vector/stateful_reward.py | 18 | __all__ = ["NormalizeReward"] | CODE |
| LOW | gymnasium/wrappers/vector/stateful_reward.py | 129 | def update_running_mean(self, setting: bool) -> None: | CODE |
| LOW | gymnasium/wrappers/vector/__init__.py | 34 | __all__ = [ | CODE |
| LOW | gymnasium/wrappers/vector/jax_to_numpy.py | 12 | __all__ = ["JaxToNumpy"] | CODE |
| LOW | gymnasium/wrappers/vector/stateful_observation.py | 26 | __all__ = ["NormalizeObservation"] | CODE |
| LOW | gymnasium/wrappers/vector/stateful_observation.py | 133 | def update_running_mean(self, setting: bool) -> None: | CODE |
| LOW | gymnasium/wrappers/vector/array_conversion.py | 17 | __all__ = ["ArrayConversion"] | CODE |
| LOW | gymnasium/wrappers/vector/numpy_to_torch.py | 12 | __all__ = ["NumpyToTorch"] | CODE |
| LOW | gymnasium/wrappers/vector/common.py | 20 | __all__ = ["RecordEpisodeStatistics"] | CODE |
| LOW | gymnasium/spaces/__init__.py | 27 | __all__ = [ | CODE |
| LOW | gymnasium/utils/passive_env_checker.py | 13 | __all__ = [ | CODE |
| LOW | gymnasium/utils/__init__.py | 13 | __all__ = ["colorize", "EzPickle", "RecordConstructorArgs"] | CODE |
| LOW | gymnasium/envs/registration.py | 29 | __all__ = [ | CODE |
| LOW | gymnasium/envs/__init__.py | 7 | __all__ = [ | CODE |
| LOW | gymnasium/envs/toy_text/__init__.py | 6 | __all__ = [ | CODE |
| LOW | gymnasium/envs/tabular/__init__.py | 6 | __all__ = [ | CODE |
| LOW | gymnasium/envs/mujoco/__init__.py | 4 | __all__ = ["MujocoEnv", "MujocoRenderer"] | CODE |
| LOW | gymnasium/envs/classic_control/__init__.py | 9 | __all__ = [ | CODE |
| LOW | gymnasium/envs/box2d/__init__.py | 5 | __all__ = [ | CODE |
| LOW | gymnasium/envs/phys2d/__init__.py | 6 | __all__ = [ | CODE |
| LOW | gymnasium/vector/sync_vector_env.py | 24 | __all__ = ["SyncVectorEnv"] | CODE |
| LOW | gymnasium/vector/sync_vector_env.py | 394 | def set_attr(self, name: str, values: list[Any] | tuple[Any, ...] | Any) -> None: | CODE |
| LOW | gymnasium/vector/vector_env.py | 30 | __all__ = [ | CODE |
| LOW | gymnasium/vector/__init__.py | 15 | __all__ = [ | CODE |
| LOW | gymnasium/vector/async_vector_env.py | 44 | __all__ = ["AsyncVectorEnv", "AsyncState"] | CODE |
| LOW | gymnasium/vector/async_vector_env.py | 660 | def set_attr(self, name: str, values: list[Any] | tuple[Any] | object) -> None: | CODE |
| LOW | gymnasium/vector/utils/misc.py | 21 | __all__ = ["CloudpickleWrapper", "clear_mpi_env_vars"] | CODE |
| LOW | gymnasium/vector/utils/shared_memory.py | 37 | __all__ = ["create_shared_memory", "read_from_shared_memory", "write_to_shared_memory"] | CODE |
| LOW | gymnasium/vector/utils/__init__.py | 17 | __all__ = [ | CODE |
| LOW | gymnasium/vector/utils/space_utils.py | 39 | __all__ = [ | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | gymnasium/spaces/__init__.py | 1 | """This module implements various spaces. | STRING |
| MEDIUM | gymnasium/envs/tabular/cliffwalking.py | 1 | """This module provides a CliffWalking functional environment and Gymnasium environment wrapper CliffWalkingJaxEnv.""" | STRING |
| MEDIUM | gymnasium/envs/tabular/blackjack.py | 1 | """This module provides a Blackjack functional environment and Gymnasium environment wrapper BlackJackJaxEnv.""" | STRING |
| MEDIUM | gymnasium/envs/tabular/blackjack.py | 77 | """This function is called if the player has decided to take a card.""" | STRING |
| MEDIUM | gymnasium/envs/tabular/blackjack.py | 111 | """This function is called if the player has decided to not take a card. | STRING |
| MEDIUM | gymnasium/vector/async_vector_env.py | 218 | # Create a dummy environment to gather the metadata and observation / action space of the environment | COMMENT |
| MEDIUM | tests/spaces/test_graph.py | 148 | # Define a probability distribution for nodes | COMMENT |
| MEDIUM | tests/spaces/test_graph.py | 175 | # Define a probability distribution for edges | COMMENT |
| MEDIUM | tests/envs/registration/test_env_spec.py | 19 | # Create an environment to test with | COMMENT |
| MEDIUM | tests/vector/utils/test_space_utils.py | 42 | # Create an empty array and check that space is within the batch space | COMMENT |
| MEDIUM | docs/tutorials/gymnasium_basics/environment_creation.py | 480 | # Creating a Package | COMMENT |
| MEDIUM | docs/tutorials/training_agents/frozenlake_q_learning.py | 48 | seed: int # Define a seed so that we get reproducible results | CODE |
| MEDIUM | docs/tutorials/training_agents/frozenlake_q_learning.py | 89 | # Creating the Q-table | COMMENT |
| MEDIUM | docs/tutorials/training_agents/mujoco_reinforce.py | 68 | # The following function estimates a mean and standard deviation of a normal distribution from which an action is sample | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | gymnasium/__init__.py | 69 | except Exception: # nosec | CODE |
| HIGH | gymnasium/envs/mujoco/mujoco_rendering.py | 218 | except: # noqa:E722 | CODE |
| HIGH | tests/wrappers/test_array_conversion.py | 38 | except ImportError: | CODE |
| HIGH | tests/wrappers/vector/test_array_conversion.py | 32 | except ImportError: | CODE |
| HIGH | tests/utils/test_seeding.py | 11 | except error.Error: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | gymnasium/wrappers/__init__.py | 181 | # Check if the requested wrapper is in the _wrapper_to_class dictionary | COMMENT |
| LOW | gymnasium/wrappers/vector/__init__.py | 109 | # Check if the requested wrapper is in the _wrapper_to_class dictionary | COMMENT |
| LOW | gymnasium/envs/registration.py | 328 | # Check if the namespace exists in one of the registry's specs | COMMENT |
| LOW | gymnasium/envs/registration.py | 783 | # Check if pre-wrapped wrappers | COMMENT |
| LOW | gymnasium/envs/toy_text/taxi.py | 278 | # Check if the primary move is possible. When it is not (wall or grid | COMMENT |
| LOW | gymnasium/envs/box2d/lunar_lander.py | 40 | INITIAL_RANDOM = 1000.0 # Set 1500 to make game harder | CODE |
| LOW | tests/spaces/test_sequence.py | 14 | # Check if the sample is in 2d format | COMMENT |
| LOW | tests/spaces/test_sequence.py | 20 | # Check if the sample is a `np.ndarray` as supposed to a tuple | COMMENT |
| LOW⚡ | tests/spaces/test_multidiscrete.py | 164 | # Check if space can be flattened and unflattened without an integer overflow | COMMENT |
| LOW⚡ | tests/spaces/test_multidiscrete.py | 209 | # Check if two spaces are equivalent. | COMMENT |
| LOW | tests/spaces/test_box.py | 365 | # Check if only the expected precision warning is emitted | COMMENT |
| LOW | tests/spaces/test_box.py | 401 | # Check if two spaces are equivalent. | COMMENT |
| LOW | tests/spaces/test_spaces.py | 88 | # Check if the samples are equivalent | COMMENT |
| LOW | tests/envs/registration/test_register.py | 192 | # Check if the namespace context manager works | COMMENT |
| LOW | .github/workflows/run-tutorial.yml | 146 | # Output results to console immediately | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | gymnasium/wrappers/vector/rendering.py | 268 | CODE | |
| LOW | gymnasium/spaces/dict.py | 290 | CODE | |
| LOW | gymnasium/utils/play.py | 185 | CODE | |
| LOW | gymnasium/envs/registration.py | 563 | CODE | |
| LOW | gymnasium/envs/mujoco/hopper_v5.py | 163 | CODE | |
| LOW | gymnasium/envs/mujoco/walker2d_v4.py | 26 | CODE | |
| LOW | gymnasium/envs/mujoco/walker2d_v5.py | 172 | CODE | |
| LOW | gymnasium/envs/mujoco/hopper_v4.py | 26 | CODE | |
| LOW | gymnasium/envs/mujoco/mujoco_env.py | 38 | CODE | |
| LOW | gymnasium/envs/mujoco/ant_v5.py | 228 | CODE | |
| LOW | gymnasium/envs/mujoco/ant_v4.py | 23 | CODE | |
| LOW | gymnasium/envs/mujoco/humanoidstandup_v5.py | 286 | CODE | |
| LOW | gymnasium/envs/mujoco/humanoid_v5.py | 307 | CODE | |
| LOW | gymnasium/vector/async_vector_env.py | 124 | CODE | |
| LOW | tests/testing_env.py | 63 | CODE | |
| LOW | tests/testing_env.py | 177 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | gymnasium/vector/vector_env.py | 329 | # Otherwise, just use the array that already exists | COMMENT |
| LOW | docs/tutorials/gymnasium_basics/environment_creation.py | 545 | # environment implementation to fix this! We can simply add a wrapper on | COMMENT |
| MEDIUM | docs/tutorials/training_agents/action_masking_taxi.py | 145 | # We'll use multiple random seeds to ensure robust statistical comparison. | COMMENT |
| MEDIUM⚡ | docs/tutorials/training_agents/vector_a2c.py | 30 | # Vectorized environments [3] can help to achieve quicker and more robust training by allowing multiple instances | COMMENT |
| MEDIUM | docs/tutorials/training_agents/vector_a2c.py | 278 | # If we want to randomize the environment for training to get more robust agents (that can deal with different parameter | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | gymnasium/__init__.py | 69 | except Exception: # nosec | CODE |
| LOW | gymnasium/core.py | 400 | except Exception as e: | CODE |
| LOW | gymnasium/wrappers/common.py | 164 | except Exception as e: | CODE |
| LOW | gymnasium/wrappers/common.py | 347 | except Exception as e: | CODE |
| LOW | gymnasium/wrappers/common.py | 364 | except Exception as e: | CODE |
| LOW | gymnasium/wrappers/common.py | 458 | except Exception as e: | CODE |
| LOW | gymnasium/utils/env_checker.py | 505 | except Exception as e: | CODE |
| LOW | gymnasium/utils/passive_env_checker.py | 175 | except Exception as e: | CODE |
| LOW | gymnasium/envs/registration.py | 175 | except Exception as e: | CODE |
| LOW | gymnasium/envs/registration.py | 183 | except Exception as e: | CODE |
| LOW | gymnasium/vector/utils/space_utils.py | 371 | except Exception as e: | CODE |
| LOW | tests/envs/test_rendering.py | 101 | except Exception as e: | CODE |
| LOW | docs/introduction/create_custom_env.md | 383 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/tutorials/gymnasium_basics/load_quadruped_model.py | 54 | # Step 1 - Load the model | COMMENT |
| LOW⚡ | docs/tutorials/gymnasium_basics/load_quadruped_model.py | 82 | # Step 2 - Tweaking the Environment Parameters | COMMENT |
| LOW | docs/tutorials/gymnasium_basics/load_quadruped_model.py | 229 | # Step 3 - Train your Agent | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | gymnasium/core.py | 317 | If you inherit from :class:`Wrapper`, don't forget to call ``super().__init__(env)`` | STRING |
| LOW | gymnasium/vector/vector_env.py | 377 | Don't forget to call ``super().__init__(env)`` if the subclass overrides :meth:`__init__`. | STRING |
| MEDIUM | docs/tutorials/gymnasium_basics/load_quadruped_model.py | 172 | # we have to pick values that make sense for our robot, you can use the default `MuJoCo/Ant` | COMMENT |