Repository Analysis

microsoft/agent-lightning

The absolute trainer to light up AI agents.

17.3 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of microsoft/agent-lightning, a Python project with 17,387 GitHub stars. SynthScan v2.0 examined 144,302 lines of code across 527 source files, recording 1984 pattern matches distributed across 24 syntactic categories. The overall adjusted score of 17.3 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).

17.3
Adjusted Score
17.3
Raw Score
100%
Time Factor
2026-04-29
Last Push
17.4K
Stars
Python
Language
144.3K
Lines of Code
527
Files
2.0K
Pattern Hits
2026-07-14
Scan Date
0.15
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

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.

CRITICAL 4HIGH 75MEDIUM 123LOW 1782

Directory Score Breakdown

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.

Pattern Findings

The scanner identified 1984 distinct pattern matches across 24 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.

Hyper-Verbose Identifiers1078 hits · 952 pts
SeverityFileLineSnippetContext
LOWtests/test_env_var.py15def test_resolve_bool_env_var_override_takes_precedence(monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOWtests/test_env_var.py33def test_resolve_bool_env_var_parses_truthy_and_falsy_values(CODE
LOWtests/test_env_var.py42def test_resolve_bool_env_var_returns_fallback_when_unset(monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOWtests/test_env_var.py49def test_resolve_bool_env_var_rejects_invalid_value(monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOWtests/test_env_var.py57def test_resolve_int_env_var_reads_from_environment(monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOWtests/test_env_var.py64def test_resolve_int_env_var_invalid_input(monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOWtests/test_env_var.py72def test_resolve_str_env_var_override_and_fallback(monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOWtests/test_logging.py167def _logging_worker_files_string(queue: Queue[Dict[str, Any]], base_dir: str) -> None:CODE
LOWtests/test_logging.py207def _logging_worker_files_mapping(queue: Queue[Dict[str, Any]], base_dir: str) -> None:CODE
LOWtests/test_logging.py286def test_to_level_value_int_and_str() -> None:CODE
LOWtests/test_logging.py296def test_setup_module_plain_console_spawn() -> None:CODE
LOWtests/test_logging.py310def test_setup_module_color_rich_spawn() -> None:CODE
LOWtests/test_logging.py323def test_setup_with_submodules_apply_to_and_capture_warnings_spawn() -> None:CODE
LOWtests/test_logging.py343def test_setup_with_console_and_extra_handler_spawn() -> None:CODE
LOWtests/test_logging.py355def test_setup_files_string_spawn(tmp_path: Path) -> None:CODE
LOWtests/test_logging.py383def test_setup_files_mapping_spawn(tmp_path: Path) -> None:CODE
LOWtests/test_config.py185def test_get_param_type_details(CODE
LOWtests/test_config.py226def test_determine_argparse_type_and_nargs(CODE
LOWtests/test_config.py324def test_add_argument_for_parameter(CODE
LOWtests/test_config.py360def test_add_arguments_for_class(mock_parser: Any) -> None:CODE
LOWtests/test_config.py388def test_add_arguments_for_class_no_init_params(mock_parser: Any) -> None:CODE
LOWtests/test_config.py397def test_create_argument_parser() -> None:CODE
LOWtests/test_config.py455def test_instantiate_classes_error_handling(caplog):CODE
LOWtests/test_config.py484def test_lightning_cli_no_classes():CODE
LOWtests/test_config.py489def test_lightning_cli_simple_config():CODE
LOWtests/test_config.py502def test_lightning_cli_complex_config_types():CODE
LOWtests/test_config.py543def test_lightning_cli_complex_config_defaults():CODE
LOWtests/test_config.py560def test_lightning_cli_multiple_classes():CODE
LOWtests/test_config.py587def test_lightning_cli_missing_required_arg_exits(capsys):CODE
LOWtests/test_config.py596def test_lightning_cli_optional_no_default_behavior():CODE
LOWtests/test_client.py70async def test_uri_and_semantic_correctness(server_setup: Dict[str, Any], sample_resources: NamedResources):CODE
LOWtests/test_client.py102async def test_full_lifecycle_async(CODE
LOWtests/test_client.py200async def test_task_timeout_and_requeue(server_setup: Dict[str, Any]):CODE
LOWtests/test_client.py238async def test_error_handling_no_resources(server_setup: Dict[str, Any]):CODE
LOWtests/test_client.py257async def test_client_with_bad_endpoint():CODE
LOWtests/test_client.py274def test_local_client_core_functionality(sample_resources: NamedResources):CODE
LOWtests/test_client.py338def test_local_client_error_handling(sample_resources: NamedResources):CODE
LOWtests/test_client.py369async def test_local_client_async_methods(sample_resources: NamedResources):CODE
LOWtests/benchmark/analysis.py254def histogram_sum_metric_name(bucket_metric: str) -> str:CODE
LOWtests/benchmark/analysis.py260def histogram_count_metric_name(bucket_metric: str) -> str:CODE
LOWtests/benchmark/analysis.py407def gather_collection_throughput(CODE
LOWtests/benchmark/analysis.py747def render_metric_group_table(CODE
LOWtests/benchmark/benchmark_store.py228 async def algorithm_batch_with_completion_threshold(self, total_tasks: int, batch_size: int, remaining_tasks: int):CODE
LOWtests/benchmark/micro_benchmark.py123def simulate_many_update_workers(store_url: str) -> BenchmarkSummary:CODE
LOWtests/benchmark/micro_benchmark.py162def simulate_dequeue_empty_and_update_workers(store_url: str) -> BenchmarkSummary:CODE
LOWtests/benchmark/micro_benchmark.py214def simulate_rollout_with_spans(store_url: str, spans_per_attempt: int = 4) -> BenchmarkSummary:CODE
LOWtests/benchmark/micro_benchmark.py349def dequeue_and_update_attempts(store_url: str, spans_per_attempt: int = 4) -> BenchmarkSummary:CODE
LOWtests/benchmark/micro_benchmark.py27async def _enqueue_rollouts_for_benchmark(store_url: str, *, total_rollouts: int, task_prefix: str) -> None:CODE
LOWtests/benchmark/micro_benchmark.py143def _dequeue_empty_and_update_workers_task(args: tuple[str, str, str]) -> bool:CODE
LOWtests/benchmark/micro_benchmark.py273 async def _query_remaining_rollouts() -> List[str]:CODE
LOWtests/benchmark/micro_benchmark.py294def _dequeue_and_update_attempt_task(args: tuple[str, str, str, int]) -> bool:CODE
LOWtests/benchmark/micro_benchmark.py381def benchmark_multi_metrics_backend(iterations: int = 10_000_000) -> BenchmarkSummary:CODE
LOWtests/tracer/test_dummy.py18def test_dummy_tracer_create_span_uses_defaults(monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOWtests/tracer/test_dummy.py32def test_dummy_tracer_operation_context_records_span(monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOWtests/tracer/test_dummy.py49def test_dummy_tracer_operation_context_records_exceptions(monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOWtests/tracer/test_dummy.py71def test_set_active_tracer_returns_same_instance() -> None:CODE
LOWtests/tracer/test_dummy.py77def test_set_active_tracer_raises_when_existing() -> None:CODE
LOWtests/tracer/test_dummy.py83def test_clear_active_tracer_removes_current() -> None:CODE
LOWtests/tracer/test_agentops.py134def test_agentops_tracer_create_span(agentops_tracer: AgentOpsTracer) -> None:CODE
LOWtests/tracer/test_agentops.py152def test_agentops_tracer_operation_context_records_exception(agentops_tracer: AgentOpsTracer) -> None:CODE
1018 more matches not shown…
Docstring Block Structure66 hits · 330 pts
SeverityFileLineSnippetContext
HIGHcontrib/recipes/webshop/agl/tasks.py47Load tasks from a JSON or Parquet file. Args: path: Path to the tasks file (JSON or Parquet format). RSTRING
HIGHcontrib/recipes/envs/add_instruction.py35 Retrieve an instruction string from INSTRUCTION_MAP based on the given type. Args: type (str): InstrucSTRING
HIGHcontrib/recipes/envs/add_instruction.py88 Append an instruction to a single prompt or a chat-style prompt. - If `prompt` is a string, the instruction isSTRING
HIGH…b/agentlightning/contrib/algorithm/env_verl/trainer.py261Compute reference log probability using the correct worker based on LoRA configuration. In verl 0.6.0+, when LoSTRING
HIGHexamples/chartqa/multimodal_utils.py28 Encode an image to base64 string for multimodal LLM APIs. Args: image: Image source (file path, URL, oSTRING
HIGHexamples/chartqa/multimodal_utils.py87 Create an OpenAI-compatible multimodal message. Args: text: The text prompt/question image: ImSTRING
HIGHexamples/claude_code/claude_code_controller.py186Runs the agent on a specific SWE-bench instance. This method orchestrates the agent execution via the specifiedSTRING
HIGHexamples/claude_code/swebench_utils/docker_runtime.py377 Start a Docker container session for repository testing. Args: image_name (str): Base DockSTRING
HIGHagentlightning/logging.py19Create or reset a namespaced logger with a consistent console format. This helper clears any previously attached haSTRING
HIGHagentlightning/logging.py109Configures logging for the `agentlightning` logger hierarchy. This function provides a one-stop setup utility for cSTRING
HIGHagentlightning/llm_proxy.py84Extract LiteLLM request payload from hook args. The LiteLLM logger hooks receive `(*args, **kwargs)` whose third poSTRING
HIGHagentlightning/llm_proxy.py1321Create an `LLM` resource pointing at this proxy with rollout context. The returned endpoint is: `htSTRING
HIGHagentlightning/tracer/base.py141Notify the tracer that a span should be created here. It uses a fire-and-forget approach and doesn't wait for tSTRING
HIGHagentlightning/tracer/base.py163Start to record an operation to a span. Args: name: The name of the operation. attributSTRING
HIGHagentlightning/types/resources.py111Return the routed endpoint for a specific rollout/attempt pair. Args: rollout_id: Identifier of theSTRING
HIGHagentlightning/types/tracer.py390Build a synthetic span from raw attributes. Different from the [`from_opentelemetry`][agentlightning.Span.from_oSTRING
HIGHagentlightning/emitter/annotation.py315Entry point for tracking operations. This helper can be used either as a decorator or as a context manager. TheSTRING
HIGHagentlightning/emitter/reward.py155Emit a reward value as an OpenTelemetry span. Examples: Emit a single-dimensional reward: >>> emit_STRING
HIGHagentlightning/runner/agent.py802Execute a single task directly, bypassing the task queue. This method creates a new rollout for the given inputSTRING
HIGHagentlightning/runner/base.py165Execute a single task with the given input. This method provides fine-grained control for executing individual STRING
HIGHagentlightning/utils/metrics.py41Validates label keys against the metric definition. Args: kind: Metric kind for error messages ("counter" oSTRING
HIGHagentlightning/utils/id.py10Generate a random hexadecimal ID of the given length. Args: length: The desired length of the generated ID.STRING
HIGHagentlightning/utils/otel.py146Resolve the OpenTelemetry tracer configured for Agent Lightning. Args: use_active_span_processor: Whether tSTRING
HIGHagentlightning/utils/otel.py291Filter attributes that start with the given prefix. The attribute must start with `prefix.` or be exactly `prefix` STRING
HIGHagentlightning/utils/otel.py306Filter attributes that start with the given prefix and unflatten them. The prefix will be removed during unflatteninSTRING
HIGHagentlightning/adapter/messages.py212Yield tool call payloads for a completion span. Args: completion: The completion span whose descendSTRING
HIGHagentlightning/adapter/triplet.py227Construct a tree from a flat list of spans. Args: spans: Spans that collectively form a single tracSTRING
HIGHagentlightning/algorithm/decorator.py159Execute the wrapped function with injected dependencies. Args: train_dataset: Optional training datSTRING
HIGHagentlightning/algorithm/decorator.py226Convert a callable into a [`FunctionalAlgorithm`][agentlightning.algorithm.decorator.FunctionalAlgorithm]. The decoSTRING
HIGHagentlightning/algorithm/fast.py38Reference implementation that streams the full dataset through the rollout queue. The baseline algorithm batches taSTRING
HIGHagentlightning/algorithm/apo/apo.py517 Initialize the beam search with seed prompt and dataset iterators. Args: train_dataset: DaSTRING
HIGHagentlightning/algorithm/apo/apo.py696 Evaluate all candidate prompts on validation data and select top-k for the beam. Args: canSTRING
HIGHagentlightning/verl/trainer.py209Compute reference log probability using the correct worker based on LoRA configuration. In verl 0.6.0+, when LoSTRING
HIGHagentlightning/litagent/decorator.py141Execute a synchronous rollout using the wrapped function. Args: task: Task input data. STRING
HIGHagentlightning/litagent/decorator.py161Execute an asynchronous rollout using the wrapped function. Args: task: Task input data. STRING
HIGHagentlightning/litagent/decorator.py207Retrieve the first LLM resource from the available resources. Strip the ProxyLLM resource into a LLM resource iSTRING
HIGHagentlightning/litagent/decorator.py238Retrieve the first prompt template resource from the available resources. Args: resources: Mapping STRING
HIGHagentlightning/litagent/decorator.py266Convert [`ProxyLLM`][agentlightning.ProxyLLM] instances into concrete LLMs. It resolves ProxyLLM instances to tSTRING
HIGHagentlightning/litagent/decorator.py307Create a [`FunctionalLitAgent`][agentlightning.litagent.decorator.FunctionalLitAgent] for LLM-based rollouts. Args:STRING
HIGHagentlightning/litagent/decorator.py353Validate the function signature of an LLM rollout function. Ensures the function follows the expected pattern for LSTRING
HIGHagentlightning/litagent/decorator.py394Create a [`FunctionalLitAgent`][agentlightning.litagent.decorator.FunctionalLitAgent] for prompt-based rollouts. ThSTRING
HIGHagentlightning/litagent/decorator.py435Validate the function signature of a prompt rollout function. Ensures the function follows the expected pattern forSTRING
HIGHagentlightning/litagent/decorator.py466Create a [`FunctionalLitAgent`][agentlightning.litagent.decorator.FunctionalLitAgent] from an arbitrary rollout functionSTRING
HIGHagentlightning/trainer/init_utils.py152Build and return a component instance from a flexible specification. This function provides a flexible way to creatSTRING
HIGHagentlightning/store/base.py167Register a rollout and immediately create its first attempt. !!! note Use [`enqueue_rollout()`][ageSTRING
HIGHagentlightning/store/base.py208Persist a rollout in `queuing` state so runners can claim it later. !!! note Different from [`startSTRING
HIGHagentlightning/store/base.py251Claim the oldest queued rollout and transition it to `preparing`. This function do not block. RetrievaSTRING
HIGHagentlightning/store/base.py301Create a manual retry attempt for an existing rollout. This is typically invoked by runners that wish to retry STRING
HIGHagentlightning/store/base.py331Persist a pre-constructed span emitted during rollout execution. The provided [`Span`][agentlightning.Span] musSTRING
HIGHagentlightning/store/base.py362Convert and persist an OpenTelemetry span for a particular attempt. Implementations must transform the `readablSTRING
HIGHagentlightning/store/base.py401Retrieve rollouts filtered by status and/or explicit identifiers. This interface supports structured filtering,STRING
HIGHagentlightning/store/base.py442Return every attempt ever created for `rollout_id` in ascending sequence order. The parameters allow callers toSTRING
HIGHagentlightning/store/base.py466Fetch a rollout by identifier without mutating its state. Args: rollout_id: Identifier to retrieve.STRING
HIGHagentlightning/store/base.py480Fetch the attempt with the highest `sequence_id` for `rollout_id`. Args: rollout_id: Identifier to STRING
HIGHagentlightning/store/base.py505List every stored resource snapshot in insertion order. Supports lightweight filtering, sorting, and paginationSTRING
HIGHagentlightning/store/base.py530Return a specific named resource snapshot by identifier. Args: resources_id: Identifier of the snapSTRING
HIGHagentlightning/store/base.py556Allocate the next strictly increasing sequence number used to order spans. Implementations must retain countersSTRING
HIGHagentlightning/store/base.py594Block until the targeted rollouts reach a terminal status or the timeout expires. Terminal statuses are `"succeSTRING
HIGHagentlightning/store/base.py641Return the stored spans for a rollout, optionally scoped to one attempt. Supports a handful of filters that covSTRING
HIGHagentlightning/store/base.py682Persist a new immutable snapshot of named resources and mark it as latest. Implementations must assign a fresh STRING
6 more matches not shown…
Unused Imports229 hits · 224 pts
SeverityFileLineSnippetContext
LOWtests/test_env_var.py3CODE
LOWtests/test_logging.py3CODE
LOWtests/test_config.py16CODE
LOWtests/test_config.py17CODE
LOWtests/benchmark/analysis.py5CODE
LOWtests/benchmark/collection_benchmark.py5CODE
LOWtests/benchmark/micro_benchmark.py5CODE
LOWtests/tracer/test_dummy.py3CODE
LOWtests/tracer/test_agentops.py3CODE
LOWtests/tracer/test_weave.py3CODE
LOWtests/tracer/test_otel.py5CODE
LOWtests/emitter/test_message.py3CODE
LOWtests/emitter/test_exception.py3CODE
LOWtests/emitter/test_object.py3CODE
LOWtests/emitter/test_annotation.py3CODE
LOWtests/emitter/test_operation.py3CODE
LOWtests/llm_proxy/test_stream.py3CODE
LOWtests/utils/test_otlp.py5CODE
LOWtests/utils/test_system_snapshot.py3CODE
LOWtests/utils/test_metrics.py5CODE
LOWtests/utils/test_server_launcher.py3CODE
LOWtests/utils/test_otel.py3CODE
LOWtests/algorithm/test_utils.py3CODE
LOWtests/common/prometheus_stub.py3CODE
LOWtests/common/tracer.py3CODE
LOWtests/execution/test_client_server.py3CODE
LOWtests/trainer/test_trainer_init.py3CODE
LOWtests/trainer/test_trainer_dev.py5CODE
LOWtests/trainer/sample_components.py3CODE
LOWtests/store/conftest.py3CODE
LOWtests/store/test_collection.py3CODE
LOWdocs/macros/source_links.py3CODE
LOWcontrib/recipes/search_r1/search_r1_agent.py3CODE
LOWcontrib/recipes/search_r1/train_search_r1_agent.py4CODE
LOWcontrib/recipes/agentos/demo_governed_training.py23CODE
LOWcontrib/recipes/webshop/tests/test_span_adapter.py14CODE
LOWcontrib/recipes/webshop/tests/test_span_adapter.py19CODE
LOWcontrib/recipes/webshop/server/webshop_server.py71CODE
LOWcontrib/recipes/webshop/agl/tasks.py17CODE
LOWcontrib/recipes/webshop/agl/config.py16CODE
LOWcontrib/recipes/webshop/agl/generate_tasks.py26CODE
LOWcontrib/recipes/webshop/agl/run_training.py39CODE
LOWcontrib/recipes/envs/prompt_builder.py3CODE
LOWcontrib/recipes/envs/empo2_server/server_bert.py4CODE
LOWcontrib/recipes/envs/empo2_server/server_bert.py9CODE
LOWcontrib/agentlightning/contrib/runner/agentos.py10CODE
LOWcontrib/agentlightning/contrib/agent/env_agent.py3CODE
LOWcontrib/agentlightning/contrib/adapter/triplet_group.py3CODE
LOWcontrib/agentlightning/contrib/adapter/triplet_group.py5CODE
LOWcontrib/agentlightning/contrib/adapter/agentos.py10CODE
LOW…b/agentlightning/contrib/algorithm/env_verl/trainer.py5CODE
LOWcontrib/agentlightning/contrib/reward/agentos.py10CODE
LOWexamples/chartqa/chartqa_agent.py17CODE
LOWexamples/chartqa/debug_chartqa_agent.py26CODE
LOWexamples/chartqa/multimodal_utils.py10CODE
LOWexamples/chartqa/train_chartqa_agent.py20CODE
LOWexamples/tinker/hello.py35CODE
LOWexamples/tinker/q20_agent.py13CODE
LOWexamples/tinker/q20_evaluate.py33CODE
LOWexamples/tinker/q20_train.py33CODE
169 more matches not shown…
Decorative Section Separators56 hits · 204 pts
SeverityFileLineSnippetContext
MEDIUMtests/execution/test_client_server.py151# =========================COMMENT
MEDIUMtests/execution/test_client_server.py153# =========================COMMENT
MEDIUMtests/execution/test_client_server.py291# =========================COMMENT
MEDIUMtests/execution/test_client_server.py293# =========================COMMENT
MEDIUMtests/execution/test_client_server.py423# =========================COMMENT
MEDIUMtests/execution/test_client_server.py425# =========================COMMENT
MEDIUMtests/execution/test_client_server.py665# =========================COMMENT
MEDIUMtests/execution/test_client_server.py667# =========================COMMENT
MEDIUMtests/execution/test_client_server.py886# =========================COMMENT
MEDIUMtests/execution/test_client_server.py888# =========================COMMENT
MEDIUMtests/execution/test_client_server.py28# =========================COMMENT
MEDIUMtests/execution/test_client_server.py30# =========================COMMENT
MEDIUMtests/execution/test_client_server.py67# =========================COMMENT
MEDIUMtests/execution/test_client_server.py69# =========================COMMENT
MEDIUMcontrib/recipes/webshop/scripts/run_stack.sh94# ==============================================================================COMMENT
MEDIUMcontrib/recipes/webshop/scripts/run_stack.sh96# ==============================================================================COMMENT
MEDIUMcontrib/recipes/webshop/scripts/run_stack.sh140# ==============================================================================COMMENT
MEDIUMcontrib/recipes/webshop/scripts/run_stack.sh142# ==============================================================================COMMENT
MEDIUMcontrib/recipes/webshop/scripts/run_stack.sh154# ==============================================================================COMMENT
MEDIUMcontrib/recipes/webshop/scripts/run_stack.sh156# ==============================================================================COMMENT
MEDIUMcontrib/recipes/webshop/scripts/run_stack.sh173# ==============================================================================COMMENT
MEDIUMcontrib/recipes/webshop/scripts/run_stack.sh175# ==============================================================================COMMENT
MEDIUMcontrib/recipes/webshop/scripts/run_stack.sh181# ==============================================================================COMMENT
MEDIUMcontrib/recipes/webshop/scripts/run_stack.sh183# ==============================================================================COMMENT
MEDIUMcontrib/recipes/webshop/scripts/run_stack.sh210# ==============================================================================COMMENT
MEDIUMcontrib/recipes/webshop/scripts/run_stack.sh212# ==============================================================================COMMENT
MEDIUM…envs/config_verl/alfworld/grpo_qwen_1.5b_instruct.yaml1# ==========================COMMENT
MEDIUM…envs/config_verl/alfworld/grpo_qwen_1.5b_instruct.yaml3# ==========================COMMENT
MEDIUM…envs/config_verl/alfworld/grpo_qwen_1.5b_instruct.yaml16# ==========================COMMENT
MEDIUM…envs/config_verl/alfworld/grpo_qwen_1.5b_instruct.yaml18# ==========================COMMENT
MEDIUMcontrib/recipes/envs/config_verl/alfworld/grpo.yaml1# ==========================COMMENT
MEDIUMcontrib/recipes/envs/config_verl/alfworld/grpo.yaml3# ==========================COMMENT
MEDIUMcontrib/recipes/envs/config_verl/alfworld/grpo.yaml16# ==========================COMMENT
MEDIUMcontrib/recipes/envs/config_verl/alfworld/grpo.yaml18# ==========================COMMENT
MEDIUM…s/config_verl/scienceworld/empo2_qwen_7b_instruct.yaml1# ==========================COMMENT
MEDIUM…s/config_verl/scienceworld/empo2_qwen_7b_instruct.yaml3# ==========================COMMENT
MEDIUM…s/config_verl/scienceworld/empo2_qwen_7b_instruct.yaml19# ==========================COMMENT
MEDIUM…s/config_verl/scienceworld/empo2_qwen_7b_instruct.yaml21# ==========================COMMENT
MEDIUM…vs/config_verl/scienceworld/grpo_qwen_7b_instruct.yaml1# ==========================COMMENT
MEDIUM…vs/config_verl/scienceworld/grpo_qwen_7b_instruct.yaml3# ==========================COMMENT
MEDIUM…vs/config_verl/scienceworld/grpo_qwen_7b_instruct.yaml18# ==========================COMMENT
MEDIUM…vs/config_verl/scienceworld/grpo_qwen_7b_instruct.yaml20# ==========================COMMENT
MEDIUM…/config_verl/scienceworld/grpo_qwen_1.5b_instruct.yaml1# ==========================COMMENT
MEDIUM…/config_verl/scienceworld/grpo_qwen_1.5b_instruct.yaml3# ==========================COMMENT
MEDIUM…/config_verl/scienceworld/grpo_qwen_1.5b_instruct.yaml17# ==========================COMMENT
MEDIUM…/config_verl/scienceworld/grpo_qwen_1.5b_instruct.yaml19# ==========================COMMENT
MEDIUMcontrib/recipes/envs/config_verl/scienceworld/grpo.yaml1# ==========================COMMENT
MEDIUMcontrib/recipes/envs/config_verl/scienceworld/grpo.yaml3# ==========================COMMENT
MEDIUMcontrib/recipes/envs/config_verl/scienceworld/grpo.yaml17# ==========================COMMENT
MEDIUMcontrib/recipes/envs/config_verl/scienceworld/grpo.yaml19# ==========================COMMENT
MEDIUMagentlightning/tracer/otel.py408 # ---------------------------------------------------------------------------COMMENT
MEDIUMagentlightning/tracer/otel.py427 # ---------------------------------------------------------------------------COMMENT
MEDIUMagentlightning/instrumentation/weave.py309 # ==========================================COMMENT
MEDIUMagentlightning/instrumentation/weave.py311 # ==========================================COMMENT
MEDIUMagentlightning/store/collection/memory.py243 # -------------------------------------------------------------------------COMMENT
MEDIUMagentlightning/store/collection/memory.py245 # -------------------------------------------------------------------------COMMENT
Excessive Try-Catch Wrapping163 hits · 178 pts
SeverityFileLineSnippetContext
LOWtests/benchmark/collection_benchmark.py410 except Exception as exc:CODE
LOWtests/benchmark/collection_benchmark.py439 except Exception:CODE
LOWtests/benchmark/collection_benchmark.py464 except Exception:CODE
MEDIUMtests/benchmark/micro_benchmark.py117 console.print(f"Error updating worker {worker_id} for task {task_id}: {e}")CODE
MEDIUMtests/benchmark/micro_benchmark.py156 console.print(f"Error dequeueing empty and updating worker {worker_id} for task {task_id}: {e}")CODE
MEDIUMtests/benchmark/micro_benchmark.py208 console.print(f"Error running rollout task {task_id}: {e}")CODE
MEDIUMtests/benchmark/micro_benchmark.py343 console.print(f"Error dequeueing and updating worker {worker_id} for task {task_id}: {e}")CODE
MEDIUMtests/benchmark/micro_benchmark.py248 console.print(f"Error dequeueing only worker {worker_id} for task {task_id}: {e}")CODE
LOWtests/benchmark/micro_benchmark.py116 except Exception as e:CODE
LOWtests/benchmark/micro_benchmark.py155 except Exception as e:CODE
LOWtests/benchmark/micro_benchmark.py207 except Exception as e:CODE
LOWtests/benchmark/micro_benchmark.py342 except Exception as e:CODE
LOWtests/benchmark/micro_benchmark.py42 except Exception:CODE
LOWtests/benchmark/micro_benchmark.py247 except Exception as e:CODE
LOWtests/tracer/test_integration.py121 except Exception:CODE
LOWtests/tracer/test_otel.py416 except Exception as e:CODE
LOWtests/tracer/test_otel.py568 except Exception as exc: # pragma: no cover - defensive pathCODE
LOWtests/tracer/test_otel.py571 except Exception:CODE
LOWtests/llm_proxy/test_stream.py65 except Exception:CODE
LOWtests/llm_proxy/test_stream.py100 except Exception:CODE
LOWtests/llm_proxy/test_stream.py121 except Exception:CODE
LOWtests/llm_proxy/test_stream.py143 except Exception:CODE
LOWtests/llm_proxy/test_stream.py156 except Exception:CODE
LOWtests/llm_proxy/test_stream.py169 except Exception:CODE
LOWtests/utils/test_system_snapshot.py120 except Exception:CODE
LOWtests/utils/test_server_launcher.py114 except Exception as exc: # server may not be up yetCODE
LOWtests/common/vllm.py148 except Exception:CODE
LOWtests/store/conftest.py204 except Exception as exc: # depends on external serviceCODE
LOWtests/store/test_client_server.py1212 except Exception as e:CODE
LOWdocs/tutorials/debug.md215 except Exception:CODE
LOWcontrib/recipes/search_r1/retrieval_server.py222 except Exception: # pragma: no cover - typing convenienceCODE
LOWcontrib/recipes/search_r1/retrieval_server.py236 except Exception:CODE
LOWcontrib/recipes/search_r1/search_r1_agent.py175 except Exception as e:CODE
LOWcontrib/recipes/agentos/demo_governed_training.py110 except Exception:CODE
LOWcontrib/recipes/webshop/server/webshop_server.py206 except Exception as e:CODE
LOWcontrib/recipes/webshop/server/webshop_server.py262 except Exception as e:CODE
LOWcontrib/recipes/webshop/server/webshop_server.py313 except Exception as e:CODE
LOWcontrib/agentlightning/contrib/agent/env_agent.py115 except Exception as e:CODE
LOWcontrib/agentlightning/contrib/agent/empo2_agent.py164 except Exception as e:CODE
LOWcontrib/agentlightning/contrib/adapter/agentos.py112 except Exception as e:CODE
LOW…ib/agentlightning/contrib/algorithm/env_verl/daemon.py457 except Exception as e:CODE
LOW…ib/agentlightning/contrib/algorithm/env_verl/daemon.py571 except Exception as e:CODE
MEDIUM…ib/agentlightning/contrib/algorithm/env_verl/daemon.py572 print(f"Error while waiting for tasks to finish: {e}")CODE
LOWexamples/calc_x/legacy_calc_agent.py77 except Exception as e:CODE
LOWexamples/calc_x/eval_utils.py57 except Exception:CODE
LOWexamples/calc_x/calc_agent.py100 except Exception as e:CODE
LOWexamples/chartqa/chartqa_agent.py125 except Exception as e:CODE
LOWexamples/chartqa/chartqa_agent.py166 except Exception as e:CODE
LOWexamples/chartqa/chartqa_agent.py370 except Exception as e:CODE
LOWexamples/chartqa/chartqa_agent.py406 except Exception as e:CODE
LOWexamples/tinker/q20_agent.py288 except Exception as e:CODE
LOWexamples/tinker/q20_evaluate.py170 except Exception as e:CODE
LOWexamples/tinker/q20_train.py121 except Exception:CODE
MEDIUMexamples/tinker/q20_train.py122 console.print(f"Error in q20_agent: {traceback.format_exc()}")CODE
LOWexamples/claude_code/claude_code_agent.py188 except Exception as e:CODE
LOWexamples/claude_code/claude_code_agent.py302 except Exception as e:CODE
LOWexamples/claude_code/claude_code_agent.py416 except Exception as e:CODE
LOWexamples/claude_code/swebench_utils/evaluation.py217 except Exception as e:CODE
LOWexamples/claude_code/swebench_utils/docker_runtime.py207 except Exception as e:STRING
LOWexamples/claude_code/swebench_utils/docker_runtime.py346 except Exception as e:STRING
103 more matches not shown…
Self-Referential Comments47 hits · 160 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_client.py169 # Define the synchronous client workflowCOMMENT
MEDIUMtests/tracer/test_integration.py398 # Create a team with the primary and critic agents.COMMENT
MEDIUMtests/tracer/test_otel.py442 # Create a slow async function that exceeds timeoutCOMMENT
MEDIUMtests/runner/test_agent_runner.py776 # Create an attempted rolloutCOMMENT
MEDIUMtests/runner/test_agent_runner.py803 # Create an attempted rollout with invalid resources_idCOMMENT
MEDIUMtests/llm_proxy/test_stream.py401 # Create a synthetic long content split into ~20-40 char pieces as the merger would seeCOMMENT
MEDIUMtests/algorithm/test_baseline.py178 # Create a dataset with 5 samplesCOMMENT
MEDIUMtests/litagent/test_decorator.py168 # Create a ProxyLLM resourceCOMMENT
MEDIUMtests/litagent/test_decorator.py174 # Create an AttemptedRolloutCOMMENT
MEDIUMtests/litagent/test_decorator.py204 # Create a ProxyLLM resourceCOMMENT
MEDIUMtests/litagent/test_decorator.py210 # Create an AttemptedRolloutCOMMENT
MEDIUMtests/litagent/test_decorator.py239 # Create a ProxyLLM resourceCOMMENT
MEDIUMtests/litagent/test_decorator.py245 # Create an AttemptedRolloutCOMMENT
MEDIUMtests/litagent/test_decorator.py329 # Create a rollout objectCOMMENT
MEDIUMtests/litagent/test_decorator.py402 # Create a rollout objectCOMMENT
MEDIUMtests/litagent/test_decorator.py435 # Create a rollout objectCOMMENT
MEDIUMtests/store/test_utils.py80 # Create a valid attempt first, then modify its statusCOMMENT
MEDIUMtests/store/test_utils.py258 # Create a valid attempt first, then set it to NoneCOMMENT
MEDIUMtests/store/test_core.py2564 # Create a valid attempt to ensure rollout exists in storeCOMMENT
MEDIUMtests/store/test_core.py446 # Create a rolloutCOMMENT
MEDIUMtests/store/test_core.py2096 # Create the first attemptCOMMENT
MEDIUMtests/store/test_core.py2810 # Create a rolloutCOMMENT
MEDIUMtests/store/test_core.py2831 # Create a rollout and dequeue to create first attemptCOMMENT
MEDIUMtests/store/test_core.py2494 rollout = await store_fixture.dequeue_rollout() # Create an attemptCODE
MEDIUMcontrib/recipes/webshop/server/webshop_server.py308 # Create a test session to trigger loadingCOMMENT
MEDIUM…b/agentlightning/contrib/algorithm/env_verl/trainer.py109# This function is adapted from verl.COMMENT
MEDIUM…ib/agentlightning/contrib/algorithm/env_verl/daemon.py512 # Create the Rollout object (without trace and logs as per user's note)COMMENT
MEDIUMexamples/claude_code/swebench_utils/docker_runtime.py109 # Create a copy of metadata to avoid modifying the originalCOMMENT
MEDIUMexamples/minimal/llm_proxy.py41 # Create a store to store the tracesCOMMENT
MEDIUMexamples/minimal/llm_proxy.py46 # Create a vLLM serverCOMMENT
MEDIUMexamples/minimal/llm_proxy.py51 # Create an LLM proxy to guard the vLLM server and catch the tracesCOMMENT
MEDIUMexamples/minimal/llm_proxy.py80 # Create a store to store the tracesCOMMENT
MEDIUMexamples/minimal/llm_proxy.py88 # Create an LLM proxy to guard the OpenAI server and catch the tracesCOMMENT
MEDIUMexamples/unsloth/sft_algorithm.py360 # Create the LLM proxy for rollout worker access and trace data collectionCOMMENT
MEDIUM.github/workflows/pypi-nightly.yml46 # Create a dev version with timestampCOMMENT
MEDIUMagentlightning/llm_proxy.py675 # Creating a new request won't work because request is cached in the base classCOMMENT
MEDIUMagentlightning/tracer/weave.py366 # Create a new trace call object in WeaveCOMMENT
MEDIUMagentlightning/runner/legacy.py142 # Create the RolloutLegacy object with standardized fieldsCOMMENT
MEDIUMagentlightning/utils/server_launcher.py423 # Create the arbiter up-front so the watchdog can inspect it.COMMENT
MEDIUMagentlightning/adapter/triplet.py290 # Create a virtual root span if multiple root spans are foundCOMMENT
MEDIUMagentlightning/verl/trainer.py57# This function is adapted from verl.COMMENT
MEDIUMagentlightning/verl/daemon.py659 # Create the Rollout object (without trace and logs as per user's note)COMMENT
MEDIUMagentlightning/store/collection_based.py198 # The following methods should live inside one lock.COMMENT
MEDIUMagentlightning/store/collection_based.py429 # Create the initial attemptCOMMENT
MEDIUMagentlightning/store/collection_based.py596 # Create a new attempt (could be first attempt or retry)COMMENT
MEDIUMagentlightning/store/collection/mongo.py301 # Create a new client for this loop.COMMENT
MEDIUMagentlightning/store/collection/mongo.py318 # Create a new collection for this loop.COMMENT
Modern Structural Boilerplate115 hits · 113 pts
SeverityFileLineSnippetContext
LOWtests/utils/test_otlp.py85def _set_any_value(av: AnyValue, value: object) -> None:CODE
LOWtests/store/conftest.py28__all__ = [CODE
LOWtests/store/test_core.py2514 async def update_resource(ver: int) -> None:CODE
LOWcontrib/recipes/webshop/server/webshop_server.py32logger = logging.getLogger(__name__)CODE
LOWcontrib/recipes/webshop/agl/generate_tasks.py37logger = logging.getLogger(__name__)CODE
LOWcontrib/recipes/webshop/agl/run_training.py136logger = logging.getLogger(__name__)CODE
LOWcontrib/agentlightning/contrib/runner/agentos.py17logger = logging.getLogger(__name__)CODE
LOWcontrib/agentlightning/contrib/runner/agentos.py116 def _setup_hooks(self) -> None:CODE
LOWcontrib/agentlightning/contrib/adapter/agentos.py16logger = logging.getLogger(__name__)CODE
LOW…b/agentlightning/contrib/algorithm/env_verl/trainer.py45__all__ = [CODE
LOW…ib/agentlightning/contrib/algorithm/env_verl/daemon.py13logger = logging.getLogger(__name__)CODE
LOW…ib/agentlightning/contrib/algorithm/env_verl/daemon.py33__all__ = [CODE
LOWcontrib/agentlightning/contrib/reward/agentos.py15logger = logging.getLogger(__name__)CODE
LOWexamples/chartqa/env_var.py5__all__ = [CODE
LOWexamples/chartqa/chartqa_agent.py96 def update_llm_config(self, model_name: str, endpoint: str | None, temperature: float | None) -> None:CODE
LOWexamples/chartqa/multimodal_utils.py21__all__ = [CODE
LOWexamples/tinker/agl_tinker/env.py34logger = logging.getLogger(__name__)CODE
LOWexamples/tinker/agl_tinker/llm.py37logger = logging.getLogger(__name__)CODE
LOWexamples/tinker/agl_tinker/llm.py100 def update_sampling_client(self, sampling_client: tinker.SamplingClient) -> None:CODE
LOWexamples/tinker/agl_tinker/rollout.py36logger = logging.getLogger(__name__)CODE
LOWexamples/tinker/agl_tinker/train.py46logger = logging.getLogger(__name__)CODE
LOWexamples/tinker/agl_tinker/algo.py23logger = logging.getLogger(__name__)CODE
LOWexamples/claude_code/extended_adapter.py17logger = logging.getLogger(__name__)CODE
LOWexamples/spider/sql_agent.py35logger = logging.getLogger(__name__)CODE
LOWagentlightning/logging.py15__all__ = ["setup", "configure_logger", "setup_module"]CODE
LOWagentlightning/server.py33logger = logging.getLogger(__name__)CODE
LOWagentlightning/env_var.py11__all__ = [CODE
LOWagentlightning/config.py32logger = logging.getLogger(__name__)CODE
LOWagentlightning/config.py34__all__ = ["lightning_cli"]CODE
LOWagentlightning/llm_proxy.py61logger = logging.getLogger(__name__)CODE
LOWagentlightning/llm_proxy.py63__all__ = [CODE
LOWagentlightning/llm_proxy.py1144 def set_store(self, store: LightningStore) -> None:CODE
LOWagentlightning/llm_proxy.py1152 def update_model_list(self, model_list: List[ModelConfig]) -> None:CODE
LOWagentlightning/llm_proxy.py1384def set_active_llm_proxy(proxy: LLMProxy) -> None:CODE
LOWagentlightning/client.py23logger = logging.getLogger(__name__)CODE
LOWagentlightning/tracer/weave.py55logger = logging.getLogger(__name__)CODE
LOWagentlightning/tracer/__init__.py8__all__ = [CODE
LOWagentlightning/tracer/agentops.py29logger = logging.getLogger(__name__)CODE
LOWagentlightning/tracer/dummy.py24logger = logging.getLogger(__name__)CODE
LOWagentlightning/tracer/otel.py28logger = logging.getLogger(__name__)CODE
LOWagentlightning/tracer/base.py16logger = logging.getLogger(__name__)CODE
LOWagentlightning/types/core.py38__all__ = [CODE
LOWagentlightning/types/resources.py22logger = logging.getLogger(__name__)CODE
LOWagentlightning/types/resources.py25__all__ = [CODE
LOWagentlightning/types/tracer.py23__all__ = [CODE
LOWagentlightning/emitter/annotation.py32logger = logging.getLogger(__name__)CODE
LOWagentlightning/emitter/annotation.py143 def set_input(self, *args: Any, **kwargs: Any) -> None:CODE
LOWagentlightning/emitter/annotation.py173 def set_output(self, output: Any) -> None:CODE
LOWagentlightning/emitter/exception.py12logger = logging.getLogger(__name__)CODE
LOWagentlightning/emitter/object.py14logger = logging.getLogger(__name__)CODE
LOWagentlightning/emitter/__init__.py28__all__ = [CODE
LOWagentlightning/emitter/message.py12logger = logging.getLogger(__name__)CODE
LOWagentlightning/emitter/reward.py31logger = logging.getLogger(__name__)CODE
LOWagentlightning/emitter/reward.py33__all__ = [CODE
LOWagentlightning/runner/legacy.py19logger = logging.getLogger(__name__)CODE
LOWagentlightning/runner/legacy.py21__all__ = [CODE
LOWagentlightning/runner/__init__.py7__all__ = [CODE
LOWagentlightning/runner/agent.py57logger = logging.getLogger(__name__)CODE
LOWagentlightning/runner/base.py22logger = logging.getLogger(__name__)CODE
LOWagentlightning/utils/metrics.py32logger = logging.getLogger(__name__)CODE
55 more matches not shown…
Deep Nesting98 hits · 93 pts
SeverityFileLineSnippetContext
LOWtests/test_logging.py23CODE
LOWtests/benchmark/benchmark_store.py89CODE
LOWtests/benchmark/benchmark_store.py91CODE
LOWtests/benchmark/benchmark_store.py169CODE
LOWtests/benchmark/benchmark_store.py285CODE
LOWtests/benchmark/benchmark_store.py307CODE
LOWtests/benchmark/micro_benchmark.py435CODE
LOWtests/tracer/test_agentops.py166CODE
LOWtests/tracer/test_integration.py738CODE
LOWtests/tracer/test_integration.py113CODE
LOWtests/llm_proxy/test_llm_proxy_cpu.py301CODE
LOWtests/llm_proxy/test_llm_proxy_gpu.py403CODE
LOWtests/llm_proxy/test_llm_proxy_gpu.py511CODE
LOWtests/llm_proxy/test_stream.py13CODE
LOWtests/llm_proxy/test_stream.py71CODE
LOWtests/utils/test_otlp.py85CODE
LOWcontrib/agentlightning/contrib/agent/env_agent.py49CODE
LOWcontrib/agentlightning/contrib/agent/env_agent.py68CODE
LOWcontrib/agentlightning/contrib/agent/empo2_agent.py73CODE
LOWcontrib/agentlightning/contrib/adapter/triplet_group.py29CODE
LOWcontrib/agentlightning/contrib/adapter/agentos.py94CODE
LOW…gentlightning/contrib/algorithm/env_verl/core_empo2.py14CODE
LOW…b/agentlightning/contrib/algorithm/env_verl/trainer.py291CODE
LOW…b/agentlightning/contrib/algorithm/env_verl/trainer.py538CODE
LOW…ib/agentlightning/contrib/algorithm/env_verl/daemon.py461CODE
LOW…ib/agentlightning/contrib/algorithm/env_verl/daemon.py660CODE
LOWexamples/calc_x/train_calc_agent.py110CODE
LOWexamples/chartqa/chartqa_agent.py295CODE
LOWexamples/tinker/q20_evaluate.py53CODE
LOWexamples/tinker/agl_tinker/train.py111CODE
LOWexamples/azure/aoai_finetune.py590CODE
LOWexamples/claude_code/claude_code_agent.py230CODE
LOWexamples/claude_code/claude_code_agent.py312CODE
LOWexamples/claude_code/extended_adapter.py30CODE
LOWexamples/claude_code/extended_adapter.py63CODE
LOWexamples/minimal/vllm_server.py18CODE
LOWexamples/spider/sql_agent.py346CODE
LOWexamples/spider/spider_eval/evaluation.py533CODE
LOWexamples/spider/spider_eval/process_sql.py276CODE
LOWexamples/spider/spider_eval/exec_eval.py65CODE
LOWexamples/spider/spider_eval/exec_eval.py187CODE
LOWexamples/unsloth/sft_algorithm.py61CODE
LOWexamples/unsloth/sft_algorithm.py135CODE
LOWscripts/wandb_download_result.py171CODE
LOWagentlightning/config.py118CODE
LOWagentlightning/llm_proxy.py722CODE
LOWagentlightning/llm_proxy.py1314CODE
LOWagentlightning/tracer/agentops.py142CODE
LOWagentlightning/tracer/otel.py250CODE
LOWagentlightning/tracer/otel.py472CODE
LOWagentlightning/types/resources.py80CODE
LOWagentlightning/emitter/annotation.py187CODE
LOWagentlightning/emitter/annotation.py209CODE
LOWagentlightning/emitter/object.py87CODE
LOWagentlightning/emitter/reward.py148CODE
LOWagentlightning/emitter/reward.py213CODE
LOWagentlightning/runner/agent.py270CODE
LOWagentlightning/runner/agent.py484CODE
LOWagentlightning/runner/agent.py737CODE
LOWagentlightning/runner/agent.py526CODE
38 more matches not shown…
Hallucination Indicators4 hits · 40 pts
SeverityFileLineSnippetContext
CRITICAL…b/agentlightning/contrib/algorithm/env_verl/trainer.py559 model = "/".join(self.config.actor_rollout_ref.model.path.split("/")[-2:])CODE
CRITICALagentlightning/verl/trainer.py260 if self.config.agentlightning.trace_aggregator.level.startswith("trajectory")CODE
CRITICALagentlightning/verl/trainer.py265 if self.config.agentlightning.trace_aggregator.level.startswith("trajectory")CODE
CRITICALagentlightning/verl/trainer.py459 model = "/".join(self.config.actor_rollout_ref.model.path.split("/")[-2:])CODE
Redundant / Tautological Comments24 hits · 38 pts
SeverityFileLineSnippetContext
LOWtests/test_config.py375 # Check if mock_add_param_func was called with these specific argumentsCOMMENT
LOWtests/utils/test_server_launcher.py211 # Check if the port is still occupied.COMMENT
LOWcontrib/recipes/webshop/tests/test_span_adapter.py152 # Check if reward was associated with any tripletCOMMENT
LOW…gentlightning/contrib/algorithm/env_verl/core_empo2.py23 # Check if the start pattern matches at the current positionCOMMENT
LOWexamples/chartqa/chartqa_agent.py317 # Check if the graph is already builtCOMMENT
LOWexamples/claude_code/swebench_utils/evaluation.py190 # Check if git diff changed after running eval scriptCOMMENT
LOWscripts/bump_version.sh8# Check if version argument is providedCOMMENT
LOWscripts/bump_version.sh30# Check if pyproject.toml existsCOMMENT
LOWagentlightning/config.py110 # Check if the (potentially unwrapped) type is a ListCOMMENT
LOWagentlightning/config.py146 # Check if the list item itself is, e.g., Optional[str] or boolCOMMENT
LOWagentlightning/llm_proxy.py612 # Check if it's a chat completions or messages endpointCOMMENT
LOWagentlightning/llm_proxy.py632 # Check if streaming is requestedCOMMENT
LOWagentlightning/llm_proxy.py1424 # Check if tracer provider is malformed due to global tracer clear in tests.COMMENT
LOWagentlightning/client.py325 # Check if tasks are mixture of TaskInput and TaskCOMMENT
LOWagentlightning/types/resources.py82 # Check if we're accessing endpoint after initialization and not from base_urlCOMMENT
LOWagentlightning/emitter/reward.py94 # Check if the function is asyncCOMMENT
LOWagentlightning/utils/server_launcher.py482 # Check if the server is healthy.COMMENT
LOWagentlightning/utils/otel.py443 # Check if keys are all numeric stringsCOMMENT
LOWagentlightning/verl/daemon.py274 # Check if model requires multimodal position_ids (e.g., Qwen2-VL)COMMENT
LOWagentlightning/litagent/decorator.py517 # Check if it matches the LLM rollout API patternCOMMENT
LOWagentlightning/store/collection_based.py189 # Check if healthcheck is already running to prevent recursionCOMMENT
LOWagentlightning/store/collection_based.py194 # Set flag to prevent recursive healthcheck callsCOMMENT
LOWagentlightning/store/collection_based.py593 # Check if rollout is still in a queuing stateCOMMENT
LOWagentlightning/store/utils.py75 # Check if this status should trigger a retryCOMMENT
AI Structural Patterns33 hits · 28 pts
SeverityFileLineSnippetContext
LOWcontrib/recipes/search_r1/retrieval_server.py159CODE
LOWexamples/azure/aoai_finetune.py40CODE
LOWexamples/claude_code/claude_code_agent.py128CODE
LOWexamples/rag/metric_utils.py346CODE
LOWexamples/rag/metric_utils.py360CODE
LOWexamples/rag/metric_utils.py374CODE
LOWexamples/rag/metric_utils.py388CODE
LOWexamples/rag/metric_utils.py402CODE
LOWexamples/rag/metric_utils.py416CODE
LOWexamples/rag/metric_utils.py430CODE
LOWexamples/spider/sql_agent.py321CODE
LOWagentlightning/logging.py95CODE
LOWagentlightning/llm_proxy.py577CODE
LOWagentlightning/llm_proxy.py1064CODE
LOWagentlightning/types/tracer.py374CODE
LOWagentlightning/algorithm/apo/apo.py101CODE
LOWagentlightning/instrumentation/vllm.py63CODE
LOWagentlightning/verl/daemon.py213CODE
LOWagentlightning/execution/client_server.py65CODE
LOWagentlightning/trainer/init_utils.py122CODE
LOWagentlightning/trainer/init_utils.py138CODE
LOWagentlightning/trainer/trainer.py120CODE
LOWagentlightning/store/collection_based.py762CODE
LOWagentlightning/store/collection_based.py1313CODE
LOWagentlightning/store/threading.py107CODE
LOWagentlightning/store/threading.py227CODE
LOWagentlightning/store/client_server.py1105CODE
LOWagentlightning/store/client_server.py1219CODE
LOWagentlightning/store/client_server.py1691CODE
LOWagentlightning/store/client_server.py1951CODE
LOWagentlightning/store/base.py386CODE
LOWagentlightning/store/base.py619CODE
LOWagentlightning/store/collection/mongo.py1086CODE
Structural Annotation Overuse14 hits · 28 pts
SeverityFileLineSnippetContext
LOWdocs/tutorials/emitter.md31 # Step 1: Initial planningCOMMENT
LOWdocs/tutorials/emitter.md40 # Step 2: Execute the planCOMMENT
LOWdocs/tutorials/emitter.md44 # Step 3: Final evaluationCOMMENT
LOWcontrib/recipes/webshop/scripts/run_stack.sh95# Step 1: Initialize WebShop Data (if needed)COMMENT
LOWcontrib/recipes/webshop/scripts/run_stack.sh141# Step 2: Start WebShop ServerCOMMENT
LOWcontrib/recipes/webshop/scripts/run_stack.sh155# Step 3: Start Agent Lightning CoordinatorCOMMENT
LOWcontrib/recipes/webshop/scripts/run_stack.sh174# Step 4: Wait for ServicesCOMMENT
LOWcontrib/recipes/webshop/scripts/run_stack.sh182# Step 5: Build and Start RunnersCOMMENT
LOWcontrib/recipes/webshop/scripts/run_stack.sh211# Step 6: Wait for Training to CompleteCOMMENT
LOWexamples/rag/README.md67### Step 1: Collecting Text ChunksCOMMENT
LOWexamples/rag/README.md71### Step 2: Creating the FAISS Index (`nq_hnsw_faiss_n32e40.index`)COMMENT
LOWexamples/rag/README.md78### Step 3: Creating the Chunk List (`nq_list.pkl`)COMMENT
LOWexamples/rag/README.md105### Step 4: Code Example - Building Index and Chunk ListCOMMENT
LOWexamples/rag/rag_agent.py112 # NOTE: The following dummy data can also be used if you don't have the dataset.COMMENT
Cross-Language Confusion5 hits · 22 pts
SeverityFileLineSnippetContext
HIGHexamples/claude_code/claude_code_controller.py152if ! command -v python3 &> /dev/null; thenCODE
HIGHexamples/claude_code/claude_code_controller.py154 sudo apt-get update -qq && sudo apt-get install -y -qq python3.12CODE
HIGHexamples/claude_code/swebench_utils/docker_runtime.py188 "py_interpreter_path": r'$(which python 2>/dev/null || echo "")',STRING
HIGHexamples/claude_code/swebench_utils/docker_runtime.py194 self.send_command("apt update -qq && apt install -y -qq git")STRING
HIGHagentlightning/utils/otel.py474 # This include null, dict, etc.COMMENT
AI Slop Vocabulary9 hits · 21 pts
SeverityFileLineSnippetContext
MEDIUM…b/agentlightning/contrib/algorithm/env_verl/trainer.py647 # This exit logic is to ensure a robust CI.COMMENT
MEDIUMexamples/tinker/agl_tinker/llm.py188 # NOTE(yuge): I thought about adding this to make it more robust to empty responses,COMMENT
MEDIUMscripts/wandb_download_result.py82 # We fetch all runs in the project once, then pick matching ones to be robust across filters/backends.COMMENT
MEDIUMagentlightning/logging.py192 # TODO: More comprehensive Windows support may be needed in the future.COMMENT
LOWagentlightning/llm_proxy.py635 # Simple case: no streaming requested, just return the responseCOMMENT
MEDIUMagentlightning/verl/trainer.py542 # This exit logic is to ensure a robust CI.COMMENT
LOWagentlightning/store/client_server.py479 # If not API request, just pass throughCOMMENT
LOWagentlightning/store/client_server.py1016 # If the store is zero-copy, we can just call the method directly.COMMENT
LOWagentlightning/store/client_server.py1026 # If it's already thread-safe, we can just call the method directly.COMMENT
Magic Placeholder Names3 hits · 12 pts
SeverityFileLineSnippetContext
HIGHdocs/how-to/train-sql-agent.md370export OPENAI_API_KEY=<your_api_key>CODE
HIGHexamples/chartqa/README.md60export OPENAI_API_KEY=<your-api-key>CODE
HIGHexamples/unsloth/math_agent.py8export OPENAI_API_KEY=your_api_keySTRING
Over-Commented Block14 hits · 12 pts
SeverityFileLineSnippetContext
LOWcontrib/recipes/search_r1/qa_em.py1# Copyright (c) Microsoft. All rights reserved.COMMENT
LOWcontrib/recipes/webshop/aml/run_webshop_aml.sh1#!/usr/bin/env bashCOMMENT
LOWcontrib/recipes/webshop/scripts/run_stack.sh1#!/usr/bin/env bashCOMMENT
LOW…ib/agentlightning/contrib/algorithm/env_verl/daemon.py481 """COMMENT
LOW…ib/agentlightning/contrib/algorithm/env_verl/daemon.py721 #COMMENT
LOWexamples/rag/metric_utils.py161 # # search accCOMMENT
LOWexamples/spider/spider_eval/evaluation.py1# Copyright (c) Microsoft. All rights reserved.COMMENT
LOWexamples/spider/spider_eval/process_sql.py1# Copyright (c) Microsoft. All rights reserved.COMMENT
LOWexamples/spider/spider_eval/exec_eval.py181# db is the database pathCOMMENT
LOWexamples/unsloth/sft_algorithm.py221 console.print(COMMENT
LOWagentlightning/tracer/otel.py401 def _await_in_loop(self, coro: Awaitable[Any], timeout: Optional[float] = None) -> Any:COMMENT
LOWagentlightning/verl/daemon.py421 if resp.status_code == 200:COMMENT
LOWagentlightning/store/client_server.py1021 if method_name == "wait_for_rollouts":COMMENT
LOWagentlightning/store/client_server.py1421 self._request_timeout = state["_request_timeout"]COMMENT
Verbosity Indicators6 hits · 11 pts
SeverityFileLineSnippetContext
LOWcontrib/recipes/webshop/scripts/run_stack.sh95# Step 1: Initialize WebShop Data (if needed)COMMENT
LOWcontrib/recipes/webshop/scripts/run_stack.sh141# Step 2: Start WebShop ServerCOMMENT
LOWcontrib/recipes/webshop/scripts/run_stack.sh155# Step 3: Start Agent Lightning CoordinatorCOMMENT
LOWcontrib/recipes/webshop/scripts/run_stack.sh174# Step 4: Wait for ServicesCOMMENT
LOWcontrib/recipes/webshop/scripts/run_stack.sh182# Step 5: Build and Start RunnersCOMMENT
LOWcontrib/recipes/webshop/scripts/run_stack.sh211# Step 6: Wait for Training to CompleteCOMMENT
Modern AI Meta-Vocabulary3 hits · 9 pts
SeverityFileLineSnippetContext
MEDIUMexamples/tinker/q20_agent.py31 # Keep this short; do NOT ask for chain-of-thoughtCOMMENT
MEDIUMexamples/rag/README.md1# RAG Agent ExampleCOMMENT
MEDIUMexamples/rag/README.md122# 2. Load embedding modelCOMMENT
Slop Phrases2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMtests/trainer/test_trainer_init.py66 # By default, strategy is client-server, but you can also use a string alias to specify it againCOMMENT
MEDIUMexamples/apo/apo_debug.py28 # If you don't need any tracing functionality yet, you can use a dummy OtelTracer.COMMENT
Fake / Example Data6 hits · 6 pts
SeverityFileLineSnippetContext
LOWdocs/tutorials/emitter.md63 "name": "John Doe",CODE
LOWdocs/tutorials/emitter.md79 'agentlightning.object.json': '{"name": "John Doe", "age": 30, "email": "john.doe@example.com"}',CODE
LOWdocs/tutorials/write-agents.md91 api_key=llm.api_key or "dummy-key",CODE
LOWdashboard/src/pages/Rollouts.page.story.tsx544const veryLongInput = `{"prompt":"${'Lorem ipsum dolor sit amet, consectetur adipiscing elit. '.repeat(12)}"}`;CODE
LOWdashboard/src/pages/Rollouts.page.story.tsx544const veryLongInput = `{"prompt":"${'Lorem ipsum dolor sit amet, consectetur adipiscing elit. '.repeat(12)}"}`;CODE
LOWagentlightning/instrumentation/weave.py225 wb_user_id="dummy_user",CODE
Example Usage Blocks4 hits · 5 pts
SeverityFileLineSnippetContext
LOWtests/benchmark/utils.py123 # Example usageCOMMENT
LOWcontrib/recipes/webshop/aml/run_webshop_aml.sh9# Usage:COMMENT
LOWcontrib/recipes/webshop/aml/compute.yml6# Usage:COMMENT
LOWcontrib/recipes/webshop/scripts/run_stack.sh8# Usage:COMMENT
Synthetic Comment Markers1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHRAI_README.md44Outputs generated by AI may include factual errors, fabrication, or speculation. Users are responsible for assessing theCODE
TODO Padding2 hits · 3 pts
SeverityFileLineSnippetContext
LOW…b/agentlightning/contrib/algorithm/env_verl/trainer.py532 # TODO: implement actual tflpo and theoretical tflpoCOMMENT
LOWagentlightning/verl/trainer.py432 # TODO: implement actual tflpo and theoretical tflpoCOMMENT
Overly Generic Function Names2 hits · 2 pts
SeverityFileLineSnippetContext
LOWdashboard/static/mockServiceWorker.js123async function handleRequest(event, requestId, requestInterceptedAt) {CODE
LOWexamples/calc_x/tests/test_agentops.py10def process_data(data: str) -> float:CODE