A modular, primitive-first, python-first PyTorch library for Reinforcement Learning.
This report presents the forensic synthetic code analysis of pytorch/rl, a Python project with 3,539 GitHub stars. SynthScan v2.0 examined 532,686 lines of code across 1292 source files, recording 9836 pattern matches distributed across 25 syntactic categories. The overall adjusted score of 23.2 places this repository in the Moderate AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 9836 distinct pattern matches across 25 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 145 | def _check_and_clean_stale_builds(): | CODE |
| LOW | AGENTS.md | 120 | def test_something_cuda_specific(): | CODE |
| LOW | CLAUDE.md | 120 | def test_something_cuda_specific(): | CODE |
| LOW | test/test_configs.py | 301 | def test_wrapped_class_kwargs_have_config_fields(self, config_name): | CODE |
| LOW | test/test_configs.py | 388 | def test_vmas_env_config_instantiation(self): | CODE |
| LOW | test/test_configs.py | 424 | def test_async_env_shared_exchange_config(self): | CODE |
| LOW | test/test_configs.py | 447 | def test_batched_env_config_omegaconf_schema(self): | CODE |
| LOW | test/test_configs.py | 466 | def test_batched_env_config_validation(self, field, value): | CODE |
| LOW | test/test_configs.py | 497 | def test_round_robin_writer_config(self): | CODE |
| LOW | test/test_configs.py | 521 | def test_random_sampler_config(self): | CODE |
| LOW | test/test_configs.py | 556 | def test_tensor_storage_config(self): | CODE |
| LOW | test/test_configs.py | 577 | def test_tensordict_replay_buffer_config(self): | CODE |
| LOW | test/test_configs.py | 618 | def test_replay_buffer_config(self): | CODE |
| LOW | test/test_configs.py | 654 | def test_tensordict_replay_buffer_config_optional_fields(self): | CODE |
| LOW | test/test_configs.py | 670 | def test_writer_ensemble_config(self): | CODE |
| LOW | test/test_configs.py | 691 | def test_tensor_dict_max_value_writer_config(self): | CODE |
| LOW | test/test_configs.py | 708 | def test_tensor_dict_round_robin_writer_config(self): | CODE |
| LOW | test/test_configs.py | 727 | def test_immutable_dataset_writer_config(self): | CODE |
| LOW | test/test_configs.py | 741 | def test_sampler_ensemble_config(self): | CODE |
| LOW | test/test_configs.py | 762 | def test_prioritized_slice_sampler_config(self): | CODE |
| LOW | test/test_configs.py | 816 | def test_slice_sampler_without_replacement_config(self): | CODE |
| LOW | test/test_configs.py | 853 | def test_slice_sampler_config(self): | CODE |
| LOW | test/test_configs.py | 887 | def test_prioritized_sampler_config(self): | CODE |
| LOW | test/test_configs.py | 912 | def test_sampler_without_replacement_config(self): | CODE |
| LOW | test/test_configs.py | 930 | def test_storage_ensemble_writer_config(self): | CODE |
| LOW | test/test_configs.py | 950 | def test_lazy_stack_storage_config(self): | CODE |
| LOW | test/test_configs.py | 967 | def test_storage_ensemble_config(self): | CODE |
| LOW | test/test_configs.py | 992 | def test_lazy_memmap_storage_config(self): | CODE |
| LOW | test/test_configs.py | 1013 | def test_lazy_tensor_storage_config(self): | CODE |
| LOW | test/test_configs.py | 1042 | def test_complex_replay_buffer_configuration(self): | CODE |
| LOW | test/test_configs.py | 1194 | def test_tensor_dict_module_config(self): | CODE |
| LOW | test/test_configs.py | 1216 | def test_tanh_normal_model_config(self): | CODE |
| LOW | test/test_configs.py | 1250 | def test_tanh_normal_model_config_defaults(self): | CODE |
| LOW | test/test_configs.py | 1271 | def test_tensordict_sequential_config(self): | CODE |
| LOW | test/test_configs.py | 1401 | def test_qmixer_network_config(self): | CODE |
| LOW | test/test_configs.py | 1415 | def test_additive_gaussian_module_config(self): | CODE |
| LOW | test/test_configs.py | 1455 | def test_generic_collector_backend_fields(self): | CODE |
| LOW | test/test_configs.py | 1556 | def test_collector_auto_configures_exploration_modules(self, factory, collector): | CODE |
| LOW | test/test_configs.py | 1646 | def test_gae_config_value_chunk_dim(self): | CODE |
| LOW | test/test_configs.py | 1811 | def test_reinforce_loss_config(self): | CODE |
| LOW | test/test_configs.py | 1895 | def test_wandb_logger_config_instantiation(self, monkeypatch): | CODE |
| LOW | test/test_configs.py | 1922 | def test_trackio_logger_config(self): | CODE |
| LOW | test/test_configs.py | 1941 | def test_trackio_logger_config_instantiation(self, monkeypatch): | CODE |
| LOW | test/test_configs.py | 1993 | def test_checkpoint_config_parity(self, config_name, field_name): | CODE |
| LOW | test/test_configs.py | 1997 | def test_nested_key_normalization_for_hydra_lists(self): | CODE |
| LOW | test/test_configs.py | 2083 | def test_reinforce_trainer_config(self): | CODE |
| LOW | test/test_configs.py | 2113 | def test_ppo_trainer_config_optional_fields(self): | CODE |
| LOW | test/test_configs.py | 2276 | def test_individual_hook_configs(self, config_cls, kwargs, hook_cls): | CODE |
| LOW | test/test_configs.py | 4077 | def test_weight_updater_config(self): | CODE |
| LOW | test/test_configs.py | 4087 | def test_vanilla_weight_updater_config(self): | CODE |
| LOW | test/test_configs.py | 4099 | def test_multiprocessed_weight_updater_config(self): | CODE |
| LOW | test/test_configs.py | 4111 | def test_ray_weight_updater_config(self): | CODE |
| LOW | test/test_configs.py | 4124 | def test_rpc_weight_updater_config(self): | CODE |
| LOW | test/test_configs.py | 4139 | def test_distributed_weight_updater_config(self): | CODE |
| LOW | test/test_configs.py | 4153 | def test_remote_module_weight_updater_config(self): | CODE |
| LOW | test/test_configs.py | 2565 | def test_batched_env_with_one_transform(self, tmpdir): | STRING |
| LOW | test/test_configs.py | 2594 | def test_batched_env_with_two_transforms(self, tmpdir): | STRING |
| LOW | test/test_configs.py | 2635 | def test_simple_config_instantiation(self, tmpdir): | STRING |
| LOW | test/test_configs.py | 2685 | def test_env_parsing_with_file(self, tmpdir): | STRING |
| LOW | test/test_configs.py | 2705 | def test_collector_parsing_with_file(self, tmpdir): | STRING |
| 3645 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | test/test_inference_server.py | 128 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | test/test_inference_server.py | 130 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | test/test_inference_server.py | 1813 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | test/test_inference_server.py | 1815 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | test/test_inference_server.py | 2539 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | test/test_inference_server.py | 2541 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | test/test_inference_server.py | 2582 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | test/test_inference_server.py | 2584 | # ============================================================================= | COMMENT |
| MEDIUM | test/test_inference_server.py | 77 | # ============================================================================= | COMMENT |
| MEDIUM | test/test_inference_server.py | 79 | # ============================================================================= | COMMENT |
| MEDIUM | test/test_inference_server.py | 1087 | # ============================================================================= | COMMENT |
| MEDIUM | test/test_inference_server.py | 1089 | # ============================================================================= | COMMENT |
| MEDIUM | test/test_inference_server.py | 1188 | # ============================================================================= | COMMENT |
| MEDIUM | test/test_inference_server.py | 1190 | # ============================================================================= | COMMENT |
| MEDIUM | test/test_inference_server.py | 1280 | # ============================================================================= | COMMENT |
| MEDIUM | test/test_inference_server.py | 1282 | # ============================================================================= | COMMENT |
| MEDIUM | test/test_inference_server.py | 1563 | # ============================================================================= | COMMENT |
| MEDIUM | test/test_inference_server.py | 1565 | # ============================================================================= | COMMENT |
| MEDIUM | test/test_inference_server.py | 1753 | # ============================================================================= | COMMENT |
| MEDIUM | test/test_inference_server.py | 1755 | # ============================================================================= | COMMENT |
| MEDIUM | test/test_inference_server.py | 1956 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | test/test_inference_server.py | 1958 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | test/test_inference_server.py | 2465 | # ============================================================================= | COMMENT |
| MEDIUM | test/test_inference_server.py | 2467 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | test/test_collectors.py | 7303 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | test/test_collectors.py | 7305 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | test/test_collectors.py | 7574 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | test/test_collectors.py | 7576 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | test/test_collectors.py | 7902 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | test/test_collectors.py | 7904 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | test/test_collectors.py | 8099 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | test/test_collectors.py | 8101 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | test/test_collectors.py | 8202 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | test/test_collectors.py | 8204 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | test/test_collectors.py | 8251 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | test/test_collectors.py | 8253 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | test/test_collectors.py | 8359 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | test/test_collectors.py | 8361 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | test/test_collectors.py | 8611 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | test/test_collectors.py | 8613 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | test/test_collectors.py | 7287 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | test/test_collectors.py | 7289 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | test/test_rnd.py | 98 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | test/test_rnd.py | 100 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | test/test_rnd.py | 230 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | test/test_rnd.py | 232 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | test/test_rnd.py | 20 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | test/test_rnd.py | 22 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | test/test_rnd.py | 35 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | test/test_rnd.py | 37 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | test/llm/test_wrapper.py | 1623 | # ================================================ | COMMENT |
| MEDIUM⚡ | test/llm/test_wrapper.py | 1625 | # ================================================ | COMMENT |
| MEDIUM⚡ | test/llm/test_wrapper.py | 1701 | # ================================================ | COMMENT |
| MEDIUM⚡ | test/llm/test_wrapper.py | 1703 | # ================================================ | COMMENT |
| MEDIUM⚡ | test/llm/test_wrapper.py | 3964 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | test/llm/test_wrapper.py | 3966 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | test/llm/test_wrapper.py | 4135 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | test/llm/test_wrapper.py | 4137 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | test/llm/test_wrapper.py | 4390 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | test/llm/test_wrapper.py | 4392 | # ------------------------------------------------------------------ | COMMENT |
| 871 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 1 | CODE | |
| LOW | test/test_configs.py | 6 | CODE | |
| LOW | test/test_shared.py | 5 | CODE | |
| LOW | test/test_exploration.py | 5 | CODE | |
| LOW | test/smoke_test.py | 5 | CODE | |
| LOW | test/test_utils.py | 5 | CODE | |
| LOW | test/conftest.py | 5 | CODE | |
| LOW | test/opengl_rendering.py | 26 | CODE | |
| LOW | test/opengl_rendering.py | 33 | CODE | |
| LOW | test/opengl_rendering.py | 71 | CODE | |
| LOW | test/test_docstring_args_checker.py | 1 | CODE | |
| LOW | test/test_offline_to_online.py | 5 | CODE | |
| LOW | test/test_custom_envs.py | 5 | CODE | |
| LOW | test/test_inference_server.py | 5 | CODE | |
| LOW | test/test_loggers.py | 5 | CODE | |
| LOW | test/test_rlhf.py | 5 | CODE | |
| LOW | test/test_postprocs.py | 5 | CODE | |
| LOW | test/test_specs.py | 5 | CODE | |
| LOW | test/smoke_test_deps.py | 5 | CODE | |
| LOW | test/smoke_test_deps.py | 33 | CODE | |
| LOW | test/smoke_test_deps.py | 34 | CODE | |
| LOW | test/smoke_test_deps.py | 35 | CODE | |
| LOW | test/smoke_test_deps.py | 36 | CODE | |
| LOW | test/smoke_test_deps.py | 108 | CODE | |
| LOW | test/test_render.py | 5 | CODE | |
| LOW | test/test_distributions.py | 5 | CODE | |
| LOW | test/test_collectors.py | 5 | CODE | |
| LOW | test/test_helpers.py | 5 | CODE | |
| LOW | test/test_distributed.py | 9 | CODE | |
| LOW | test/test_trainer.py | 5 | CODE | |
| LOW | test/test_rnd.py | 5 | CODE | |
| LOW | test/test_checkpoint.py | 5 | CODE | |
| LOW | test/collectors/test_evaluator.py | 5 | CODE | |
| LOW | test/llm/test_vllm.py | 5 | CODE | |
| LOW | test/llm/test_llm_objectives.py | 5 | CODE | |
| LOW | test/llm/test_wrapper.py | 5 | CODE | |
| LOW | test/llm/smoke_test_llm.py | 5 | CODE | |
| LOW | test/llm/test_sglang_updaters.py | 6 | CODE | |
| LOW | test/llm/test_sglang.py | 6 | CODE | |
| LOW | test/llm/test_vllm_plugin.py | 5 | CODE | |
| LOW | test/llm/test_llm_envs.py | 5 | CODE | |
| LOW | test/llm/smoke_test_llm_deps.py | 5 | CODE | |
| LOW | test/llm/test_llm_transforms.py | 6 | CODE | |
| LOW | test/llm/test_llm_collectors.py | 5 | CODE | |
| LOW | test/llm/test_llm_updaters.py | 5 | CODE | |
| LOW | test/llm/test_llm_updaters.py | 30 | CODE | |
| LOW | test/llm/test_data.py | 6 | CODE | |
| LOW | test/llm/libs/test_mlgym.py | 5 | CODE | |
| LOW | test/objectives/test_controllers.py | 6 | CODE | |
| LOW | test/objectives/test_loss_module.py | 6 | CODE | |
| LOW | test/objectives/test_loss_module.py | 79 | CODE | |
| LOW | test/objectives/test_loss_module.py | 79 | CODE | |
| LOW | test/objectives/conftest.py | 5 | CODE | |
| LOW | test/objectives/test_mappo.py | 12 | CODE | |
| LOW | test/objectives/test_cql.py | 6 | CODE | |
| LOW | test/objectives/test_cql.py | 28 | CODE | |
| LOW | test/objectives/test_cql.py | 28 | CODE | |
| LOW | test/objectives/test_cql.py | 28 | CODE | |
| LOW | test/objectives/test_bc.py | 5 | CODE | |
| LOW | test/objectives/_objectives_common.py | 5 | CODE | |
| 2193 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | …ta-implementations/vla_grpo/openvla_oft/train_utils.py | 59 | Find a specific checkpoint file matching a pattern. Args: pretrained_checkpoint: Path to the checkpoin | STRING |
| HIGH | sota-implementations/dreamer/dreamer_utils.py | 85 | Allocate CUDA devices for collectors, reserving cuda:0 for training. Device allocation strategy: - Training alw | STRING |
| HIGH | sota-implementations/grpo/grpo_utils.py | 111 | Creates and configures the training model with LoRA adapters. This function initializes the main training model wit | STRING |
| HIGH | sota-implementations/grpo/grpo_utils.py | 196 | Creates the inference model for fast generation. This function initializes a model server (vLLM or SGLang) for effi | STRING |
| HIGH | sota-implementations/grpo/grpo_utils.py | 540 | Creates and configures a HuggingFace model with optional optimizations. Args: model_name (str): HuggingFace | STRING |
| HIGH | sota-implementations/redq/utils.py | 177 | Creates a Trainer instance given its constituents. Args: collector (BaseCollector): A data collector to be | STRING |
| HIGH | sota-implementations/expert-iteration/ei_utils.py | 107 | Creates and configures the training model with LoRA adapters. This function initializes the main training model wit | STRING |
| HIGH | sota-implementations/expert-iteration/ei_utils.py | 188 | Creates the vLLM-based inference model for fast generation. This function initializes a vLLM model server for effic | STRING |
| HIGH | sota-implementations/expert-iteration/ei_utils.py | 342 | Creates and configures a HuggingFace model with optional optimizations. Args: model_name (str): HuggingFace | STRING |
| HIGH | torchrl/_utils.py | 1119 | Return the available accelerator device, or CPU if none is found. Checks for accelerator availability in the follow | STRING |
| HIGH | torchrl/_utils.py | 1240 | Compile a model with warm-up. This function wraps :func:`~torch.compile` to add a warm-up phase. During the warm-up | STRING |
| HIGH | torchrl/_utils.py | 1417 | Return current CUDA memory statistics for ``device`` in gigabytes. Wraps :func:`torch.cuda.memory_allocated`, :func | STRING |
| HIGH | torchrl/_utils.py | 1803 | Merge user-provided ray_init_config with default runtime_env excludes. This function ensures that the default Torch | STRING |
| HIGH | torchrl/weight_update/utils.py | 32 | Resolve an attribute path like 'policy' or 'env.value_net' to actual object. Also processes getitem notation like ' | STRING |
| HIGH | torchrl/collectors/_base.py | 651 | Execute a method on a nested attribute of this collector. This method allows remote callers to invoke methods o | STRING |
| HIGH | torchrl/collectors/_base.py | 684 | Get a nested attribute of this collector. This method allows remote callers to retrieve attributes from nested | STRING |
| HIGH | torchrl/collectors/_base.py | 715 | Apply a method to each set of arguments. This method executes a method on the collector with different argument | STRING |
| HIGH | torchrl/collectors/_base.py | 986 | Update policy weights for the data collector. This method synchronizes the policy weights used by the collector | STRING |
| HIGH | torchrl/collectors/_base.py | 1267 | Receive and apply weights to the collector's policy. This method applies weights to the local policy. When rece | STRING |
| HIGH | torchrl/collectors/_multi_base.py | 1196 | Receive from a pipe while periodically checking worker health. This method prevents the main process from hangi | STRING |
| HIGH | torchrl/collectors/_multi_base.py | 1967 | Sets the seeds of the environments stored in the DataCollector. Args: seed: integer representing th | STRING |
| HIGH | torchrl/collectors/_multi_base.py | 2112 | Get an attribute from the policy of the first worker. Args: attr (str): The attribute name to retri | STRING |
| HIGH | torchrl/collectors/_multi_base.py | 2138 | Get an attribute from the environment of the first worker. Args: attr (str): The attribute name to | STRING |
| HIGH | torchrl/collectors/_multi_base.py | 2168 | Get model instance by ID (for weight sync schemes). Args: model_id: Model identifier (e.g., "policy | STRING |
| HIGH | torchrl/collectors/utils.py | 98 | A util function for trajectory separation. Takes a tensordict with a key traj_ids that indicates the id of each tra | STRING |
| HIGH | torchrl/collectors/_single.py | 1738 | Sets the seeds of the environments stored in the DataCollector. Args: seed (int): integer represent | STRING |
| HIGH | torchrl/collectors/_single.py | 2527 | Get model instance by ID (for weight sync schemes). Args: model_id: Model identifier (e.g., "policy | STRING |
| HIGH | torchrl/collectors/distributed/default_configs.py | 61 | Create a TCPStore with retry logic for handling port conflicts. This function attempts to create a TCPStore, and if | STRING |
| HIGH | torchrl/record/recorder.py | 333 | Convert recorded frames to a Matplotlib animation. This helper is intended for tutorials and notebooks where th | STRING |
| HIGH | torchrl/render/checkpoint.py | 52 | Writes a checkpoint in the layout expected by rlrender factories. The model weights are stored under the canonical | STRING |
| HIGH | torchrl/render/mujoco_wasm.py | 57 | Writes a local Vite viewer for MuJoCo WASM notebook rendering. Args: output_dir: Directory that will contai | STRING |
| HIGH | torchrl/render/mujoco_wasm.py | 125 | Starts and displays a generated MuJoCo WASM viewer in a notebook. Args: viewer_dir: Directory produced by : | STRING |
| HIGH | torchrl/render/mujoco_wasm.py | 184 | Sends one qpos vector to a live MuJoCo WASM notebook viewer. Args: qpos: Iterable of joint position values. | STRING |
| HIGH | torchrl/render/mujoco_wasm.py | 235 | Plays a qpos trajectory in a live MuJoCo WASM notebook viewer. Args: qpos: Iterable of waypoints, each cont | STRING |
| HIGH | torchrl/render/mujoco_wasm.py | 312 | Extracts a qpos trajectory from a rollout TensorDict. Args: rollout: Rollout TensorDict saved by ``rlrender | STRING |
| HIGH | torchrl/render/backends/mujoco.py | 53 | Returns a detached snapshot of the environment's MuJoCo state. Args: env: TorchRL-native MuJoCo env | STRING |
| HIGH | torchrl/objectives/dreamer_v3.py | 73 | Return DreamerV3 dynamics and representation KL losses. The dynamics term stops gradients through the posterior and | STRING |
| HIGH | torchrl/objectives/dreamer_v3.py | 121 | KL divergence with balancing between posterior and prior. Computes: loss = alpha * KL(sg(posterior) || prio | STRING |
| HIGH | torchrl/objectives/dreamer_v3.py | 1163 | Compute the DreamerV3 critic loss on a replay sequence. The return of each replay state uses the reward of the | STRING |
| HIGH | torchrl/objectives/common.py | 855 | Value-function constructor. If the non-default value function is wanted, it must be built using this me | STRING |
| HIGH | torchrl/objectives/llm/distillation.py | 27 | Per-token k3 estimate of the KL divergence to a target distribution. Uses the k3 estimator ``exp(d) - 1 - d`` with | STRING |
| HIGH | torchrl/objectives/value/advantages.py | 1099 | Computes the TD(0) advantage given the data in tensordict. If a functional module is provided, a nested TensorD | STRING |
| HIGH | torchrl/objectives/value/advantages.py | 1388 | Computes the TD(1) advantage given the data in tensordict. If a functional module is provided, a nested TensorD | STRING |
| HIGH | torchrl/objectives/value/advantages.py | 1701 | Computes the TD(:math:`\lambda`) advantage given the data in tensordict. If a functional module is provided, a | STRING |
| HIGH | torchrl/objectives/value/advantages.py | 2078 | Computes the GAE given the data in tensordict. If a functional module is provided, a nested TensorDict containi | STRING |
| HIGH | torchrl/objectives/value/advantages.py | 2691 | Computes the V-Trace correction given the data in tensordict. If a functional module is provided, a nested Tens | STRING |
| HIGH | torchrl/objectives/value/functional.py | 1393 | Compute the discounted cumulative sum of rewards given multiple trajectories and the episode ends. Args: re | STRING |
| HIGH | torchrl/_comm/backends.py | 79 | Return the canonical spelling of a TorchRL service backend. The long ``threading`` and ``multiprocessing`` spelling | STRING |
| HIGH | torchrl/_comm/backends.py | 104 | Return the canonical spelling of a TorchRL payload transport. Args: backend: Transport selector to validate | STRING |
| HIGH | torchrl/trainers/trainers.py | 2893 | Resolve a module from a trainer using a string path. Args: trainer (Trainer): The trainer instance to resol | STRING |
| HIGH | torchrl/trainers/helpers/models.py | 67 | DQN constructor helper function. Args: proof_environment (EnvBase): a dummy environment to retrieve the obs | STRING |
| HIGH | torchrl/trainers/helpers/trainers.py | 90 | Creates a Trainer instance given its constituents. Args: collector (BaseCollector): A data collector to be | STRING |
| HIGH | torchrl/modules/functional.py | 12 | Apply the element-wise symmetric logarithm transform. The transform is defined as ``sign(value) * log(1 + abs(v | STRING |
| HIGH | torchrl/modules/functional.py | 42 | Apply the inverse symmetric exponential transform element-wise. Args: value (torch.Tensor): Input tensor in | STRING |
| HIGH | torchrl/modules/functional.py | 69 | Apply the signed hyperbolic value transform. This is the scale-compressing transform introduced by Pohlen et al. an | STRING |
| HIGH | torchrl/modules/functional.py | 108 | Apply the inverse of :func:`signed_hyperbolic` element-wise. Args: value (torch.Tensor): Input tensor in si | STRING |
| HIGH | torchrl/modules/llm/backends/vllm/vllm_async.py | 1435 | Create a load balancer for this AsyncVLLM service. Args: strategy: Load balancing strategy or seque | STRING |
| HIGH | torchrl/modules/llm/backends/vllm/vllm_async.py | 1657 | Select the optimal actor index based on the configured strategy hierarchy. Args: prompt: The input | STRING |
| HIGH | torchrl/modules/llm/backends/vllm/vllm_async.py | 1776 | Select actor based on prompt prefix for cache locality. Args: prompt: Input prompt as string or tok | STRING |
| HIGH | torchrl/modules/llm/backends/vllm/vllm_async.py | 1826 | Extract prefix tokens from prompt (string or token list). Args: prompt: Input prompt. Retu | STRING |
| 111 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | test/test_configs.py | 1051 | # Create a complex configuration | COMMENT |
| MEDIUM | test/test_configs.py | 2442 | # Create a test script that follows the pattern | COMMENT |
| MEDIUM | test/test_configs.py | 2463 | # Create the config directory structure | STRING |
| MEDIUM | test/test_exploration.py | 688 | # Create a policy with exploration module that has spec=None | COMMENT |
| MEDIUM | test/test_exploration.py | 1132 | # Create a simple network with NoisyLinear using new behavior | COMMENT |
| MEDIUM | test/test_utils.py | 624 | # Create a tensor with batch dimension | COMMENT |
| MEDIUM | test/test_postprocs.py | 230 | # Create a sample TensorDict | COMMENT |
| MEDIUM | test/test_postprocs.py | 244 | # Create an instance of LastRewardToTraj | COMMENT |
| MEDIUM⚡ | test/test_specs.py | 4576 | # Create a OneHot spec with a mask that varies across batch dimension | COMMENT |
| MEDIUM | test/smoke_test_deps.py | 16 | # This file is a smoke test for optional deps. All optional-dep imports must | COMMENT |
| MEDIUM | test/test_collectors.py | 6313 | # Create a ParallelEnv factory - this is the key component that was failing | COMMENT |
| MEDIUM | test/test_collectors.py | 6331 | # Create the multi-collector with ParallelEnv and replay_buffer | COMMENT |
| MEDIUM | test/test_collectors.py | 6403 | # Create a simple dummy environment | COMMENT |
| MEDIUM | test/test_collectors.py | 6409 | # Create a simple dummy policy | COMMENT |
| MEDIUM | test/test_collectors.py | 6717 | # Create a deterministic policy (linear, no bias) so zeroing weights → zero actions | COMMENT |
| MEDIUM⚡ | test/llm/test_conversions.py | 116 | # Create a batch of ChatHistory objects | COMMENT |
| MEDIUM⚡ | test/llm/test_conversions.py | 427 | # Create a 2x2 batch | COMMENT |
| MEDIUM⚡ | test/llm/test_conversions.py | 429 | # Create a 2x2 batch of ChatHistory objects | COMMENT |
| MEDIUM | test/llm/test_conversions.py | 62 | # Create a batch of ChatHistory objects | COMMENT |
| MEDIUM | test/llm/test_conversions.py | 181 | # Create a batch of ChatHistory objects | COMMENT |
| MEDIUM | test/llm/test_conversions.py | 233 | # Create a batch of ChatHistory objects | COMMENT |
| MEDIUM | test/llm/test_conversions.py | 310 | # Create a batch of ChatHistory objects | COMMENT |
| MEDIUM | test/llm/test_conversions.py | 408 | # Create a batch of ChatHistory objects | COMMENT |
| MEDIUM | test/llm/test_vllm.py | 118 | # Create a transformer policy with the same model | COMMENT |
| MEDIUM | test/llm/test_vllm.py | 153 | # Create a proper collector mock that provides access to the AsyncVLLM service | COMMENT |
| MEDIUM | test/llm/test_wrapper.py | 2734 | # Create a custom mask matching the logits shape | COMMENT |
| MEDIUM | test/llm/test_wrapper.py | 3385 | # Create a simple mock function to test the decorator | COMMENT |
| MEDIUM | test/llm/test_wrapper.py | 3393 | # Create a mock self object with batching attributes | COMMENT |
| MEDIUM | test/llm/test_llm_envs.py | 850 | # Define a simple calculator tool | COMMENT |
| MEDIUM | test/llm/test_llm_envs.py | 859 | # Define the tool schema | COMMENT |
| MEDIUM | test/llm/test_llm_envs.py | 970 | # Define a tool that waits for a random amount of time | COMMENT |
| MEDIUM | test/llm/test_llm_envs.py | 983 | # Define the tool schema | COMMENT |
| MEDIUM | test/llm/test_data.py | 577 | # Create a simple history | COMMENT |
| MEDIUM | test/llm/test_data.py | 726 | # Create a custom template (trivially different from Qwen) | COMMENT |
| MEDIUM | test/llm/test_data.py | 1000 | # Create a batch of 2 prompt histories | COMMENT |
| MEDIUM⚡ | test/objectives/test_loss_module.py | 1371 | # Create a value estimator instance | COMMENT |
| MEDIUM⚡ | test/objectives/test_loss_module.py | 1377 | # Create a loss module that supports value estimation | COMMENT |
| MEDIUM⚡ | test/objectives/test_loss_module.py | 1470 | # Create a GAE instance | COMMENT |
| MEDIUM⚡ | test/objectives/test_loss_module.py | 1477 | # Create a PPO loss | COMMENT |
| MEDIUM | test/objectives/test_loss_module.py | 1398 | # Create a loss module | COMMENT |
| MEDIUM | test/objectives/test_loss_module.py | 1424 | # Create a loss module | COMMENT |
| MEDIUM | test/objectives/test_loss_module.py | 1446 | # Create a PPO loss which supports GAE | COMMENT |
| MEDIUM | test/libs/test_envpool.py | 234 | # Create the first env, set the seed, and perform a sequence of operations | COMMENT |
| MEDIUM | test/libs/test_envpool.py | 248 | # Create a new env, set the seed, and repeat same operations | COMMENT |
| MEDIUM | test/libs/test_isaac.py | 937 | # Create a fresh env with InitTracker (required for LSTM) | COMMENT |
| MEDIUM | test/libs/test_isaac.py | 968 | # Create a simple policy using the LSTM and move to correct device | COMMENT |
| MEDIUM⚡ | test/transforms/test_reward_transforms.py | 1208 | # Create a simple env with multi-objective rewards | COMMENT |
| MEDIUM⚡ | test/transforms/test_reward_transforms.py | 1211 | # Create a composed transform with LineariseRewards and RewardScaling | COMMENT |
| MEDIUM | test/transforms/test_reward_transforms.py | 1250 | # Create a dummy env that produces nested rewards | COMMENT |
| MEDIUM | test/transforms/test_compose_and_env.py | 633 | # Create a Compose transform that renames "action" to "action_1" and then to "action_2" | COMMENT |
| MEDIUM⚡ | test/transforms/test_module_transforms.py | 224 | # Create a simple module that adds a learnable bias to observations | COMMENT |
| MEDIUM | test/rb/test_samplers.py | 1512 | # Create a new buffer with the loaded storage but NEW sampler | COMMENT |
| MEDIUM | test/rb/test_storages.py | 414 | # Create a list of tensordicts (like a collector would produce) | COMMENT |
| MEDIUM | test/rb/test_storages.py | 752 | # Create an instance of LazyStackStorage with given parameters | COMMENT |
| MEDIUM | test/rb/test_storages.py | 754 | # Create a ReplayBuffer using the created storage | COMMENT |
| MEDIUM | test/rb/test_storages.py | 1548 | # Create a script that creates a storage and exits normally | COMMENT |
| MEDIUM | test/rb/test_storages.py | 1579 | # Create a script that sleeps and can be interrupted | COMMENT |
| MEDIUM | …ta-implementations/vla_grpo/openvla_oft/train_utils.py | 9 | # Create a tensor marking positions of IGNORE_INDEX | COMMENT |
| MEDIUM | …ta-implementations/vla_grpo/openvla_oft/train_utils.py | 15 | # Create the mask | COMMENT |
| MEDIUM | …ta-implementations/vla_grpo/openvla_oft/train_utils.py | 26 | # Create a tensor marking positions of IGNORE_INDEX | COMMENT |
| 138 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 145 | CODE | |
| LOW | packaging/wheel/relocate.py | 76 | CODE | |
| LOW | test/test_configs.py | 1479 | CODE | |
| LOW | test/test_configs.py | 2438 | CODE | |
| LOW | test/test_utils.py | 379 | CODE | |
| LOW | test/opengl_rendering.py | 87 | CODE | |
| LOW | test/test_specs.py | 3482 | CODE | |
| LOW | test/test_specs.py | 3528 | CODE | |
| LOW | test/test_specs.py | 1910 | CODE | |
| LOW | test/test_specs.py | 2245 | CODE | |
| LOW | test/test_specs.py | 2530 | CODE | |
| LOW | test/test_specs.py | 2826 | CODE | |
| LOW | test/test_collectors.py | 1567 | CODE | |
| LOW | test/test_collectors.py | 1649 | CODE | |
| LOW | test/test_collectors.py | 2519 | CODE | |
| LOW | test/test_collectors.py | 2871 | CODE | |
| LOW | test/test_collectors.py | 3775 | CODE | |
| LOW | test/test_collectors.py | 4214 | CODE | |
| LOW | test/test_collectors.py | 4375 | CODE | |
| LOW | test/test_collectors.py | 4590 | CODE | |
| LOW | test/test_collectors.py | 4656 | CODE | |
| LOW | test/test_collectors.py | 5503 | CODE | |
| LOW | test/test_collectors.py | 5524 | CODE | |
| LOW | test/test_collectors.py | 5554 | CODE | |
| LOW | test/test_collectors.py | 6381 | CODE | |
| LOW | test/test_collectors.py | 6543 | CODE | |
| LOW | test/test_collectors.py | 6798 | CODE | |
| LOW | test/test_collectors.py | 8616 | CODE | |
| LOW | test/test_collectors.py | 8673 | CODE | |
| LOW | test/test_mcts.py | 107 | CODE | |
| LOW | test/test_mcts.py | 853 | CODE | |
| LOW | test/test_distributed.py | 442 | CODE | |
| LOW | test/test_distributed.py | 568 | CODE | |
| LOW | test/test_distributed.py | 784 | CODE | |
| LOW | test/test_distributed.py | 1524 | CODE | |
| LOW | test/test_distributed.py | 1623 | CODE | |
| LOW | test/test_trainer.py | 381 | CODE | |
| LOW | test/test_trainer.py | 758 | CODE | |
| LOW | test/test_trainer.py | 1147 | CODE | |
| LOW | test/llm/test_vllm.py | 116 | CODE | |
| LOW | test/llm/test_wrapper.py | 469 | CODE | |
| LOW | test/llm/test_wrapper.py | 2337 | CODE | |
| LOW | test/llm/test_llm_collectors.py | 242 | CODE | |
| LOW | test/llm/test_llm_collectors.py | 349 | CODE | |
| LOW | test/llm/test_data.py | 494 | CODE | |
| LOW | test/objectives/test_loss_module.py | 182 | CODE | |
| LOW | test/objectives/test_cql.py | 174 | CODE | |
| LOW | test/objectives/_objectives_common.py | 208 | CODE | |
| LOW | test/objectives/_objectives_common.py | 209 | CODE | |
| LOW | test/objectives/test_iql.py | 289 | CODE | |
| LOW | test/objectives/test_iql.py | 544 | CODE | |
| LOW | test/objectives/test_iql.py | 1205 | CODE | |
| LOW | test/objectives/test_iql.py | 1378 | CODE | |
| LOW | test/objectives/test_ddpg.py | 375 | CODE | |
| LOW | test/objectives/test_ddpg.py | 999 | CODE | |
| LOW | test/objectives/test_ddpg.py | 1257 | CODE | |
| LOW | test/objectives/test_ddpg.py | 1922 | CODE | |
| LOW | test/objectives/test_ddpg.py | 2089 | CODE | |
| LOW | test/objectives/test_ppo.py | 399 | CODE | |
| LOW | test/objectives/test_ppo.py | 508 | CODE | |
| 488 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 353 | except Exception: | CODE |
| MEDIUM | setup.py | 346 | def _git_output(args) -> str | None: | CODE |
| LOW | test/test_configs.py | 2517 | except Exception: | STRING |
| LOW | test/test_setup.py | 216 | except Exception as err: | CODE |
| MEDIUM | test/test_inference_server.py | 1353 | def run(idx): | CODE |
| MEDIUM | test/test_inference_server.py | 2150 | def _hammer(server, fn_name): | CODE |
| LOW | test/test_inference_server.py | 1359 | except Exception as exc: # noqa: BLE001 | CODE |
| LOW | test/test_inference_server.py | 2155 | except Exception as exc: | CODE |
| LOW | test/test_inference_server.py | 2603 | except Exception: | CODE |
| LOW | test/test_loggers.py | 757 | except Exception: | CODE |
| LOW | test/smoke_test_deps.py | 109 | except Exception: # pragma: no cover | CODE |
| LOW | test/smoke_test_deps.py | 113 | except Exception as err: # gymnasium.error.NamespaceNotFound and similar | CODE |
| MEDIUM | test/smoke_test_deps.py | 89 | def test_gym(): | CODE |
| MEDIUM | test/test_collectors.py | 2464 | def test_cudagraph_policy_stochastic_diversity(self): | CODE |
| LOW⚡ | test/test_collectors.py | 5261 | except Exception: | CODE |
| LOW⚡ | test/test_collectors.py | 5276 | except Exception: | CODE |
| LOW | test/test_collectors.py | 5226 | except Exception as e: | CODE |
| LOW | test/test_collectors.py | 5307 | except Exception: | CODE |
| MEDIUM | test/test_distributed.py | 309 | def _test_distributed_collector_basic(cls, queue, frames_per_batch): | CODE |
| MEDIUM | test/test_distributed.py | 355 | def _test_distributed_collector_mult(cls, queue, frames_per_batch): | CODE |
| MEDIUM | test/test_distributed.py | 398 | def _test_distributed_collector_sync(cls, queue, sync): | CODE |
| MEDIUM | test/test_distributed.py | 517 | def _test_distributed_collector_class(cls, queue, collector_class): | CODE |
| MEDIUM | test/test_distributed.py | 568 | def _test_distributed_collector_updatepolicy( | CODE |
| MEDIUM | test/test_distributed.py | 895 | def reset_process_group(self): | CODE |
| MEDIUM | test/test_distributed.py | 1781 | def reset_process_group(self): | CODE |
| LOW | test/test_distributed.py | 329 | except Exception as e: | CODE |
| LOW | test/test_distributed.py | 374 | except Exception as e: | CODE |
| LOW | test/test_distributed.py | 418 | except Exception as e: | CODE |
| LOW | test/test_distributed.py | 479 | except Exception as e: | CODE |
| LOW | test/test_distributed.py | 537 | except Exception as e: | CODE |
| LOW | test/test_distributed.py | 630 | except Exception as e: | CODE |
| LOW | test/test_distributed.py | 698 | except Exception as e: | CODE |
| LOW | test/test_distributed.py | 830 | except Exception as e: | CODE |
| LOW | test/test_distributed.py | 898 | except Exception: | CODE |
| LOW | test/test_distributed.py | 1784 | except Exception: | CODE |
| LOW | test/llm/test_llm_objectives.py | 1395 | except Exception as e: | CODE |
| LOW | test/llm/test_wrapper.py | 109 | except Exception as e: | CODE |
| LOW | test/llm/test_wrapper.py | 142 | except Exception as e: | CODE |
| LOW | test/llm/test_wrapper.py | 588 | except Exception as e: | CODE |
| LOW | test/llm/test_wrapper.py | 2890 | except Exception as e: | CODE |
| LOW | test/llm/test_wrapper.py | 3155 | except Exception as e: | CODE |
| LOW | test/llm/test_wrapper.py | 3309 | except Exception as e: | CODE |
| LOW | test/llm/test_wrapper.py | 3536 | except Exception: | CODE |
| LOW | test/llm/test_sglang_updaters.py | 255 | except Exception as e: | CODE |
| LOW | test/llm/test_llm_envs.py | 1298 | except Exception as e: | CODE |
| LOW | test/llm/test_llm_updaters.py | 135 | except Exception as e: | CODE |
| LOW | test/llm/test_llm_updaters.py | 272 | except Exception as e: | CODE |
| LOW | test/llm/test_llm_updaters.py | 346 | except Exception as e: | CODE |
| LOW | test/llm/test_llm_updaters.py | 400 | except Exception as e: | CODE |
| LOW | test/llm/test_data.py | 691 | except Exception as e: | CODE |
| LOW | test/libs/conftest.py | 33 | except Exception: | CODE |
| MEDIUM | test/libs/test_datasets.py | 790 | def test_correct_categorical_missions(self): | CODE |
| LOW | test/libs/test_datasets.py | 445 | except Exception as err: | CODE |
| LOW | test/libs/test_datasets.py | 550 | except Exception: | CODE |
| LOW | test/libs/test_datasets.py | 555 | except Exception: | CODE |
| LOW | test/libs/test_datasets.py | 797 | except Exception as e: | CODE |
| MEDIUM | test/libs/test_gym.py | 119 | def get_gym_pixel_wrapper(): | CODE |
| LOW | test/libs/test_gym.py | 68 | except Exception: | CODE |
| LOW | test/libs/test_gym.py | 125 | except Exception: | CODE |
| LOW | test/libs/test_gym.py | 139 | except Exception: | CODE |
| 330 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | build_nightly.sh | 41 | # PyPI rejects PEP 440 local version identifiers (e.g. "+g<sha>"). Pin the | COMMENT |
| LOW | pyproject.toml | 261 | # Auto-loaded by vLLM in every process (main, workers, and the registry | COMMENT |
| LOW | packaging/pkg_helpers.bash | 1 | # A set of useful bash functions for common functionality we need to do in | COMMENT |
| LOW | packaging/pkg_helpers.bash | 21 | # /usr/local/cuda-* | COMMENT |
| LOW | packaging/pkg_helpers.bash | 201 | COMMENT | |
| LOW | test/opengl_rendering.py | 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. | COMMENT |
| LOW | test/opengl_rendering.py | 41 | COMMENT | |
| LOW | test/test_collectors.py | 2041 | def test_no_deepcopy_policy(self, collector_type): | COMMENT |
| LOW | test/test_collectors.py | 2921 | # Use -1 for padding to uniform with other preemption | COMMENT |
| LOW | test/test_collectors.py | 3561 | ) | COMMENT |
| LOW | test/test_collectors.py | 3581 | # ) and not torch.cuda.is_available(): | COMMENT |
| LOW | test/test_collectors.py | 3601 | # else: | COMMENT |
| LOW | test/test_collectors.py | 3621 | # policy=policy, | COMMENT |
| LOW | test/test_collectors.py | 3641 | # frames_per_batch=20, | COMMENT |
| LOW | test/test_collectors.py | 3661 | # @pytest.mark.parametrize("env_name", ["vec"]) | COMMENT |
| LOW | test/test_collectors.py | 3681 | # create_env_kwargs=[{"seed": i} for i in range(seed, seed + num_env)], | COMMENT |
| LOW | test/test_collectors.py | 3701 | # assert (d["done"].sum(-2) >= 1).all() | COMMENT |
| LOW | test/test_collectors.py | 3721 | # create_env_fn=env_fn, | COMMENT |
| LOW | test/test_collectors.py | 3821 | # Debug: shutting down collector | COMMENT |
| LOW | test/test_collectors.py | 3841 | # assert collector.policy.out_keys == ["action"] | COMMENT |
| LOW | test/llm/test_wrapper.py | 2841 | # """Setup and teardown for each test. | COMMENT |
| LOW | test/objectives/test_loss_module.py | 1181 | class TestBuffer: | COMMENT |
| LOW | test/libs/test_isaac.py | 401 | # "AllegroKukaTwoArms", | COMMENT |
| LOW | test/modules/test_td_module.py | 221 | COMMENT | |
| LOW | test/envs/test_env_base.py | 661 | COMMENT | |
| LOW | test/rb/conftest.py | 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. | COMMENT |
| LOW | test/rb/test_storage_map.py | 561 | node_id = vertex.node_id | COMMENT |
| LOW | sota-implementations/multiagent/utils/__init__.py | 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. | COMMENT |
| LOW | sota-implementations/vla_grpo/openvla.py | 61 | PROMPT_TEMPLATE = "In: What action should the robot take to {instruction}?\nOut:" | COMMENT |
| LOW | sota-implementations/vla_grpo/openvla_oft/__init__.py | 1 | # Vendored from SimpleVLA-RL (https://github.com/PRIME-RL/SimpleVLA-RL), | COMMENT |
| LOW | …ementations/vla_grpo/openvla_oft/modeling_prismatic.py | 521 | dtype=labels.dtype, | COMMENT |
| LOW | …ementations/vla_grpo/openvla_oft/modeling_prismatic.py | 541 | # proprio=None, | COMMENT |
| LOW | …ementations/vla_grpo/openvla_oft/modeling_prismatic.py | 561 | COMMENT | |
| LOW | …ementations/vla_grpo/openvla_oft/modeling_prismatic.py | 581 | # # === Handle Unimodal Forward === | COMMENT |
| LOW | …ementations/vla_grpo/openvla_oft/modeling_prismatic.py | 601 | # assert past_key_values is None, "Unexpected key `past_key_values` provided during multimodal forward!" | COMMENT |
| LOW | …ementations/vla_grpo/openvla_oft/modeling_prismatic.py | 621 | # # Add proprioceptive state if provided | COMMENT |
| LOW | …ementations/vla_grpo/openvla_oft/modeling_prismatic.py | 641 | # noisy_actions = noisy_actions.reshape(B, -1).unsqueeze(-1) | COMMENT |
| LOW | …ementations/vla_grpo/openvla_oft/modeling_prismatic.py | 661 | # # Build labels for multimodal sequence if needed | COMMENT |
| LOW | …ementations/vla_grpo/openvla_oft/modeling_prismatic.py | 681 | COMMENT | |
| LOW | …ementations/vla_grpo/openvla_oft/modeling_prismatic.py | 821 | output_hidden_states=False, | COMMENT |
| LOW | …ementations/vla_grpo/openvla_oft/modeling_prismatic.py | 841 | COMMENT | |
| LOW | …ementations/vla_grpo/openvla_oft/modeling_prismatic.py | 861 | COMMENT | |
| LOW | …ementations/vla_grpo/openvla_oft/modeling_prismatic.py | 881 | # #print("!!!!!!!!!!!!!!Entering forward!!!!!!!!!!") | COMMENT |
| LOW | …ementations/vla_grpo/openvla_oft/modeling_prismatic.py | 901 | # # Add stop token to sequence (needed in non-causal bi-directional self-attention, as it appears at train time) | COMMENT |
| LOW | …ementations/vla_grpo/openvla_oft/modeling_prismatic.py | 921 | # #test | COMMENT |
| LOW | …ementations/vla_grpo/openvla_oft/modeling_prismatic.py | 941 | COMMENT | |
| LOW | …ementations/vla_grpo/openvla_oft/modeling_prismatic.py | 961 | # newline_positions = labels != IGNORE_INDEX | COMMENT |
| LOW | …ementations/vla_grpo/openvla_oft/modeling_prismatic.py | 981 | COMMENT | |
| LOW | …ementations/vla_grpo/openvla_oft/modeling_prismatic.py | 1001 | # projected_patch_embeddings, proprio, proprio_projector | COMMENT |
| LOW | …ementations/vla_grpo/openvla_oft/modeling_prismatic.py | 1021 | # # Run diffusion-based prediction | COMMENT |
| LOW | …ementations/vla_grpo/openvla_oft/modeling_prismatic.py | 1041 | # # labels, | COMMENT |
| LOW | …ementations/vla_grpo/openvla_oft/modeling_prismatic.py | 1061 | # (projected_patch_embeddings.shape[0], projected_patch_embeddings.shape[1]), | COMMENT |
| LOW | …ementations/vla_grpo/openvla_oft/modeling_prismatic.py | 1081 | COMMENT | |
| LOW | …ementations/vla_grpo/openvla_oft/modeling_prismatic.py | 1281 | else: | COMMENT |
| LOW | …ementations/vla_grpo/openvla_oft/modeling_prismatic.py | 1641 | # if action_head is not None: | COMMENT |
| LOW | …ementations/vla_grpo/openvla_oft/modeling_prismatic.py | 1661 | device = language_model_output.logits.device | COMMENT |
| LOW | …a-implementations/vla_grpo/config/vla_grpo_libero.yaml | 1 | # SimpleVLA-RL (arXiv:2509.09674) on LIBERO: OpenVLA-OFT token variant (7B), | COMMENT |
| LOW | sota-implementations/cql/utils.py | 261 | COMMENT | |
| LOW | sota-implementations/rnd/rnd_mujoco.py | 81 | # The env already normalizes and clips observations with VecNorm and | COMMENT |
| LOW | sota-implementations/dreamer/dreamer_utils.py | 181 | COMMENT | |
| 443 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 26 | logger = logging.getLogger(__name__) | CODE |
| LOW | packaging/prepare_nightly_build.py | 7 | logger = logging.getLogger(__name__) | CODE |
| LOW | test/conftest.py | 81 | def set_warnings() -> None: | STRING |
| LOW | test/test_render.py | 162 | def _set_seed(self, seed: int | None) -> None: | CODE |
| LOW | test/test_collectors.py | 1754 | def _set_seed(self, seed: Optional[int]) -> None: | CODE |
| LOW | test/test_collectors.py | 3207 | def _set_seed(self, seed: int | None = None) -> None: | CODE |
| LOW | test/test_collectors.py | 3264 | def _set_seed(self, seed: int | None = None) -> None: | CODE |
| LOW | test/test_collectors.py | 3439 | def _set_seed(self, seed: int | None) -> None: | CODE |
| LOW | test/test_collectors.py | 4550 | def _set_seed(self, seed: int | None) -> None: | CODE |
| LOW | test/collectors/test_evaluator.py | 1041 | def set_extra_state(self, state: OrderedDict) -> None: | CODE |
| LOW | test/objectives/_objectives_common.py | 132 | def _set_seed(self, seed: int | None) -> None: | CODE |
| LOW | test/libs/test_gym.py | 195 | def _set_seed(self, seed: int | None) -> None: | CODE |
| LOW⚡ | test/transforms/test_action_transforms.py | 135 | def _set_seed(self, seed: int | None) -> None: | CODE |
| LOW⚡ | test/transforms/test_key_transforms.py | 95 | def _set_seed(self, seed: int | None) -> None: | CODE |
| LOW⚡ | test/transforms/test_key_transforms.py | 333 | def _set_seed(self, seed: int | None) -> None: | CODE |
| LOW⚡ | test/transforms/test_key_transforms.py | 934 | def _set_seed(self, seed: int | None) -> None: | CODE |
| LOW | test/transforms/test_reward_transforms.py | 1284 | def _set_seed(self, seed: int | None = None) -> None: | CODE |
| LOW | test/transforms/test_reward_transforms.py | 1344 | def _set_seed(self, seed: int | None = None) -> None: | CODE |
| LOW | test/transforms/test_compose_and_env.py | 174 | def _set_seed(self, seed: int) -> None: | CODE |
| LOW | test/transforms/test_compose_and_env.py | 1175 | def _set_seed(self, seed: int | None) -> None: | CODE |
| LOW | test/transforms/test_env_transforms.py | 439 | def _set_seed(self, seed: int | None) -> None: | CODE |
| LOW | test/transforms/test_normalization.py | 79 | def _set_seed(self, seed: int | None) -> None: | CODE |
| LOW | test/envs/test_env_base.py | 142 | def _set_seed(self, seed: int | None) -> None: | CODE |
| LOW | test/envs/test_env_base.py | 318 | def _set_seed(self, seed: int | None) -> None: | CODE |
| LOW | …implementations/vla_grpo/compare_simplevla_rollouts.py | 229 | def _set_seed(seed: int) -> None: | CODE |
| LOW⚡ | …ementations/vla_grpo/openvla_oft/modeling_prismatic.py | 395 | def set_input_embeddings(self, value: nn.Module) -> None: | CODE |
| LOW⚡ | …ementations/vla_grpo/openvla_oft/modeling_prismatic.py | 401 | def set_output_embeddings(self, new_embeddings: nn.Module) -> None: | CODE |
| LOW⚡ | …ementations/vla_grpo/openvla_oft/modeling_prismatic.py | 407 | def set_decoder(self, decoder: nn.Module) -> None: | CODE |
| LOW | …ementations/vla_grpo/openvla_oft/modeling_prismatic.py | 43 | logger = logging.getLogger(__name__) | CODE |
| LOW | …ementations/vla_grpo/openvla_oft/modeling_prismatic.py | 199 | def set_num_images_in_input(self, num_images_in_input: int) -> None: | CODE |
| LOW | sota-implementations/bandits/dqn.py | 91 | def _set_seed(self, seed: int | None) -> None: | CODE |
| LOW | examples/replay-buffers/filter-imcomplete-trajs.py | 33 | def _update_repertoire(self, tensordict: TensorDictBase) -> None: | CODE |
| LOW | examples/rlhf/models/actor_critic.py | 15 | __all__ = ["init_actor_critic"] | CODE |
| LOW | examples/rlhf/data/__init__.py | 3 | __all__ = ["get_prompt_dataloader_tldr"] | CODE |
| LOW | examples/envs/benchmark_compile_step_and_maybe_reset.py | 110 | def _set_seed(self, seed: int | None) -> None: | CODE |
| LOW | benchmarks/conftest.py | 143 | def set_warnings() -> None: | STRING |
| LOW | benchmarks/test_collectors_benchmark.py | 51 | def _set_seed(self, seed: int | None) -> None: | CODE |
| LOW | benchmarks/bench_collectors.py | 117 | def _set_seed(self, seed: int) -> None: | CODE |
| LOW | torchrl/__init__.py | 143 | __all__ = [ | CODE |
| LOW | torchrl/_utils.py | 449 | def set_profiling_enabled(enabled: bool) -> None: | CODE |
| LOW | torchrl/_utils.py | 1168 | def set_mode(self, type: Any | None) -> None: | CODE |
| LOW | torchrl/weight_update/weight_sync_schemes.py | 23 | __all__ = [ | CODE |
| LOW | torchrl/weight_update/__init__.py | 20 | __all__ = [ | CODE |
| LOW | torchrl/weight_update/_shared.py | 266 | def _update_single_worker(self, worker_idx: int, weights: TensorDictBase) -> None: | CODE |
| LOW⚡ | torchrl/weight_update/_ray.py | 163 | def set_model(self, model: Any) -> None: | CODE |
| LOW⚡ | torchrl/weight_update/_ray.py | 171 | def set_process_group(self, process_group, store=None) -> None: | CODE |
| LOW⚡ | torchrl/weight_update/_ray.py | 176 | def set_model_version(self, model_version: int | None) -> None: | CODE |
| LOW | torchrl/weight_update/_ray.py | 534 | def _set_model_version(self, model_version: int) -> None: | CODE |
| LOW | torchrl/weight_update/_ray.py | 971 | def _set_transform(self, ray_transform) -> None: | CODE |
| LOW | torchrl/weight_update/llm/vllm_nccl.py | 641 | def update_weights(self, weights: Any | None = None) -> None: | CODE |
| LOW | torchrl/weight_update/llm/__init__.py | 26 | __all__ = [ | CODE |
| LOW | torchrl/weight_update/llm/vllm_double_buffer.py | 260 | def update_weights(self, weights: Any | None = None) -> None: | CODE |
| LOW | torchrl/collectors/_constants.py | 26 | __all__ = [ | CODE |
| LOW | torchrl/collectors/_base.py | 1209 | def _set_received_policy_version(self, model_version: int | None) -> None: | CODE |
| LOW | torchrl/collectors/collectors.py | 31 | __all__ = [ | CODE |
| LOW | torchrl/collectors/__init__.py | 27 | __all__ = [ | CODE |
| LOW | torchrl/collectors/_multi_base.py | 912 | def _setup_preemptive_threshold(self, preemptive_threshold: float | None) -> None: | CODE |
| LOW | torchrl/collectors/_multi_base.py | 1735 | def _set_worker_attr(self, attr_name: str, value: Any) -> None: | CODE |
| LOW⚡ | torchrl/collectors/_single.py | 1080 | def _setup_policy_and_weights(self, policy: TensorDictModule | Callable) -> None: | CODE |
| LOW⚡ | torchrl/collectors/_single.py | 1231 | def _setup_max_frames_per_traj(self, max_frames_per_traj: int | None) -> None: | CODE |
| 294 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | test/llm/test_llm_objectives.py | 0 | create transformers model and tokenizer for testing. | STRING |
| HIGH | test/llm/test_wrapper.py | 0 | create transformers model and tokenizer for testing. | STRING |
| HIGH | test/llm/test_llm_envs.py | 0 | create transformers model and tokenizer for testing. | STRING |
| HIGH | test/objectives/test_cql.py | 0 | regression test for target_entropy='auto' should be -dim(a). | STRING |
| HIGH | test/objectives/test_dt.py | 0 | regression test for target_entropy='auto' should be -dim(a). | STRING |
| HIGH | test/objectives/test_sac.py | 0 | regression test for target_entropy='auto' should be -dim(a). | STRING |
| HIGH | test/libs/test_dm_control.py | 0 | smoke test that setting seed and reset works (seed forwarded into build). | STRING |
| HIGH | test/libs/test_gym.py | 0 | smoke test that setting seed and reset works (seed forwarded into build). | STRING |
| HIGH | test/libs/test_habitat.py | 0 | smoke test that setting seed and reset works (seed forwarded into build). | STRING |
| HIGH | sota-implementations/sac/sac.py | 0 | crossq example. this is a simple self-contained example of a crossq training script. it supports state environments like | STRING |
| HIGH | sota-implementations/discrete_sac/discrete_sac.py | 0 | crossq example. this is a simple self-contained example of a crossq training script. it supports state environments like | STRING |
| HIGH | sota-implementations/ddpg/ddpg.py | 0 | crossq example. this is a simple self-contained example of a crossq training script. it supports state environments like | STRING |
| HIGH | sota-implementations/td3/td3.py | 0 | crossq example. this is a simple self-contained example of a crossq training script. it supports state environments like | STRING |
| HIGH | sota-implementations/crossq/crossq.py | 0 | crossq example. this is a simple self-contained example of a crossq training script. it supports state environments like | STRING |
| HIGH | sota-implementations/cql/cql_offline.py | 0 | decision transformer example. this is a self-contained example of an offline decision transformer training script. the h | STRING |
| HIGH | sota-implementations/cql/discrete_cql_offline.py | 0 | decision transformer example. this is a self-contained example of an offline decision transformer training script. the h | STRING |
| HIGH | sota-implementations/iql/iql_offline.py | 0 | decision transformer example. this is a self-contained example of an offline decision transformer training script. the h | STRING |
| HIGH | sota-implementations/td3_bc/td3_bc.py | 0 | decision transformer example. this is a self-contained example of an offline decision transformer training script. the h | STRING |
| HIGH | sota-implementations/decision_transformer/online_dt.py | 0 | decision transformer example. this is a self-contained example of an offline decision transformer training script. the h | STRING |
| HIGH | sota-implementations/decision_transformer/dt.py | 0 | decision transformer example. this is a self-contained example of an offline decision transformer training script. the h | STRING |
| HIGH | sota-implementations/cql/cql_online.py | 0 | iql example. this is a self-contained example of an online iql training script. it works across gym and mujoco over a va | STRING |
| HIGH | sota-implementations/iql/discrete_iql.py | 0 | iql example. this is a self-contained example of an online iql training script. it works across gym and mujoco over a va | STRING |
| HIGH | sota-implementations/iql/iql_online.py | 0 | iql example. this is a self-contained example of an online iql training script. it works across gym and mujoco over a va | STRING |
| HIGH | sota-implementations/impala/impala_multi_node_ray.py | 0 | this script reproduces the impala algorithm results from espeholt et al. 2018 for the on atari environments. | STRING |
| HIGH | sota-implementations/impala/impala_single_node.py | 0 | this script reproduces the impala algorithm results from espeholt et al. 2018 for the on atari environments. | STRING |
| HIGH | …a-implementations/impala/impala_multi_node_submitit.py | 0 | this script reproduces the impala algorithm results from espeholt et al. 2018 for the on atari environments. | STRING |
| HIGH | sota-implementations/grpo/grpo-async.py | 0 | setup required environment variables and configurations. | STRING |
| HIGH | sota-implementations/grpo/grpo-sync.py | 0 | setup required environment variables and configurations. | STRING |
| HIGH | …lementations/expert-iteration/expert-iteration-sync.py | 0 | setup required environment variables and configurations. | STRING |
| HIGH | …ementations/expert-iteration/expert-iteration-async.py | 0 | setup required environment variables and configurations. | STRING |
| HIGH | examples/distributed/collectors/single_machine/sync.py | 0 | rpc data collection on a single node. the default configuration works fine on machines equipped with 4 gpus, but can be | STRING |
| HIGH | …mples/distributed/collectors/single_machine/generic.py | 0 | rpc data collection on a single node. the default configuration works fine on machines equipped with 4 gpus, but can be | STRING |
| HIGH | examples/distributed/collectors/single_machine/rpc.py | 0 | rpc data collection on a single node. the default configuration works fine on machines equipped with 4 gpus, but can be | STRING |
| HIGH | torchrl/record/loggers/mlflow.py | 0 | logs a scalar value to the tensorboard. args: name (str): the name of the scalar. value (float): the value of the scalar | STRING |
| HIGH | torchrl/record/loggers/trackio.py | 0 | logs a scalar value to the tensorboard. args: name (str): the name of the scalar. value (float): the value of the scalar | STRING |
| HIGH | torchrl/record/loggers/csv.py | 0 | logs a scalar value to the tensorboard. args: name (str): the name of the scalar. value (float): the value of the scalar | STRING |
| HIGH | torchrl/record/loggers/tensorboard.py | 0 | logs a scalar value to the tensorboard. args: name (str): the name of the scalar. value (float): the value of the scalar | STRING |
| HIGH | torchrl/record/loggers/mlflow.py | 0 | logs the hyperparameters of the experiment. args: cfg (dictconfig or dict): the configuration of the experiment. | STRING |
| HIGH | torchrl/record/loggers/wandb.py | 0 | logs the hyperparameters of the experiment. args: cfg (dictconfig or dict): the configuration of the experiment. | STRING |
| HIGH | torchrl/record/loggers/trackio.py | 0 | logs the hyperparameters of the experiment. args: cfg (dictconfig or dict): the configuration of the experiment. | STRING |
| HIGH | torchrl/record/loggers/csv.py | 0 | logs the hyperparameters of the experiment. args: cfg (dictconfig or dict): the configuration of the experiment. | STRING |
| HIGH | torchrl/record/loggers/tensorboard.py | 0 | logs the hyperparameters of the experiment. args: cfg (dictconfig or dict): the configuration of the experiment. | STRING |
| HIGH | torchrl/objectives/td3.py | 0 | maintains default values for all configurable tensordict keys. this class defines which tensordict keys can be set using | STRING |
| HIGH | torchrl/objectives/td3_bc.py | 0 | maintains default values for all configurable tensordict keys. this class defines which tensordict keys can be set using | STRING |
| HIGH | torchrl/objectives/iql.py | 0 | maintains default values for all configurable tensordict keys. this class defines which tensordict keys can be set using | STRING |
| HIGH | torchrl/objectives/crossq.py | 0 | maintains default values for all configurable tensordict keys. this class defines which tensordict keys can be set using | STRING |
| HIGH | torchrl/objectives/deprecated.py | 0 | maintains default values for all configurable tensordict keys. this class defines which tensordict keys can be set using | STRING |
| HIGH | torchrl/objectives/redq.py | 0 | maintains default values for all configurable tensordict keys. this class defines which tensordict keys can be set using | STRING |
| HIGH | torchrl/objectives/sac.py | 0 | maintains default values for all configurable tensordict keys. this class defines which tensordict keys can be set using | STRING |
| HIGH | torchrl/objectives/ddpg.py | 0 | maintains default values for all configurable tensordict keys. this class defines which tensordict keys can be set using | STRING |
| HIGH | torchrl/objectives/reinforce.py | 0 | maintains default values for all configurable tensordict keys. this class defines which tensordict keys can be set using | STRING |
| HIGH | torchrl/objectives/ppo.py | 0 | maintains default values for all configurable tensordict keys. this class defines which tensordict keys can be set using | STRING |
| HIGH | torchrl/objectives/a2c.py | 0 | maintains default values for all configurable tensordict keys. this class defines which tensordict keys can be set using | STRING |
| HIGH | torchrl/objectives/cql.py | 0 | maintains default values for all configurable tensordict keys. this class defines which tensordict keys can be set using | STRING |
| HIGH | torchrl/objectives/dqn.py | 0 | maintains default values for all configurable tensordict keys. this class defines which tensordict keys can be set using | STRING |
| HIGH | torchrl/objectives/multiagent/qmixer.py | 0 | maintains default values for all configurable tensordict keys. this class defines which tensordict keys can be set using | STRING |
| HIGH | torchrl/_comm/distributed.py | 0 | return ``true`` when the result can be read without blocking. | STRING |
| HIGH | torchrl/_comm/mailbox.py | 0 | return ``true`` when the result can be read without blocking. | STRING |
| HIGH | torchrl/modules/inference_server/_shared_memory.py | 0 | return ``true`` when the result can be read without blocking. | STRING |
| HIGH | torchrl/modules/llm/policies/vllm_wrapper.py | 0 | returns a new version of the module with altered parameters. for instance, the generate parameter can be altered to enab | STRING |
| 2 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/test_postprocs.py | 300 | CODE | |
| LOW | test/llm/test_llm_objectives.py | 660 | CODE | |
| LOW | test/llm/test_wrapper.py | 636 | CODE | |
| LOW | test/objectives/test_iql.py | 199 | CODE | |
| LOW | test/objectives/test_iql.py | 1111 | CODE | |
| LOW | test/objectives/test_dqn.py | 90 | CODE | |
| LOW | test/objectives/test_dqn.py | 884 | CODE | |
| LOW | test/objectives/test_ddpg.py | 138 | CODE | |
| LOW | test/objectives/test_ddpg.py | 179 | CODE | |
| LOW | test/objectives/test_ddpg.py | 905 | CODE | |
| LOW | test/objectives/test_ddpg.py | 1827 | CODE | |
| LOW | test/objectives/test_ppo.py | 74 | CODE | |
| LOW | test/objectives/test_ppo.py | 262 | CODE | |
| LOW | test/objectives/test_ppo.py | 314 | CODE | |
| LOW | test/objectives/test_ppo.py | 1877 | CODE | |
| LOW | test/objectives/test_ppo.py | 2029 | CODE | |
| LOW | test/objectives/test_sac.py | 75 | CODE | |
| LOW | test/objectives/test_sac.py | 257 | CODE | |
| LOW | test/objectives/test_sac.py | 1585 | CODE | |
| LOW | test/objectives/test_sac.py | 2420 | CODE | |
| LOW | test/objectives/test_sac.py | 3269 | CODE | |
| LOW | test/libs/test_datasets.py | 1153 | CODE | |
| LOW | test/libs/test_envpool.py | 150 | CODE | |
| LOW | sota-implementations/vla_grpo/utils.py | 529 | CODE | |
| LOW | sota-implementations/vla_grpo/utils.py | 584 | CODE | |
| LOW | sota-implementations/vla_grpo/openvla.py | 186 | CODE | |
| LOW | sota-implementations/vla_grpo/openvla.py | 476 | CODE | |
| LOW | sota-implementations/vla_grpo/openvla.py | 815 | CODE | |
| LOW | sota-implementations/vla_grpo/openvla.py | 1101 | CODE | |
| LOW | …ations/vla_grpo/openvla_oft/configuration_prismatic.py | 76 | CODE | |
| LOW | sota-implementations/grpo/grpo_utils.py | 518 | CODE | |
| LOW | sota-implementations/decision_transformer/lamb.py | 38 | CODE | |
| LOW | sota-implementations/ppo/utils_mujoco.py | 43 | CODE | |
| LOW | sota-implementations/redq/utils.py | 561 | CODE | |
| LOW | sota-implementations/expert-iteration/ei_utils.py | 319 | CODE | |
| LOW | examples/satellite/_utils.py | 443 | CODE | |
| LOW | examples/satellite/_utils.py | 538 | CODE | |
| LOW | torchrl/weight_update/_shared.py | 386 | CODE | |
| LOW | torchrl/weight_update/_shared.py | 511 | CODE | |
| LOW | torchrl/weight_update/_mp.py | 83 | CODE | |
| LOW | torchrl/collectors/_base.py | 468 | CODE | |
| LOW | torchrl/collectors/_single_async.py | 175 | CODE | |
| LOW | torchrl/collectors/_multi_base.py | 423 | CODE | |
| LOW | torchrl/collectors/_async_batched.py | 254 | CODE | |
| LOW | torchrl/collectors/_single.py | 677 | CODE | |
| LOW | torchrl/collectors/_single.py | 1762 | CODE | |
| LOW | torchrl/collectors/_evaluator.py | 289 | CODE | |
| LOW | torchrl/collectors/_runner.py | 36 | CODE | |
| LOW | torchrl/collectors/llm/ray_collector.py | 82 | CODE | |
| LOW | torchrl/collectors/llm/base.py | 146 | CODE | |
| LOW | torchrl/collectors/distributed/sync.py | 288 | CODE | |
| LOW | torchrl/collectors/distributed/generic.py | 542 | CODE | |
| LOW | torchrl/collectors/distributed/ray.py | 348 | CODE | |
| LOW | torchrl/collectors/distributed/rpc.py | 317 | CODE | |
| LOW | torchrl/record/recorder.py | 142 | CODE | |
| LOW | torchrl/record/loggers/monitoring.py | 219 | CODE | |
| LOW | torchrl/render/mujoco_wasm.py | 220 | CODE | |
| LOW | torchrl/objectives/td3.py | 224 | CODE | |
| LOW | torchrl/objectives/iql.py | 269 | CODE | |
| LOW | torchrl/objectives/iql.py | 826 | CODE | |
| 215 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | test/test_inference_server.py | 1883 | ws.push(new_weights) | CODE |
| HIGH | test/test_inference_server.py | 1912 | ws.push(new_weights) | CODE |
| HIGH | test/envs/test_special.py | 254 | board.push(move) | CODE |
| HIGH | .github/scripts/generate_dashboard.py | 310 | document.getElementById('new-flaky-count').textContent = report.summary.new_flaky_count || 0; | CODE |
| HIGH | .github/scripts/generate_dashboard.py | 311 | document.getElementById('resolved-count').textContent = report.summary.resolved_count || 0; | CODE |
| HIGH | .github/scripts/generate_dashboard.py | 344 | if (!flakyTests || flakyTests.length === 0) { | CODE |
| HIGH | .github/scripts/generate_dashboard.py | 370 | const lastFailed = test.recent_failures && test.recent_failures.length > 0 | CODE |
| HIGH | torchrl/_extension.py | 59 | " - make sure you ran `python setup.py clean && python setup.py develop` and that no error was raised\n" | CODE |
| HIGH⚡ | torchrl/render/mujoco_wasm.py | 833 | let model = null; | CODE |
| HIGH⚡ | torchrl/render/mujoco_wasm.py | 834 | let data = null; | CODE |
| HIGH⚡ | torchrl/render/mujoco_wasm.py | 835 | let mujoco = null; | CODE |
| HIGH⚡ | torchrl/render/mujoco_wasm.py | 838 | let threeScene = null; | CODE |
| HIGH⚡ | torchrl/render/mujoco_wasm.py | 839 | let renderer = null; | CODE |
| HIGH⚡ | torchrl/render/mujoco_wasm.py | 840 | let camera = null; | CODE |
| HIGH⚡ | torchrl/render/mujoco_wasm.py | 841 | let controls = null; | CODE |
| HIGH⚡ | torchrl/render/mujoco_wasm.py | 844 | let trajectoryPlayback = null; | CODE |
| HIGH⚡ | torchrl/render/mujoco_wasm.py | 1091 | jointControls.push({name, jointId, qposAddress, slider, output}); | CODE |
| HIGH⚡ | torchrl/render/mujoco_wasm.py | 1098 | if (!trajectoryUrl || params.get("autoplay") === "0") return; | CODE |
| HIGH⚡ | torchrl/render/mujoco_wasm.py | 1103 | const result = applyTrajectoryMessage(payload, null); | CODE |
| HIGH⚡ | torchrl/render/mujoco_wasm.py | 1108 | if (!value || typeof value !== "object") return null; | CODE |
| HIGH⚡ | torchrl/render/mujoco_wasm.py | 1108 | if (!value || typeof value !== "object") return null; | CODE |
| HIGH⚡ | torchrl/render/mujoco_wasm.py | 1109 | if (value.type !== "torchrl:mujoco_wasm:setQpos" && value.type !== "torchrl:mujoco_wasm:playTrajectory") return null; | CODE |
| HIGH⚡ | torchrl/render/mujoco_wasm.py | 1214 | if (renderer && camera) renderer.render(rendererScene(), camera); | CODE |
| HIGH⚡ | torchrl/render/mujoco_wasm.py | 1222 | if (!playback.loop && framePosition >= finalIndex) { | CODE |
| HIGH⚡ | torchrl/render/mujoco_wasm.py | 1224 | trajectoryPlayback = null; | CODE |
| HIGH | torchrl/render/mujoco_wasm.py | 613 | if (requestId && callbackUrl) {{ | CODE |
| HIGH | torchrl/render/mujoco_wasm.py | 620 | if (message.ok === false || done || cancelled) {{ | CODE |
| HIGH | torchrl/render/mujoco_wasm.py | 996 | visuals.push({geomId, object: mesh}); | CODE |
| HIGH | torchrl/render/mujoco_wasm.py | 1017 | return null; | CODE |
| HIGH | torchrl/render/mujoco_wasm.py | 1057 | if (jointType !== HINGE_JOINT_TYPE && jointType !== SLIDE_JOINT_TYPE) continue; | CODE |
| HIGH | torchrl/render/mujoco_wasm.py | 1162 | if (out.length !== model.nq && out.length !== jointControls.length) throw new Error(`qpos must have model.nq (${model. | CODE |
| HIGH | torchrl/render/mujoco_wasm.py | 1181 | if (message.dt !== undefined) { | CODE |
| HIGH | torchrl/render/mujoco_wasm.py | 1186 | if (message.fps !== undefined) { | CODE |
| HIGH | torchrl/render/mujoco_wasm.py | 1253 | trajectoryPlayback = null; | CODE |
| HIGH | torchrl/render/mujoco_wasm.py | 1263 | if (!data || homeQpos.length < 3) return; | CODE |
| HIGH | torchrl/render/mujoco_wasm.py | 1336 | while (end < bytes.length && bytes[end] !== 0) end++; | CODE |
| HIGH | torchrl/objectives/dreamer_v3.py | 125 | + (1 - alpha) * KL(posterior || sg(prior)) | STRING |
| HIGH | torchrl/objectives/llm/distillation.py | 37 | ``KL(sampling distribution || target distribution)``, and the direction | STRING |
| HIGH | torchrl/objectives/llm/distillation.py | 118 | - ``"reverse"`` (default): minimizes ``KL(student || teacher)``. This is | CODE |
| HIGH | torchrl/objectives/llm/distillation.py | 121 | - ``"forward"``: minimizes ``KL(teacher || student)``. Here the scored | CODE |
| HIGH | torchrl/envs/common.py | 885 | - The number of actions can be undefined, e.g., ``Categorical(n=-1)``; | STRING |
| HIGH | torchrl/envs/transforms/_reward.py | 336 | """Maps the reward to a binary value (0 or 1) if the reward is null or non-null, respectively. | STRING |
| HIGH | torchrl/envs/custom/chess.py | 498 | board.push(move) | CODE |
| HIGH | torchrl/data/tensor_specs.py | 3825 | n (int): number of possible outcomes. If set to -1, the cardinality of the categorical spec is undefined, | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | README.md | 143 | # Nested keys make multi-agent, recurrent, and next-state data explicit. | COMMENT |
| MEDIUM | test/libs/test_mujoco_playground.py | 67 | # Cached environment dims for the multi-agent test env, avoiding O(n_tests) | COMMENT |
| MEDIUM | examples/multiagent/mappo_vmas.py | 148 | # multi-agent value estimator broadcasts the latter across agents. | COMMENT |
| MEDIUM | torchrl/envs/utils.py | 641 | # "multi-agent-emergence-environments": None, | COMMENT |
| MEDIUM | torchrl/envs/utils.py | 642 | # OpenAI, https://github.com/openai/multi-agent-emergence-environments | COMMENT |
| MEDIUM | torchrl/envs/libs/meltingpot.py | 312 | # Create multi-agent specs | COMMENT |
| MEDIUM | torchrl/envs/libs/vmas.py | 429 | # Create multi-agent specs | COMMENT |
| MEDIUM | torchrl/envs/libs/mujoco_playground.py | 220 | # Predefined multi-agent partitionings for common MuJoCo locomotion tasks. | COMMENT |
| MEDIUM | torchrl/envs/model_based/world_model_env.py | 229 | # done structure (e.g. multi-agent dones) consistent with the spec. | COMMENT |
| MEDIUM | torchrl/data/postprocs/postprocs.py | 45 | # Note: rewards could have a different shape than done (e.g. multi-agent with a single | COMMENT |
| MEDIUM⚡ | …orials/sphinx-tutorials/multiagent_competitive_ddpg.py | 936 | # - How to create a competitive multi-group multi-agent environment in TorchRL, how its specs work, and how it integrate | COMMENT |
| MEDIUM⚡ | …orials/sphinx-tutorials/multiagent_competitive_ddpg.py | 937 | # - How to create multi-agent network architectures in TorchRL for multiple groups; | COMMENT |
| MEDIUM⚡ | …orials/sphinx-tutorials/multiagent_competitive_ddpg.py | 938 | # - How we can use :class:`tensordict.TensorDict` to carry multi-agent multi-group data; | COMMENT |
| MEDIUM⚡ | …orials/sphinx-tutorials/multiagent_competitive_ddpg.py | 939 | # - How we can tie all the library components (collectors, modules, replay buffers, and losses) in a multi-agent multi-g | COMMENT |
| MEDIUM⚡ | …orials/sphinx-tutorials/multiagent_competitive_ddpg.py | 941 | # Now that you are proficient with multi-agent DDPG, you can check out all the TorchRL multi-agent implementations in th | COMMENT |
| MEDIUM | …orials/sphinx-tutorials/multiagent_competitive_ddpg.py | 63 | # This approach has been extended to multi-agent learning in `Multi-Agent Actor-Critic for Mixed Cooperative-Competitive | COMMENT |
| MEDIUM | …orials/sphinx-tutorials/multiagent_competitive_ddpg.py | 65 | # In multi-agent settings, things are a bit different. We now have multiple policies :math:`\mathbf{\pi}`, | COMMENT |
| MEDIUM | …orials/sphinx-tutorials/multiagent_competitive_ddpg.py | 88 | # 2. Subsequently, we will construct a multi-agent environment, utilizing TorchRL's | COMMENT |
| MEDIUM | …orials/sphinx-tutorials/multiagent_competitive_ddpg.py | 196 | # TorchRL API allows integrating various types of multi-agent environment flavors. | COMMENT |
| MEDIUM | …orials/sphinx-tutorials/multiagent_competitive_ddpg.py | 311 | # (``"done", "terminated", "truncated"``), which do not have a leading multi-agent dimension. | COMMENT |
| MEDIUM | …orials/sphinx-tutorials/multiagent_competitive_ddpg.py | 333 | # We stress that, in multi-agent contexts, it is paramount to provide explicitly the keys to modify. | COMMENT |
| MEDIUM | …orials/sphinx-tutorials/multiagent_competitive_ddpg.py | 612 | # **From this point on, the multi-agent-specific components have been instantiated, and we will simply use the same | COMMENT |
| MEDIUM | …orials/sphinx-tutorials/multiagent_competitive_ddpg.py | 677 | ), # We will store up to memory_size multi-agent transitions | CODE |
| MEDIUM | tutorials/sphinx-tutorials/getting-started-0.py | 180 | # multiple copies across various processes, a multi-agent environment, or even | COMMENT |
| MEDIUM | tutorials/sphinx-tutorials/getting-started-0.py | 243 | # :ref:`multi-agent environment API <MARL-environment-API>` | COMMENT |
| MEDIUM | tutorials/sphinx-tutorials/getting-started-4.py | 20 | # The final chapter of this series before we orchestrate everything in a | COMMENT |
| MEDIUM⚡ | tutorials/sphinx-tutorials/multiagent_ppo.py | 190 | # TorchRL API allows integrating various types of multi-agent environment flavors. | COMMENT |
| MEDIUM⚡ | tutorials/sphinx-tutorials/multiagent_ppo.py | 192 | # For more information on how the multi-agent environments API works in TorchRL, you can check out the dedicated | COMMENT |
| MEDIUM⚡ | tutorials/sphinx-tutorials/multiagent_ppo.py | 205 | # The multi-agent task we will solve today is *Navigation* (see animated figure above). | COMMENT |
| MEDIUM⚡ | tutorials/sphinx-tutorials/multiagent_ppo.py | 525 | # **From this point on, the multi-agent-specific components have been instantiated, and we will simply use the same | COMMENT |
| MEDIUM⚡ | tutorials/sphinx-tutorials/multiagent_ppo.py | 780 | # - How to create a multi-agent environment in TorchRL, how its specs work, and how it integrates with the library; | COMMENT |
| MEDIUM⚡ | tutorials/sphinx-tutorials/multiagent_ppo.py | 782 | # - How to create different multi-agent network architectures in TorchRL (e.g., using parameter sharing, centralised cri | COMMENT |
| MEDIUM⚡ | tutorials/sphinx-tutorials/multiagent_ppo.py | 783 | # - How we can use :class:`tensordict.TensorDict` to carry multi-agent data; | COMMENT |
| MEDIUM⚡ | tutorials/sphinx-tutorials/multiagent_ppo.py | 784 | # - How we can tie all the library components (collectors, modules, replay buffers, and losses) in a multi-agent MAPPO/I | COMMENT |
| MEDIUM⚡ | tutorials/sphinx-tutorials/multiagent_ppo.py | 786 | # Now that you are proficient with multi-agent DDPG, you can check out all the TorchRL multi-agent implementations in th | COMMENT |
| MEDIUM⚡ | tutorials/sphinx-tutorials/multiagent_ppo.py | 791 | # You can also check out our other multi-agent tutorial on how to train competitive | COMMENT |
| MEDIUM⚡ | tutorials/sphinx-tutorials/multiagent_ppo.py | 794 | # If you are interested in creating or wrapping your own multi-agent environments in TorchRL, | COMMENT |
| MEDIUM | tutorials/sphinx-tutorials/multiagent_ppo.py | 76 | # In multi-agent settings, things are a bit different. We now have multiple policies :math:`\mathbf{\pi}`, | COMMENT |
| MEDIUM | tutorials/sphinx-tutorials/multiagent_ppo.py | 98 | # 2. Next, we will create a vectorized multi-agent environment, using TorchRL's | COMMENT |
| MEDIUM | tutorials/sphinx-tutorials/multiagent_ppo.py | 301 | # We stress that, in multi-agent contexts, it is paramount to provide explicitly the keys to modify. | COMMENT |
| MEDIUM | tutorials/sphinx-tutorials/getting-started-2.py | 47 | # module orchestrates the various components of your algorithm and | COMMENT |
| MEDIUM | tutorials/sphinx-tutorials/pendulum.py | 289 | # it (for example, in multi-agent settings we may want to indicate which agents need | COMMENT |
| MEDIUM | tutorials/sphinx-tutorials/coding_dqn.py | 169 | # the training script. The trainer is there to orchestrate everything for you! | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | build_nightly.sh | 4 | # Check if we're in a nightly build | COMMENT |
| LOW | packaging/verify_nightly_version.py | 15 | # Check if __version__ attribute exists | COMMENT |
| LOW | packaging/verify_nightly_version.py | 53 | # Check if it's the nightly version by looking at the version | COMMENT |
| LOW | packaging/verify_nightly_version.py | 57 | # Check if it's a nightly version (either date format or contains 'd' followed by date) | COMMENT |
| LOW | packaging/verify_nightly_version.py | 68 | # Check if it's a stable version that should not be used in nightly builds | COMMENT |
| LOW⚡ | test/test_collectors.py | 5270 | # Check if there was an exception even with exitcode 0 | COMMENT |
| LOW | test/test_mcts.py | 451 | ): # Check if action_prob_key was also populated | CODE |
| LOW⚡ | test/llm/test_conversions.py | 109 | # Check if it's a nested tensor by checking if it has the _values attribute | COMMENT |
| LOW⚡ | test/llm/test_conversions.py | 126 | # Check if it's a nested tensor | COMMENT |
| LOW | test/llm/test_conversions.py | 144 | # Check if they're nested tensors | COMMENT |
| LOW | test/llm/conftest.py | 78 | # Check if test already has a timeout marker | COMMENT |
| LOW | test/llm/test_llm_envs.py | 100 | # Set list to stack for tensordict | COMMENT |
| LOW | test/objectives/test_loss_module.py | 1529 | # Assign float to entropy_coeff | COMMENT |
| LOW | test/transforms/test_module_transforms.py | 150 | # Check if ray is initialized | COMMENT |
| LOW | sota-implementations/vla_grpo/openvla_oft/constants.py | 90 | # Assign constants to global variables | COMMENT |
| LOW | sota-implementations/dreamer/dreamer.py | 462 | # Check if profiling is complete and we should exit | COMMENT |
| LOW | sota-implementations/dreamer/dreamer_utils.py | 233 | # Check if we should stop profiling | COMMENT |
| LOW | sota-implementations/grpo/grpo-async.py | 272 | # Check if num_devices is set | COMMENT |
| LOW | sota-implementations/grpo/grpo-sync.py | 251 | # Check if num_devices is set | COMMENT |
| LOW | …lementations/expert-iteration/expert-iteration-sync.py | 407 | # Check if num_devices is set | COMMENT |
| LOW | …ementations/expert-iteration/expert-iteration-async.py | 408 | # Check if num_devices is set | COMMENT |
| LOW | sota-check/submitit-release-check.sh | 19 | # Check if the script is called with --help or without any arguments | COMMENT |
| LOW⚡ | examples/agents/recurrent_actor.py | 126 | # Print result: | COMMENT |
| LOW | .github/unittest/linux_libs/scripts_isaaclab/isaac.sh | 42 | # Check if isaaclab.sh exists | COMMENT |
| LOW | .github/workflows/auto-tag.yml | 100 | # Check if title starts with [...] | COMMENT |
| LOW | .github/workflows/release.yml | 151 | # Check if it's on a release branch matching the version | COMMENT |
| LOW | .github/workflows/release.yml | 437 | # Check if the version folder exists | COMMENT |
| LOW | .github/workflows/release.yml | 480 | # Check if changes were made | COMMENT |
| LOW | .github/workflows/release.yml | 546 | # Check if release already exists | COMMENT |
| LOW | .github/workflows/nightly_status_collector.yml | 151 | # Check if success rate dropped below 70% in last 7 days | COMMENT |
| LOW | .github/scripts/td_script.sh | 16 | # Check if ARCH is set to aarch64 | COMMENT |
| LOW | torchrl/_utils.py | 57 | # Check if user has explicitly set a global start method | COMMENT |
| LOW | torchrl/weight_update/_rpc.py | 256 | # Check if all futures are complete | COMMENT |
| LOW | torchrl/weight_update/_shared.py | 211 | # Check if per-worker weights dict is provided | COMMENT |
| LOW | torchrl/weight_update/_shared.py | 581 | # Check if policy factories are uniform or distinct | COMMENT |
| LOW | torchrl/weight_update/_shared.py | 936 | # Check if per-worker weights dict is provided | COMMENT |
| LOW | torchrl/weight_update/_shared.py | 1108 | # Check if already shutdown | COMMENT |
| LOW | torchrl/weight_update/_distributed.py | 478 | # Check if we have weights to send | COMMENT |
| LOW | torchrl/weight_update/_distributed.py | 549 | # Check if already shutdown | COMMENT |
| LOW | torchrl/weight_update/_distributed.py | 716 | # Check if all futures are complete | STRING |
| LOW | torchrl/weight_update/llm/vllm_double_buffer.py | 326 | # Check if this is an AsyncVLLM instance (uses RPC to coordinate workers) | COMMENT |
| LOW | torchrl/collectors/_multi_base.py | 1232 | # Check if any worker has died | COMMENT |
| LOW | torchrl/collectors/_multi_base.py | 1524 | # Check if it's an error dict from worker | COMMENT |
| LOW⚡ | torchrl/collectors/_single.py | 1089 | # Check if policy has meta-device parameters (sent from weight sync schemes) | COMMENT |
| LOW⚡ | torchrl/collectors/_single.py | 1226 | # Check if we need to cast to env device | COMMENT |
| LOW | torchrl/collectors/_single.py | 1430 | # Check if policy has meta-device parameters (not yet initialized) | COMMENT |
| LOW | torchrl/collectors/llm/weight_update/vllm.py | 311 | # Check if it's a LoRA model | COMMENT |
| LOW | torchrl/collectors/llm/weight_update/vllm.py | 339 | # Check if the model has a LoRA adapter | COMMENT |
| LOW | torchrl/collectors/llm/weight_update/vllm_v2.py | 119 | # Check if it's a LoRA model | COMMENT |
| LOW | torchrl/collectors/llm/weight_update/vllm_v2.py | 126 | # Check if it's a LoRA model | COMMENT |
| LOW | torchrl/collectors/llm/weight_update/vllm_v2.py | 290 | # Check if it's a LoRA model | COMMENT |
| LOW | torchrl/collectors/llm/weight_update/vllm_v2.py | 297 | # Check if it's a LoRA model | COMMENT |
| LOW | torchrl/trainers/trainers.py | 1861 | # Check if we've reached the target frames | COMMENT |
| LOW | torchrl/trainers/trainers.py | 1953 | # Check if enough frames have passed since last logging for this key | COMMENT |
| LOW | torchrl/modules/llm/backends/vllm/vllm_async.py | 254 | # Check if it's a list of lists or a single list | COMMENT |
| LOW | torchrl/modules/llm/backends/vllm/vllm_async.py | 832 | # Check if this is actually a single prompt represented as token IDs | COMMENT |
| LOW | torchrl/modules/llm/backends/vllm/vllm_async.py | 966 | # Check if this is a batch request | COMMENT |
| LOW | torchrl/modules/llm/backends/vllm/vllm_async.py | 1797 | # Check if preferred actor is overloaded | COMMENT |
| LOW | torchrl/modules/llm/backends/vllm/vllm_async.py | 2050 | # Set tensor_parallel_size to num_devices if not set | COMMENT |
| LOW | torchrl/modules/llm/backends/sglang/sglang_utils.py | 87 | # Check if subprocess died | COMMENT |
| 23 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | test/llm/test_wrapper.py | 2389 | # Step 1: Generate the canonical response tokens with vLLM. | COMMENT |
| LOW⚡ | test/llm/test_wrapper.py | 2395 | # Step 2: Extract generated tokens and create new input for log-probs computation | COMMENT |
| LOW | test/llm/test_wrapper.py | 2438 | # Step 3: Create log-probs only wrappers | COMMENT |
| LOW | test/llm/test_wrapper.py | 2457 | # Step 4: Compute log-probs for the full sequence (original + generated) | COMMENT |
| LOW⚡ | benchmarks/test_storage_write_benchmark.py | 142 | # Step 1: Stack to contiguous (this allocates new memory) | COMMENT |
| LOW⚡ | benchmarks/test_storage_write_benchmark.py | 144 | # Step 2: Write to storage | COMMENT |
| LOW⚡ | benchmarks/test_storage_write_benchmark.py | 176 | # Step 1: Create lazy stack (no allocation, just wrapping) | COMMENT |
| LOW⚡ | benchmarks/test_storage_write_benchmark.py | 178 | # Step 2: Write to storage (storage handles the lazy stack) | COMMENT |
| LOW | .github/RELEASE_AGENT_PROMPT.md | 60 | ## Step 1: Analyze Commits for Release Notes | COMMENT |
| LOW | .github/RELEASE_AGENT_PROMPT.md | 167 | ## Step 2: Draft Release Notes | COMMENT |
| LOW | .github/RELEASE_AGENT_PROMPT.md | 231 | ## Step 3: Update Version Files | COMMENT |
| LOW | .github/RELEASE_AGENT_PROMPT.md | 270 | ## Step 4: Commit Version Changes on the main branch (Major releases only) | COMMENT |
| LOW | .github/RELEASE_AGENT_PROMPT.md | 284 | ## Step 5: Create Release Branch | COMMENT |
| LOW | .github/RELEASE_AGENT_PROMPT.md | 298 | ## Step 6: Commit Version Changes (Minor releases only) | COMMENT |
| LOW | .github/RELEASE_AGENT_PROMPT.md | 309 | ## Step 7: Create and Push Tag | COMMENT |
| LOW | .github/RELEASE_AGENT_PROMPT.md | 322 | ## Step 8: Trigger Release Workflow | COMMENT |
| LOW | .github/RELEASE_AGENT_PROMPT.md | 337 | ## Step 9: Create Draft GitHub Release | COMMENT |
| LOW | .github/RELEASE_AGENT_PROMPT.md | 350 | ## Step 10: Monitor Workflow | COMMENT |
| LOW⚡ | torchrl/weight_update/_rpc.py | 181 | # Step 1: Signal the remote collector via RPC to start receiving (async) | COMMENT |
| LOW⚡ | torchrl/weight_update/_rpc.py | 185 | # Step 2: Send weights via torch.distributed (blocks until receiver calls recv()) | COMMENT |
| LOW⚡ | torchrl/weight_update/_rpc.py | 188 | # Step 3: Wait for RPC to complete (receiver has applied weights) | COMMENT |
| LOW⚡ | torchrl/weight_update/_rpc.py | 207 | # Step 1: Signal the remote collector via RPC to start receiving (async) | COMMENT |
| LOW⚡ | torchrl/weight_update/_rpc.py | 213 | # Step 2: Send weights asynchronously via torch.distributed | COMMENT |
| LOW⚡ | torchrl/weight_update/_ray.py | 206 | # Step 1: Signal the remote actor via Ray to start receiving (async) | COMMENT |
| LOW⚡ | torchrl/weight_update/_ray.py | 214 | # Step 2: Send weights via torch.distributed (async) | COMMENT |
| LOW⚡ | torchrl/weight_update/_ray.py | 218 | # Step 3: Wait for the Ray call to complete (receiver has applied weights) | COMMENT |
| LOW⚡ | torchrl/weight_update/_ray.py | 232 | # Step 1: Signal the actor via Ray to start receiving (async) | COMMENT |
| LOW⚡ | torchrl/weight_update/_ray.py | 242 | # Step 2: Send weights via torch.distributed (async) | COMMENT |
| LOW⚡ | torchrl/weight_update/llm/sglang_nccl.py | 604 | # Step 1: Send a single HTTP request with all weight metadata. | COMMENT |
| LOW⚡ | torchrl/weight_update/llm/sglang_nccl.py | 614 | # Step 2: Broadcast each weight tensor via NCCL in the same order. | COMMENT |
| LOW⚡ | torchrl/weight_update/llm/sglang_nccl.py | 623 | # Step 3: Wait for the HTTP response confirming server received all weights | COMMENT |
| LOW⚡ | torchrl/modules/llm/backends/vllm/vllm_async.py | 1190 | # Step 1: Start trainer NCCL group in a background thread — it blocks | COMMENT |
| LOW⚡ | torchrl/modules/llm/backends/vllm/vllm_async.py | 1204 | # Step 2: Dispatch init_weight_transfer_engine to all vLLM actors | COMMENT |
| LOW⚡ | torchrl/modules/llm/backends/vllm/vllm_async.py | 1220 | # Step 3: Wait for both sides to complete | COMMENT |
| LOW⚡ | torchrl/modules/llm/backends/vllm/vllm_async.py | 1293 | # Step 1: Tell all actors to start receiving weights | COMMENT |
| LOW⚡ | torchrl/modules/llm/backends/vllm/vllm_async.py | 1298 | # Step 2: Send weights from trainer side | COMMENT |
| LOW | torchrl/modules/llm/backends/vllm/vllm_async.py | 1317 | # Step 3: Wait for all actors to finish receiving | COMMENT |
| LOW⚡ | torchrl/modules/llm/backends/sglang/sglang_server.py | 707 | # Step 1: Signal server to expect this weight | COMMENT |
| LOW⚡ | torchrl/modules/llm/backends/sglang/sglang_server.py | 712 | # Step 2: Broadcast the weight via NCCL | COMMENT |
| LOW⚡ | tutorials/sphinx-tutorials/llm_browser.py | 81 | # Step 1: Basic Environment Configuration | COMMENT |
| LOW⚡ | tutorials/sphinx-tutorials/llm_browser.py | 189 | # Step 2: Tool Execution Helper | COMMENT |
| LOW⚡ | tutorials/sphinx-tutorials/llm_browser.py | 262 | # Step 3: Starting the Interaction | COMMENT |
| LOW⚡ | tutorials/sphinx-tutorials/llm_browser.py | 292 | # Step 4: Performing the Search | COMMENT |
| LOW⚡ | tutorials/sphinx-tutorials/llm_browser.py | 321 | # Step 5: Providing the Answer | COMMENT |
| LOW⚡ | tutorials/sphinx-tutorials/trl_interop.py | 50 | # Step 1: build and populate a replay buffer | COMMENT |
| LOW⚡ | tutorials/sphinx-tutorials/trl_interop.py | 77 | # Step 2: wrap the buffer as an IterableDataset | COMMENT |
| LOW⚡ | tutorials/sphinx-tutorials/trl_interop.py | 109 | # Step 3: key filtering | COMMENT |
| LOW⚡ | tutorials/sphinx-tutorials/trl_interop.py | 124 | # Step 4: device placement | COMMENT |
| LOW⚡ | tutorials/sphinx-tutorials/trl_interop.py | 137 | # Step 5: nested keys | COMMENT |
| LOW⚡ | tutorials/sphinx-tutorials/trl_interop.py | 181 | # Step 1: define a stand-in reward model | COMMENT |
| LOW⚡ | tutorials/sphinx-tutorials/trl_interop.py | 216 | # Step 2: wrap with default TorchRL token keys | COMMENT |
| LOW⚡ | tutorials/sphinx-tutorials/trl_interop.py | 234 | # Step 3: run a batch through the wrapper | COMMENT |
| LOW⚡ | tutorials/sphinx-tutorials/trl_interop.py | 256 | # Step 4: custom keys and nested reward key | COMMENT |
| LOW | knowledge_base/FLAKY_TESTS.md | 42 | ## Step 1: Gather Flaky Test Information | COMMENT |
| LOW | knowledge_base/FLAKY_TESTS.md | 96 | ## Step 2: Identify Non-Deterministic Failure Causes | COMMENT |
| LOW | knowledge_base/FLAKY_TESTS.md | 131 | ## Step 3: Implement the Fix | COMMENT |
| LOW | knowledge_base/FLAKY_TESTS.md | 184 | ## Step 4: Create a PR with the Fix AND Test Validation | COMMENT |
| LOW | knowledge_base/FLAKY_TESTS.md | 274 | ## Step 5: Monitor the CI Run | COMMENT |
| LOW | knowledge_base/FLAKY_TESTS.md | 302 | ## Step 6: Verify the Fix | COMMENT |
| LOW | knowledge_base/FLAKY_TESTS.md | 328 | ## Step 7: Cleanup Before Merging | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/llm/test_llm_collectors.py | 547 | # We have the tokens, let's just use them | COMMENT |
| LOW | sota-implementations/expert-iteration/ei_utils.py | 88 | # we can just use 0 here. | COMMENT |
| LOW | …lementations/expert-iteration/expert-iteration-sync.py | 433 | # we can just set a big number, the buffer will be emptied anyway | COMMENT |
| MEDIUM | examples/agents/recurrent_actor.py | 182 | # its recurrent connections to maintain state across time steps. This mode may utilize CuDNN to accelerate the processin | COMMENT |
| MEDIUM | .github/scripts/compare_pr_benchmarks.py | 45 | """Return a rate based on the robust per-round duration statistic.""" | STRING |
| LOW | torchrl/weight_update/_shared.py | 909 | # If no shared transport, just return the fresh weights | COMMENT |
| MEDIUM | torchrl/collectors/_single.py | 1790 | # this way of checking cuda is robust to lazy stacks with mismatching shapes | COMMENT |
| MEDIUM | torchrl/objectives/common.py | 492 | # To make it robust to device casting, we must register list of | COMMENT |
| LOW | torchrl/objectives/llm/grpo.py | 605 | # TODO: eventually, we want to always use `get_dist` and just pass the key of the mask | COMMENT |
| MEDIUM | torchrl/objectives/llm/grpo.py | 1512 | # Cat is the most robust way to combine the trajs | COMMENT |
| MEDIUM | torchrl/trainers/algorithms/on_policy.py | 318 | # Set up comprehensive logging for on-policy training | COMMENT |
| MEDIUM | torchrl/trainers/algorithms/sac.py | 258 | # Set up comprehensive logging for SAC training | COMMENT |
| LOW | torchrl/modules/llm/policies/common.py | 747 | # For log-prob distributions, we just return the pre-computed log-probs | COMMENT |
| MEDIUM | torchrl/modules/llm/policies/transformers_wrapper.py | 1042 | # We are going to map this tokens_in to a tensordict to facilitate the padding in case we need it | COMMENT |
| MEDIUM | torchrl/modules/llm/policies/transformers_wrapper.py | 1465 | # We are going to map this tokens_in to a tensordict to facilitate the padding in case we need it | COMMENT |
| LOW | torchrl/modules/mcts/scores.py | 425 | # Don't update weights for zero probability - just return | COMMENT |
| LOW | torchrl/envs/utils.py | 1489 | # case we just return the data | COMMENT |
| MEDIUM | torchrl/envs/utils.py | 200 | """Represents the keys as a tree to facilitate iteration.""" | STRING |
| LOW | torchrl/envs/libs/dm_control.py | 318 | # just use a common EGL_DEVICE_ID environment variable for all processes. | COMMENT |
| MEDIUM | torchrl/envs/transforms/_normalization.py | 711 | # to facilitate the computation of the stats using TD internals. | COMMENT |
| MEDIUM | torchrl/envs/transforms/_misc.py | 75 | """Calls pin_memory on the tensordict to facilitate writing on CUDA devices.""" | STRING |
| MEDIUM | torchrl/data/llm/topk.py | 122 | # Cat is the most robust way to combine the trajs | COMMENT |
| MEDIUM | torchrl/data/replay_buffers/utils.py | 1200 | # We currently ignore out in this call but we should leverage that | COMMENT |
| LOW | torchrl/data/replay_buffers/utils.py | 1379 | # if Tensor, we just create a MemoryMappedTensor of the desired shape, device and dtype | COMMENT |
| LOW | torchrl/data/replay_buffers/utils.py | 1396 | # if Tensor, we just create a MemoryMappedTensor of the desired shape, device and dtype | COMMENT |
| LOW | torchrl/data/replay_buffers/storages/tensor.py | 1097 | # if Tensor, we just create a MemoryMappedTensor of the desired shape, device and dtype | COMMENT |
| MEDIUM | tutorials/sphinx-tutorials/dqn_with_rnn.py | 222 | # values for these attributes to facilitate its construction. | COMMENT |
| MEDIUM | tutorials/sphinx-tutorials/torchrl_envs.py | 652 | # One can therefore think carefully about the transform design to leverage the | COMMENT |
| LOW | tutorials/sphinx-tutorials/torchrl_envs.py | 341 | # To compose transforms, simply use the ``Compose`` class: | COMMENT |
| MEDIUM⚡ | tutorials/sphinx-tutorials/getting-started-1.py | 26 | # Accommodating all these scenarios can be quite intricate. In this succinct | COMMENT |
| MEDIUM⚡ | tutorials/sphinx-tutorials/getting-started-1.py | 27 | # tutorial, we will delve into the core functionality of TorchRL in terms of | COMMENT |
| MEDIUM | …orials/sphinx-tutorials/multiagent_competitive_ddpg.py | 337 | # Essentially we just say that the | COMMENT |
| LOW | …orials/sphinx-tutorials/multiagent_competitive_ddpg.py | 612 | # **From this point on, the multi-agent-specific components have been instantiated, and we will simply use the same | COMMENT |
| MEDIUM | tutorials/sphinx-tutorials/getting-started-0.py | 79 | # Essentially, :class:`~tensordict.TensorDict` is a generic key-based data | COMMENT |
| MEDIUM | tutorials/sphinx-tutorials/getting-started-3.py | 144 | # Data collectors are very useful when it comes to coding state-of-the-art | COMMENT |
| MEDIUM⚡ | tutorials/sphinx-tutorials/multiagent_ppo.py | 200 | # This allows leveraging the Single Instruction Multiple Data (SIMD) paradigm of GPUs and significantly | COMMENT |
| MEDIUM | tutorials/sphinx-tutorials/multiagent_ppo.py | 224 | # We will also use ``num_vmas_envs`` vectorized environments, to leverage batch simulation. | COMMENT |
| LOW⚡ | tutorials/sphinx-tutorials/multiagent_ppo.py | 525 | # **From this point on, the multi-agent-specific components have been instantiated, and we will simply use the same | COMMENT |
| LOW | tutorials/sphinx-tutorials/rb_tutorial.py | 387 | # To enable multithreaded sampling, just pass a positive integer to the | COMMENT |
| MEDIUM | tutorials/sphinx-tutorials/coding_ddpg.py | 574 | # To leverage the vectorization capabilities of PyTorch, we adopt | COMMENT |
| LOW | tutorials/sphinx-tutorials/coding_ddpg.py | 181 | # accessible but this will just return a **detached** version of the | COMMENT |
| LOW | tutorials/sphinx-tutorials/coding_ddpg.py | 427 | # are collected by :func:`env.step()`, simply pass the ``from_pixels=True`` | COMMENT |
| MEDIUM | tutorials/sphinx-tutorials/pendulum.py | 167 | # To facilitate the reading and writing from that ``tensordict`` and to make sure | COMMENT |
| MEDIUM | tutorials/sphinx-tutorials/coding_dqn.py | 67 | # past, we can still pass it in conjunction with the various actions available | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | README.md | 217 | processes, weight updaters, evaluator loops, profiling hooks, and fake-data | CODE |
| LOW | test/llm/test_llm_objectives.py | 43 | "Lorem ipsum dolor sit amet,", | CODE |
| LOW | test/llm/test_llm_objectives.py | 43 | "Lorem ipsum dolor sit amet,", | CODE |
| LOW⚡ | test/objectives/test_dreamer.py | 421 | loss_td, fake_data = loss_module(tensordict.reshape(-1)) | CODE |
| LOW⚡ | test/objectives/test_dreamer.py | 422 | assert not fake_data.requires_grad | CODE |
| LOW⚡ | test/objectives/test_dreamer.py | 423 | assert fake_data.shape == torch.Size([tensordict.numel(), imagination_horizon]) | CODE |
| LOW | test/objectives/test_dreamer.py | 450 | loss_td, fake_data = loss_module(tensordict) | CODE |
| LOW | test/objectives/test_dreamer.py | 452 | assert not fake_data.requires_grad | CODE |
| LOW⚡ | test/objectives/test_dreamer_v3.py | 677 | loss_td, fake_data = loss_module( | CODE |
| LOW⚡ | test/objectives/test_dreamer_v3.py | 683 | fake_data["discount_weight"][0, :, 0], expected_weight | CODE |
| LOW⚡ | test/objectives/test_dreamer_v3.py | 686 | fake_data["next", "continuation"], | CODE |
| LOW⚡ | test/objectives/test_dreamer_v3.py | 687 | torch.full_like(fake_data["next", "continuation"], 0.5), | CODE |
| LOW⚡ | test/objectives/test_dreamer_v3.py | 689 | assert not fake_data["discount_weight"].requires_grad | CODE |
| LOW⚡ | test/objectives/test_dreamer_v3.py | 695 | actor_inputs = fake_data.select(*actor_model.in_keys, strict=False).detach() | CODE |
| LOW⚡ | test/objectives/test_dreamer_v3.py | 697 | log_prob = distribution.log_prob(fake_data["action"].detach()) | CODE |
| LOW⚡ | test/objectives/test_dreamer_v3.py | 698 | log_prob = _match_trailing_dim(log_prob, fake_data["lambda_target"]) | CODE |
| LOW⚡ | test/objectives/test_dreamer_v3.py | 699 | baseline_td = fake_data.select(*value_model.in_keys, strict=False) | CODE |
| LOW⚡ | test/objectives/test_dreamer_v3.py | 701 | advantage = (fake_data["lambda_target"] - baseline_td["state_value"]).detach() | CODE |
| LOW⚡ | test/objectives/test_dreamer_v3.py | 702 | expected_loss = -(fake_data["discount_weight"] * log_prob * advantage).mean() | CODE |
| LOW⚡ | test/objectives/test_dreamer_v3.py | 712 | value_loss(fake_data.detach()) | CODE |
| LOW⚡ | test/objectives/test_dreamer_v3.py | 1481 | loss_td, fake_data = loss_module( | CODE |
| LOW⚡ | test/objectives/test_dreamer_v3.py | 1484 | baseline_td = fake_data.select(*value_model.in_keys, strict=False) | CODE |
| LOW⚡ | test/objectives/test_dreamer_v3.py | 1486 | advantage = (fake_data["lambda_target"] - baseline_td["state_value"]).detach() | CODE |
| LOW⚡ | test/objectives/test_dreamer_v3.py | 1488 | fake_data["action_log_prob"], fake_data["lambda_target"] | CODE |
| LOW⚡ | test/objectives/test_dreamer_v3.py | 1498 | compiled_scale(fake_data["lambda_target"]), | CODE |
| LOW | test/objectives/test_dreamer_v3.py | 633 | loss_td, fake_data = loss_module(tensordict.reshape(-1)) | CODE |
| LOW | test/objectives/test_dreamer_v3.py | 851 | loss_td, fake_data = actor_loss( | CODE |
| LOW | test/objectives/test_dreamer_v3.py | 855 | assert fake_data["lambda_target"].shape[-1] == 1 | CODE |
| LOW | test/objectives/test_dreamer_v3.py | 1521 | loss_td, fake_data = loss_module( | CODE |
| LOW | test/objectives/test_dreamer_v3.py | 1524 | expected = -(fake_data["lambda_target"] / 10.0).mean() | CODE |
| LOW | test/objectives/test_dreamer_v3.py | 1543 | loss_td, fake_data = loss_module( | CODE |
| LOW | test/objectives/test_dreamer_v3.py | 1547 | fake_data["lambda_target"].detach(), | CODE |
| LOW | test/objectives/test_dreamer_v3.py | 1568 | loss_td, fake_data = loss_module( | CODE |
| LOW | test/objectives/test_dreamer_v3.py | 1572 | fake_data["lambda_target"].detach(), | CODE |
| LOW⚡ | test/transforms/test_module_transforms.py | 210 | dummy_data = TensorDict(observation=torch.zeros(2, 3), batch_size=[2]) | CODE |
| LOW⚡ | test/transforms/test_module_transforms.py | 213 | assert (module(dummy_data)["action"] == 2).all() | CODE |
| LOW⚡ | test/transforms/test_module_transforms.py | 221 | assert (module(dummy_data)["action"] == 1).all() | CODE |
| LOW⚡ | sota-implementations/dreamer_v3/train.py | 542 | actor_loss_td, fake_data = actor_loss(actor_input) | CODE |
| LOW⚡ | sota-implementations/dreamer_v3/train.py | 543 | value_loss_td, _ = value_loss(fake_data.detach()) | CODE |
| LOW⚡ | sota-implementations/dreamer_v3/train.py | 549 | "bootstrap": fake_data.get("lambda_target")[..., 0, 0].reshape( | CODE |
| LOW⚡ | benchmarks/test_llm.py | 64 | "Lorem ipsum dolor sit amet", | CODE |
| LOW⚡ | benchmarks/test_llm.py | 64 | "Lorem ipsum dolor sit amet", | CODE |
| LOW⚡ | benchmarks/test_llm.py | 72 | "Lorem ipsum dolor sit amet", | CODE |
| LOW⚡ | benchmarks/test_llm.py | 72 | "Lorem ipsum dolor sit amet", | CODE |
| LOW⚡ | torchrl/objectives/dreamer.py | 299 | fake_data = self.model_based_env.rollout( | CODE |
| LOW⚡ | torchrl/objectives/dreamer.py | 305 | next_tensordict = step_mdp(fake_data, keep_other=True) | CODE |
| LOW⚡ | torchrl/objectives/dreamer.py | 309 | reward = fake_data.get(("next", self.tensor_keys.reward)) | CODE |
| LOW⚡ | torchrl/objectives/dreamer.py | 312 | fake_data.set("lambda_target", lambda_target) | CODE |
| LOW | torchrl/objectives/dreamer.py | 325 | return loss_tensordict, fake_data.data | CODE |
| LOW⚡ | torchrl/objectives/dreamer.py | 427 | def forward(self, fake_data) -> torch.Tensor: | CODE |
| LOW⚡ | torchrl/objectives/dreamer.py | 428 | lambda_target = fake_data.get("lambda_target") | CODE |
| LOW⚡ | torchrl/objectives/dreamer.py | 430 | tensordict_select = fake_data.select(*self.value_model.in_keys, strict=False) | CODE |
| LOW | torchrl/objectives/dreamer.py | 463 | self._clear_weakrefs(fake_data, loss_tensordict) | CODE |
| LOW | torchrl/objectives/dreamer.py | 465 | return loss_tensordict, fake_data | CODE |
| LOW⚡ | torchrl/objectives/dreamer_v3.py | 755 | fake_data = self.model_based_env.rollout( | CODE |
| LOW⚡ | torchrl/objectives/dreamer_v3.py | 761 | next_tensordict = step_mdp(fake_data, keep_other=True) | CODE |
| LOW⚡ | torchrl/objectives/dreamer_v3.py | 766 | reward = fake_data.get(("next", self.tensor_keys.reward)) | CODE |
| LOW⚡ | torchrl/objectives/dreamer_v3.py | 772 | first_td = fake_data[..., :1].select( | CODE |
| LOW⚡ | torchrl/objectives/dreamer_v3.py | 789 | fake_data.set(self.tensor_keys.continuation, root_continuation) | CODE |
| LOW⚡ | torchrl/objectives/dreamer_v3.py | 790 | fake_data.set(("next", self.tensor_keys.continuation), continuation) | CODE |
| 13 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | test/llm/test_wrapper.py | 2389 | # Step 1: Generate the canonical response tokens with vLLM. | COMMENT |
| LOW⚡ | test/llm/test_wrapper.py | 2395 | # Step 2: Extract generated tokens and create new input for log-probs computation | COMMENT |
| LOW | test/llm/test_wrapper.py | 2438 | # Step 3: Create log-probs only wrappers | COMMENT |
| LOW | test/llm/test_wrapper.py | 2457 | # Step 4: Compute log-probs for the full sequence (original + generated) | COMMENT |
| LOW⚡ | benchmarks/test_storage_write_benchmark.py | 142 | # Step 1: Stack to contiguous (this allocates new memory) | COMMENT |
| LOW⚡ | benchmarks/test_storage_write_benchmark.py | 144 | # Step 2: Write to storage | COMMENT |
| LOW⚡ | benchmarks/test_storage_write_benchmark.py | 176 | # Step 1: Create lazy stack (no allocation, just wrapping) | COMMENT |
| LOW⚡ | benchmarks/test_storage_write_benchmark.py | 178 | # Step 2: Write to storage (storage handles the lazy stack) | COMMENT |
| LOW⚡ | torchrl/weight_update/_rpc.py | 181 | # Step 1: Signal the remote collector via RPC to start receiving (async) | COMMENT |
| LOW⚡ | torchrl/weight_update/_rpc.py | 185 | # Step 2: Send weights via torch.distributed (blocks until receiver calls recv()) | COMMENT |
| LOW⚡ | torchrl/weight_update/_rpc.py | 188 | # Step 3: Wait for RPC to complete (receiver has applied weights) | COMMENT |
| LOW⚡ | torchrl/weight_update/_rpc.py | 207 | # Step 1: Signal the remote collector via RPC to start receiving (async) | COMMENT |
| LOW⚡ | torchrl/weight_update/_rpc.py | 213 | # Step 2: Send weights asynchronously via torch.distributed | COMMENT |
| LOW⚡ | torchrl/weight_update/_ray.py | 206 | # Step 1: Signal the remote actor via Ray to start receiving (async) | COMMENT |
| LOW⚡ | torchrl/weight_update/_ray.py | 214 | # Step 2: Send weights via torch.distributed (async) | COMMENT |
| LOW⚡ | torchrl/weight_update/_ray.py | 218 | # Step 3: Wait for the Ray call to complete (receiver has applied weights) | COMMENT |
| LOW⚡ | torchrl/weight_update/_ray.py | 232 | # Step 1: Signal the actor via Ray to start receiving (async) | COMMENT |
| LOW⚡ | torchrl/weight_update/_ray.py | 242 | # Step 2: Send weights via torch.distributed (async) | COMMENT |
| LOW⚡ | torchrl/weight_update/llm/sglang_nccl.py | 604 | # Step 1: Send a single HTTP request with all weight metadata. | COMMENT |
| LOW⚡ | torchrl/weight_update/llm/sglang_nccl.py | 614 | # Step 2: Broadcast each weight tensor via NCCL in the same order. | COMMENT |
| LOW⚡ | torchrl/weight_update/llm/sglang_nccl.py | 623 | # Step 3: Wait for the HTTP response confirming server received all weights | COMMENT |
| LOW⚡ | torchrl/modules/llm/backends/vllm/vllm_async.py | 1190 | # Step 1: Start trainer NCCL group in a background thread — it blocks | COMMENT |
| LOW⚡ | torchrl/modules/llm/backends/vllm/vllm_async.py | 1204 | # Step 2: Dispatch init_weight_transfer_engine to all vLLM actors | COMMENT |
| LOW⚡ | torchrl/modules/llm/backends/vllm/vllm_async.py | 1220 | # Step 3: Wait for both sides to complete | COMMENT |
| LOW⚡ | torchrl/modules/llm/backends/vllm/vllm_async.py | 1293 | # Step 1: Tell all actors to start receiving weights | COMMENT |
| LOW⚡ | torchrl/modules/llm/backends/vllm/vllm_async.py | 1298 | # Step 2: Send weights from trainer side | COMMENT |
| LOW | torchrl/modules/llm/backends/vllm/vllm_async.py | 1317 | # Step 3: Wait for all actors to finish receiving | COMMENT |
| LOW⚡ | torchrl/modules/llm/backends/sglang/sglang_server.py | 707 | # Step 1: Signal server to expect this weight | COMMENT |
| LOW⚡ | torchrl/modules/llm/backends/sglang/sglang_server.py | 712 | # Step 2: Broadcast the weight via NCCL | COMMENT |
| LOW | torchrl/modules/distributions/discrete.py | 844 | # For token-level masking, we need to check if specific tokens are masked | COMMENT |
| LOW⚡ | tutorials/sphinx-tutorials/llm_browser.py | 81 | # Step 1: Basic Environment Configuration | COMMENT |
| LOW⚡ | tutorials/sphinx-tutorials/llm_browser.py | 189 | # Step 2: Tool Execution Helper | COMMENT |
| LOW⚡ | tutorials/sphinx-tutorials/llm_browser.py | 262 | # Step 3: Starting the Interaction | COMMENT |
| LOW⚡ | tutorials/sphinx-tutorials/llm_browser.py | 292 | # Step 4: Performing the Search | COMMENT |
| LOW⚡ | tutorials/sphinx-tutorials/llm_browser.py | 321 | # Step 5: Providing the Answer | COMMENT |
| LOW⚡ | tutorials/sphinx-tutorials/trl_interop.py | 50 | # Step 1: build and populate a replay buffer | COMMENT |
| LOW⚡ | tutorials/sphinx-tutorials/trl_interop.py | 77 | # Step 2: wrap the buffer as an IterableDataset | COMMENT |
| LOW⚡ | tutorials/sphinx-tutorials/trl_interop.py | 109 | # Step 3: key filtering | COMMENT |
| LOW⚡ | tutorials/sphinx-tutorials/trl_interop.py | 124 | # Step 4: device placement | COMMENT |
| LOW⚡ | tutorials/sphinx-tutorials/trl_interop.py | 137 | # Step 5: nested keys | COMMENT |
| LOW⚡ | tutorials/sphinx-tutorials/trl_interop.py | 181 | # Step 1: define a stand-in reward model | COMMENT |
| LOW⚡ | tutorials/sphinx-tutorials/trl_interop.py | 216 | # Step 2: wrap with default TorchRL token keys | COMMENT |
| LOW⚡ | tutorials/sphinx-tutorials/trl_interop.py | 234 | # Step 3: run a batch through the wrapper | COMMENT |
| LOW⚡ | tutorials/sphinx-tutorials/trl_interop.py | 256 | # Step 4: custom keys and nested reward key | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | torchrl/envs/transforms/_base.py | 211 | - Don't forget to edits the specs if needed: top level: :meth:`~torchrl.envs.Transform.transform_output_spec`, | STRING |
| MEDIUM | torchrl/data/llm/history.py | 316 | >>> # Now you can use it with auto-detection | CODE |
| MEDIUM | tutorials/sphinx-tutorials/dqn_with_rnn.py | 259 | # As mentioned earlier, we have one more optional transform to add to our | COMMENT |
| LOW | tutorials/sphinx-tutorials/dqn_with_rnn.py | 61 | # If you are running this in Google Colab, make sure you install the following dependencies: | COMMENT |
| LOW | tutorials/sphinx-tutorials/torchrl_envs.py | 277 | # To run this part of the tutorial, make sure you have installed dm_control: | COMMENT |
| MEDIUM | tutorials/sphinx-tutorials/getting-started-1.py | 310 | # - Have a look at how you can use an RNN within the policy (a | COMMENT |
| MEDIUM⚡ | …orials/sphinx-tutorials/multiagent_competitive_ddpg.py | 948 | # Finally, you can modify the parameters of this tutorial to try many other configurations and scenarios | COMMENT |
| MEDIUM⚡ | …orials/sphinx-tutorials/multiagent_competitive_ddpg.py | 952 | # Here are a few videos of some possible scenarios you can try in VMAS. | COMMENT |
| MEDIUM | …orials/sphinx-tutorials/multiagent_competitive_ddpg.py | 663 | # To store your buffer on the GPU, you can use :class:`~torchrl.data.replay_buffers.LazyTensorStorage`, passing the desi | COMMENT |
| LOW | …orials/sphinx-tutorials/multiagent_competitive_ddpg.py | 43 | # If you are running this in Google Colab, make sure you install the following dependencies: | COMMENT |
| MEDIUM | tutorials/sphinx-tutorials/getting-started-4.py | 31 | # portable CSV logger (:class:`~torchrl.record.loggers.csv.CSVLogger`) that you can use | COMMENT |
| MEDIUM | tutorials/sphinx-tutorials/export.py | 335 | # Here's an example of how you can use AOTInductor to export your policy, inspired by the | COMMENT |
| MEDIUM⚡ | tutorials/sphinx-tutorials/multiagent_ppo.py | 798 | # Finally, you can modify the parameters of this tutorial to try many other configurations and scenarios | COMMENT |
| MEDIUM⚡ | tutorials/sphinx-tutorials/multiagent_ppo.py | 800 | # Here are a few videos of some possible scenarios you can try in VMAS. | COMMENT |
| LOW | tutorials/sphinx-tutorials/multiagent_ppo.py | 43 | # If you are running this in Google Colab, make sure you install the following dependencies: | COMMENT |
| LOW | tutorials/sphinx-tutorials/coding_ddpg.py | 283 | # When computing this value, we must make sure to take the value parameters out | COMMENT |
| LOW | tutorials/sphinx-tutorials/getting-started-2.py | 111 | # loss. If you want to make sure you're fully in control of what is happening, | COMMENT |
| LOW | tutorials/sphinx-tutorials/coding_ppo.py | 39 | # If you are running this in Google Colab, make sure you install the following dependencies: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL⚡ | test/test_render.py | 1304 | env.base_env.unwrapped.data.qpos.copy(), | CODE |
| CRITICAL⚡ | test/test_render.py | 1310 | env.base_env.unwrapped.data.qpos.copy(), | CODE |
| CRITICAL | torchrl/envs/libs/gym.py | 800 | return gym.envs.registration.registry.env_specs.keys() | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | test/llm/test_data.py | 889 | CODE | |
| MEDIUM | test/llm/test_data.py | 892 | CODE | |
| MEDIUM | test/objectives/test_bc.py | 41 | CODE | |
| MEDIUM | test/objectives/test_bc.py | 42 | CODE | |
| MEDIUM | torchrl/envs/common.py | 1069 | CODE | |
| MEDIUM | torchrl/envs/transforms/_normalization.py | 912 | CODE | |
| MEDIUM | torchrl/envs/transforms/_normalization.py | 913 | CODE | |
| MEDIUM | torchrl/envs/transforms/_normalization.py | 915 | CODE | |
| MEDIUM | torchrl/envs/transforms/_normalization.py | 916 | CODE | |
| MEDIUM | torchrl/envs/transforms/_normalization.py | 917 | CODE | |
| MEDIUM | torchrl/envs/transforms/_normalization.py | 918 | CODE | |
| MEDIUM | torchrl/envs/transforms/_normalization.py | 919 | CODE | |
| MEDIUM | torchrl/envs/transforms/_normalization.py | 924 | CODE | |
| MEDIUM | torchrl/envs/transforms/_normalization.py | 925 | CODE | |
| MEDIUM | torchrl/envs/transforms/_normalization.py | 937 | CODE | |
| MEDIUM | torchrl/envs/transforms/_normalization.py | 938 | CODE | |
| MEDIUM | torchrl/envs/transforms/_normalization.py | 939 | CODE | |
| MEDIUM | torchrl/envs/transforms/_normalization.py | 941 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tutorials/sphinx-tutorials/rb_tutorial.py | 807 | # ``("collector", "traj_ids")``. In this example, we construct data | COMMENT |
| HIGH | tutorials/sphinx-tutorials/pendulum.py | 304 | # In this example, we do not pass a done state as this is not mandatory | COMMENT |
| HIGH | tutorials/sphinx-tutorials/pendulum.py | 850 | # In this example, we will train a simple policy using the reward as a | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/build_local.sh | 4 | # Usage: | COMMENT |
| LOW | …b/unittest/helpers/assert_torch_tensordict_versions.sh | 4 | # Usage: | COMMENT |
| LOW | .github/unittest/helpers/assert_torch_version.sh | 4 | # Usage: | COMMENT |
| LOW | .github/workflows/auto-tag.yml | 3 | # Usage: | COMMENT |
| LOW | .github/workflows/assign.yml | 3 | # Usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | torchrl/envs/llm/libs/mlgym.py | 228 | # TODO: implement add commands method in environment | COMMENT |
| LOW | torchrl/data/map/tree.py | 228 | # TODO: implement specs | COMMENT |
| LOW | torchrl/data/map/tree.py | 245 | # TODO: implement specs | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/test_docstring_args_checker.py | 31 | def helper(first, second): | STRING |
| LOW | test/test_docstring_args_checker.py | 71 | def helper(first, second, *, mode="strict", retries=0): | STRING |
| LOW | test/test_docstring_args_checker.py | 93 | def helper(first, second, *, mode="strict", retries=0): | STRING |
| LOW | torchrl/_utils.py | 246 | >>> def my_function(): | STRING |
| LOW | torchrl/_utils.py | 1319 | ... def my_function(): | STRING |