Repository Analysis

pyg-team/pytorch_geometric

Graph Neural Network Library for PyTorch

11.2 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of pyg-team/pytorch_geometric, a Python project with 23,891 GitHub stars. SynthScan v2.0 examined 196,135 lines of code across 1412 source files, recording 2185 pattern matches distributed across 22 syntactic categories. The overall adjusted score of 11.2 places this repository in the Low 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).

11.2
Adjusted Score
11.2
Raw Score
100%
Time Factor
2026-07-06
Last Push
23.9K
Stars
Python
Language
196.1K
Lines of Code
1.4K
Files
2.2K
Pattern Hits
2026-07-14
Scan Date
0.02
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 22MEDIUM 72LOW 2087

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 2185 distinct pattern matches across 22 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.

Unused Imports885 hits · 714 pts
SeverityFileLineSnippetContext
LOWbenchmark/citation/__init__.py1CODE
LOWbenchmark/citation/__init__.py2CODE
LOWbenchmark/citation/__init__.py2CODE
LOWbenchmark/runtime/__init__.py1CODE
LOWbenchmark/utils/__init__.py1CODE
LOWbenchmark/utils/__init__.py2CODE
LOWbenchmark/utils/__init__.py2CODE
LOWbenchmark/utils/__init__.py3CODE
LOWbenchmark/utils/__init__.py4CODE
LOWbenchmark/utils/__init__.py5CODE
LOWbenchmark/utils/__init__.py5CODE
LOWbenchmark/utils/__init__.py6CODE
LOWbenchmark/utils/utils.py19CODE
LOWbenchmark/multi_gpu/training/training_benchmark_xpu.py5CODE
LOWbenchmark/points/__init__.py1CODE
LOWbenchmark/points/__init__.py2CODE
LOWbenchmark/kernel/__init__.py1CODE
LOWbenchmark/kernel/__init__.py2CODE
LOWtest/testing/test_decorators.py7CODE
LOWtest/testing/test_decorators.py13CODE
LOWtest/testing/test_decorators.py19CODE
LOWgraphgym/main.py4CODE
LOWgraphgym/custom_graphgym/__init__.py1CODE
LOWgraphgym/custom_graphgym/__init__.py2CODE
LOWgraphgym/custom_graphgym/__init__.py3CODE
LOWgraphgym/custom_graphgym/__init__.py4CODE
LOWgraphgym/custom_graphgym/__init__.py5CODE
LOWgraphgym/custom_graphgym/__init__.py6CODE
LOWgraphgym/custom_graphgym/__init__.py7CODE
LOWgraphgym/custom_graphgym/__init__.py8CODE
LOWgraphgym/custom_graphgym/__init__.py9CODE
LOWgraphgym/custom_graphgym/__init__.py10CODE
LOWgraphgym/custom_graphgym/__init__.py11CODE
LOWgraphgym/custom_graphgym/__init__.py12CODE
LOWgraphgym/custom_graphgym/__init__.py13CODE
LOWgraphgym/custom_graphgym/network/example.py5CODE
LOWtorch_geometric/experimental.py9CODE
LOWtorch_geometric/__init__.py6CODE
LOWtorch_geometric/__init__.py6CODE
LOWtorch_geometric/__init__.py7CODE
LOWtorch_geometric/__init__.py7CODE
LOWtorch_geometric/__init__.py11CODE
LOWtorch_geometric/__init__.py12CODE
LOWtorch_geometric/__init__.py12CODE
LOWtorch_geometric/__init__.py13CODE
LOWtorch_geometric/__init__.py13CODE
LOWtorch_geometric/__init__.py13CODE
LOWtorch_geometric/__init__.py14CODE
LOWtorch_geometric/__init__.py15CODE
LOWtorch_geometric/__init__.py15CODE
LOWtorch_geometric/__init__.py15CODE
LOWtorch_geometric/__init__.py27CODE
LOWtorch_geometric/__init__.py27CODE
LOWtorch_geometric/__init__.py27CODE
LOWtorch_geometric/config_store.py22CODE
LOWtorch_geometric/typing.py166CODE
LOWtorch_geometric/typing.py311CODE
LOWtorch_geometric/visualization/__init__.py3CODE
LOWtorch_geometric/visualization/__init__.py3CODE
LOWtorch_geometric/visualization/__init__.py4CODE
825 more matches not shown…
Hyper-Verbose Identifiers653 hits · 627 pts
SeverityFileLineSnippetContext
LOWbenchmark/utils/utils.py39def get_dataset_with_transformation(name, root, use_sparse_tensor=False,CODE
LOWbenchmark/kernel/train_eval.py20def cross_validation_with_val_set(dataset, model, folds, epochs, batch_size,CODE
LOWtest/test_warnings.py15def test_no_warn_if_compiling(_):CODE
LOWtest/test_onnx.py32def test_safe_onnx_export_ci_resilient() -> None:CODE
LOWtest/test_onnx.py62def test_safe_onnx_export_success() -> None:CODE
LOWtest/test_onnx.py107def test_safe_onnx_export_with_skip_on_error() -> None:CODE
LOWtest/test_onnx.py134def test_serde_error_patterns() -> None:CODE
LOWtest/test_onnx.py173def test_non_serde_error_reraise() -> None:CODE
LOWtest/test_onnx.py303def test_pytest_environment_detection() -> None:CODE
LOWtest/test_config_mixin.py116def test_config_mixin_compound() -> None:CODE
LOWtest/test_edge_index.py1375def test_compile_create_edge_index():CODE
LOWtest/test_inspector.py102def test_get_params_from_method_call() -> None:CODE
LOWtest/visualization/test_graph_visualization.py12def test_visualize_graph_via_graphviz(tmp_path, backend):CODE
LOWtest/visualization/test_graph_visualization.py26def test_visualize_graph_via_graphviz_with_node_labels(tmp_path, backend):CODE
LOWtest/visualization/test_graph_visualization.py41def test_visualize_graph_via_networkx(tmp_path, backend):CODE
LOWtest/llm/conftest.py8def pytest_collection_modifyitems(items):CODE
LOWtest/llm/test_rag_loader.py97 def test_initialization_basic(self):CODE
LOWtest/llm/test_rag_loader.py108 def test_initialization_with_all_params(self):CODE
LOWtest/llm/test_rag_loader.py140 def test_basic_query_without_vector_retriever(self):CODE
LOWtest/llm/test_rag_loader.py156 def test_query_with_vector_retriever(self):CODE
LOWtest/llm/test_rag_loader.py177 def test_query_with_subgraph_filter(self):CODE
LOWtest/llm/test_rag_loader.py204def test_rag_loader_integration(tmp_path):CODE
LOWtest/llm/test_large_graph_indexer.py130 def _sorted_tensors_are_close(tensor1, tensor2):CODE
LOWtest/llm/test_txt2qa.py67 def test_route_after_validation_continue(self):CODE
LOWtest/llm/test_txt2qa.py73 def test_route_after_validation_feedback(self):CODE
LOWtest/llm/test_txt2qa.py95def test_generate_single_query_nim(tmp_path):CODE
LOWtest/llm/utils/test_rag_backend_utils.py101def create_mock_graph_and_triples():CODE
LOWtest/llm/utils/test_rag_backend_utils.py121def test_apply_retrieval_via_pcst_isolated_node():CODE
LOWtest/llm/utils/test_rag_backend_utils.py171 def test_create_graph_basic_functionality(self):CODE
LOWtest/llm/utils/test_rag_backend_utils.py192 def test_create_graph_empty_triples(self):CODE
LOWtest/llm/utils/test_rag_backend_utils.py219 def test_create_backend_data_load(self):CODE
LOWtest/llm/utils/test_rag_feature_store.py43 def test_retrieve_seed_nodes_single_query(self):CODE
LOWtest/llm/utils/test_rag_feature_store.py78 def test_retrieve_seed_nodes_multiple_queries(self):CODE
LOWtest/llm/utils/test_rag_feature_store.py112 def test_load_subgraph_valid_sample(self, induced):CODE
LOWtest/llm/utils/test_rag_graph_store.py18def test_sample_subgraph_with_valid_tensor_input():CODE
LOWtest/llm/models/test_glem.py10def test_deal_nan_tensor_replaces_nans():CODE
LOWtest/llm/models/test_glem.py20def test_deal_nan_non_tensor_passthrough():CODE
LOWtest/llm/models/test_glem.py26def test_deal_nan_tensor_dtypes(dtype):CODE
LOWtest/llm/models/test_glem.py46def test_deal_nan_is_non_mutating():CODE
LOWtest/llm/models/test_glem.py76def test_glem_bert_tiny_branch(monkeypatch):CODE
LOWtest/llm/models/test_glem.py101def test_glem_auto_model_branch(monkeypatch):CODE
LOWtest/llm/models/test_llm.py127def test_llm_variable_lengths(dummy_llm):CODE
LOWtest/llm/models/test_sentence_transformer.py17def test_sentence_transformer(batch_size, pooling_strategy, device, verbose):CODE
LOWtest/llm/models/test_g_retriever.py63def test_g_retriever_many_tokens() -> None:CODE
LOWtest/llm/models/test_g_retriever.py160def test_gretriever_prefix_embedding_injection(batch_size):CODE
LOWtest/llm/models/test_txt2kg.py22def test_parse_n_check_triples_formats():CODE
LOWtest/llm/models/test_txt2kg.py29def test_chunk_text_simple_sentence():CODE
LOWtest/llm/models/test_txt2kg.py44def test_local_lm_integration(monkeypatch):CODE
LOWtest/llm/models/test_txt2kg.py83def test_merge_triples_deterministically_basic():CODE
LOWtest/llm/models/test_txt2kg.py101def test_merge_triples_deterministically_unicode_and_nonstring():CODE
LOWtest/llm/models/test_txt2kg.py119def test_merge_triples_deterministically_empty():CODE
LOWtest/llm/models/test_txt2kg.py127def test_merge_triples_deterministically_singleton():CODE
LOWtest/llm/models/test_txt2kg.py135def test_chunk_to_triples_str_cloud(monkeypatch):CODE
LOWtest/llm/models/test_txt2kg.py191def test_extract_relevant_triples_cloud(monkeypatch):CODE
LOWtest/llm/models/test_txt2kg.py202def test_multiproc_helper_success(monkeypatch):CODE
LOWtest/llm/models/test_txt2kg.py233def test_multiproc_helper_retry(monkeypatch):CODE
LOWtest/llm/models/test_txt2kg.py292def test_add_doc_empty_text_cpu(kg_cpu):CODE
LOWtest/llm/models/test_txt2kg.py308def test_add_doc_nonempty_text_placeholder(kg_cpu, monkeypatch):CODE
LOWtest/explain/conftest.py139 def _check_explanation_hetero(CODE
LOWtest/explain/test_explanation.py13def create_random_explanation(CODE
593 more matches not shown…
Deep Nesting245 hits · 238 pts
SeverityFileLineSnippetContext
LOWbenchmark/citation/train_eval.py43CODE
LOWbenchmark/citation/train_eval.py121CODE
LOWbenchmark/training/training_benchmark.py98CODE
LOWbenchmark/loader/neighbor_loader.py16CODE
LOWbenchmark/points/train_eval.py58CODE
LOWbenchmark/inference/inference_benchmark.py44CODE
LOWbenchmark/kernel/main_performance.py75CODE
LOWbenchmark/kernel/main_performance.py117CODE
LOWbenchmark/kernel/train_eval.py20CODE
LOWtest/test_onnx.py32CODE
LOWtest/test_onnx.py62CODE
LOWtest/test_onnx.py107CODE
LOWtest/test_onnx.py134CODE
LOWtest/test_onnx.py173CODE
LOWtest/test_onnx.py197CODE
LOWtest/test_onnx.py233CODE
LOWtest/test_onnx.py272CODE
LOWtest/test_onnx.py303CODE
LOWtest/test_onnx.py335CODE
LOWtest/test_onnx.py385CODE
LOWtest/explain/conftest.py106CODE
LOWtest/explain/conftest.py138CODE
LOWtest/explain/conftest.py86CODE
LOWtest/explain/conftest.py107CODE
LOWtest/explain/conftest.py139CODE
LOWtest/explain/conftest.py289CODE
LOWtest/explain/test_hetero_explanation.py13CODE
LOWtest/explain/algorithm/test_captum.py65CODE
LOWtest/explain/algorithm/test_attention_explainer.py69CODE
LOWtest/explain/algorithm/test_attention_explainer.py145CODE
LOWtest/explain/algorithm/test_graphmask_explainer.py28CODE
LOWtest/explain/algorithm/test_gnn_explainer.py38CODE
LOWtest/explain/algorithm/test_captum_hetero.py35CODE
LOWtest/explain/algorithm/test_captum_explainer.py54CODE
LOWtest/distributed/test_dist_neighbor_loader.py82CODE
LOWtest/utils/conftest.py35CODE
LOWtest/sampler/test_sampler_neighbor_sampler.py63CODE
LOWgraphgym/configs_gen.py90CODE
LOWgraphgym/configs_gen.py124CODE
LOWgraphgym/configs_gen.py166CODE
LOWtorch_geometric/experimental.py95CODE
LOWtorch_geometric/experimental.py100CODE
LOWtorch_geometric/experimental.py115CODE
LOWtorch_geometric/index.py696CODE
LOWtorch_geometric/edge_index.py1477CODE
LOWtorch_geometric/edge_index.py1849CODE
LOWtorch_geometric/inspector.py514CODE
LOWtorch_geometric/inspector.py207CODE
LOWtorch_geometric/inspector.py336CODE
LOWtorch_geometric/config_store.py196CODE
LOWtorch_geometric/config_store.py30CODE
LOWtorch_geometric/config_store.py118CODE
LOWtorch_geometric/config_store.py35CODE
LOWtorch_geometric/config_store.py123CODE
LOWtorch_geometric/hash_tensor.py39CODE
LOWtorch_geometric/llm/models/qa_gen.py1384CODE
LOWtorch_geometric/llm/models/qa_gen.py1715CODE
LOWtorch_geometric/llm/models/qa_gen.py2239CODE
LOWtorch_geometric/llm/models/qa_gen.py2350CODE
LOWtorch_geometric/llm/models/qa_gen.py2414CODE
185 more matches not shown…
Cross-File Repetition18 hits · 90 pts
SeverityFileLineSnippetContext
HIGHtorch_geometric/nn/attention/performer.py0forward pass. args: x (torch.tensor): node feature tensor :math:`\mathbf{x} \in \mathbb{r}^{b \times n \times f}`, with STRING
HIGHtorch_geometric/nn/attention/polynormer.py0forward pass. args: x (torch.tensor): node feature tensor :math:`\mathbf{x} \in \mathbb{r}^{b \times n \times f}`, with STRING
HIGHtorch_geometric/nn/attention/sgformer.py0forward pass. args: x (torch.tensor): node feature tensor :math:`\mathbf{x} \in \mathbb{r}^{b \times n \times f}`, with STRING
HIGHtorch_geometric/nn/dense/dense_gat_conv.py0forward pass. args: x (torch.tensor): node feature tensor :math:`\mathbf{x} \in \mathbb{r}^{b \times n \times f}`, with STRING
HIGHtorch_geometric/nn/dense/dense_gcn_conv.py0forward pass. args: x (torch.tensor): node feature tensor :math:`\mathbf{x} \in \mathbb{r}^{b \times n \times f}`, with STRING
HIGHtorch_geometric/nn/dense/dense_gin_conv.py0forward pass. args: x (torch.tensor): node feature tensor :math:`\mathbf{x} \in \mathbb{r}^{b \times n \times f}`, with STRING
HIGHtorch_geometric/nn/models/deep_graph_infomax.py0evaluates latent space quality via a logistic regression downstream task.STRING
HIGHtorch_geometric/nn/models/node2vec.py0evaluates latent space quality via a logistic regression downstream task.STRING
HIGHtorch_geometric/nn/models/metapath2vec.py0evaluates latent space quality via a logistic regression downstream task.STRING
HIGHtorch_geometric/nn/conv/gatv2_conv.py0runs the forward pass of the module. args: x (torch.tensor or (torch.tensor, torch.tensor)): the input node features. edSTRING
HIGHtorch_geometric/nn/conv/transformer_conv.py0runs the forward pass of the module. args: x (torch.tensor or (torch.tensor, torch.tensor)): the input node features. edSTRING
HIGHtorch_geometric/nn/conv/fa_conv.py0runs the forward pass of the module. args: x (torch.tensor or (torch.tensor, torch.tensor)): the input node features. edSTRING
HIGHtorch_geometric/nn/conv/gat_conv.py0runs the forward pass of the module. args: x (torch.tensor or (torch.tensor, torch.tensor)): the input node features. edSTRING
HIGHtorch_geometric/nn/norm/pair_norm.py0forward pass. args: x (torch.tensor): the source tensor. batch (torch.tensor, optional): the batch vector :math:`\mathbfSTRING
HIGHtorch_geometric/nn/norm/graph_size_norm.py0forward pass. args: x (torch.tensor): the source tensor. batch (torch.tensor, optional): the batch vector :math:`\mathbfSTRING
HIGHtorch_geometric/nn/norm/instance_norm.py0forward pass. args: x (torch.tensor): the source tensor. batch (torch.tensor, optional): the batch vector :math:`\mathbfSTRING
HIGHtorch_geometric/nn/norm/graph_norm.py0forward pass. args: x (torch.tensor): the source tensor. batch (torch.tensor, optional): the batch vector :math:`\mathbfSTRING
HIGHtorch_geometric/nn/norm/layer_norm.py0forward pass. args: x (torch.tensor): the source tensor. batch (torch.tensor, optional): the batch vector :math:`\mathbfSTRING
Self-Referential Comments31 hits · 86 pts
SeverityFileLineSnippetContext
MEDIUMtest/llm/utils/test_rag_feature_store.py116 # Create a mock SamplerOutputCOMMENT
MEDIUMtest/llm/models/test_glem.py27 # Create a tensor with one NaN valueCOMMENT
MEDIUMtest/explain/conftest.py268 # Create a HeteroConv modelCOMMENT
MEDIUMtest/explain/algorithm/test_attention_explainer.py44 # Create a single BaseGNN that uses all three attention mechanismsCOMMENT
MEDIUMtest/explain/algorithm/test_attention_explainer.py105 # Create a dictionary of attention-based convolutions for each edgeCOMMENT
MEDIUMtest/explain/algorithm/test_attention_explainer.py122 # Create the HeteroConv layerCOMMENT
MEDIUMtest/explain/algorithm/test_attention_explainer.py251 # Create the hetero attention modelCOMMENT
MEDIUMtest/explain/algorithm/test_attention_explainer.py254 # Create the explainerCOMMENT
MEDIUMtest/explain/algorithm/test_attention_explainer.py290 # Create the hetero conv attention modelCOMMENT
MEDIUMtest/explain/algorithm/test_attention_explainer.py293 # Create the explainerCOMMENT
MEDIUMtest/utils/test_negative_sampling.py33 # Create a fully-connected graph:COMMENT
MEDIUMtorch_geometric/llm/utils/vectorrag.py121 # Create a new DocumentRetriever with the loaded dataCOMMENT
MEDIUMtorch_geometric/nn/to_hetero_with_bases_transformer.py537# This method is used to split the output tensors into individual type-wiseSTRING
MEDIUMtorch_geometric/nn/aggr/base.py47 # Define the boundary indices for three sets:COMMENT
MEDIUMtorch_geometric/datasets/web_qsp_dataset.py124 # Create an iterator for each element's graph in the current splitSTRING
MEDIUMtorch_geometric/datasets/ged_dataset.py208 # Create a one-hot encoded feature matrix denoting the atomSTRING
MEDIUMtorch_geometric/data/remote_backend_utils.py1# This file defines a set of utilities for remote backends (backends that areCOMMENT
MEDIUMtorch_geometric/data/in_memory_dataset.py232 # Create the on-disk dataset ==========================================STRING
MEDIUMtorch_geometric/data/database.py307 # Create the table (if it does not exist) by mapping the Python schemaSTRING
MEDIUMtorch_geometric/data/hetero_data.py63 # Create an edge type "(author, writes, paper)" and building theCOMMENT
MEDIUMtorch_geometric/data/lightning/datamodule.py127 # Define a new `NeighborSampler` to be re-used across data loaders:COMMENT
MEDIUMexamples/llm/relbench_gretriever.py88# Define the projector for heterogeneous node featuresCOMMENT
MEDIUMexamples/llm/txt2qa.py158 # Create the graphCOMMENT
MEDIUMexamples/llm/g_retriever.py62 # Create a dictionary mapping parameter names to their requires_grad statusCOMMENT
MEDIUMexamples/llm/txt2qa_config/text_config_nim.yaml2# This file contains all the settings for the QA generation workflowCOMMENT
MEDIUMexamples/llm/txt2qa_config/text_config_vllm.yaml2# This file contains all the settings for the QA generation workflowCOMMENT
MEDIUMexamples/distributed/kuzu/papers_100M/train.py32# The below code sets up the remote backend of Kùzu for PyG.COMMENT
MEDIUM…d/graphlearn_for_pytorch/dist_train_sage_supervised.py126 # Define the model and optimizer.COMMENT
MEDIUMexamples/quiver/multi_gpu_quiver.py131 # The below code enable Quiver for PyG.COMMENT
MEDIUMexamples/quiver/single_gpu_quiver.py28# The below code enable Quiver for PyG.COMMENT
MEDIUMexamples/pytorch_ignite/gin.py127 # Create a tensorboard logger to write logs:COMMENT
AI Structural Patterns81 hits · 80 pts
SeverityFileLineSnippetContext
LOWbenchmark/runtime/dgl/rgcn.py66CODE
LOWbenchmark/runtime/dgl/rgcn.py135CODE
LOWtest/test_edge_index.py1307CODE
LOWtest/test_edge_index.py1332CODE
LOWtest/test_edge_index.py1350CODE
LOWtorch_geometric/typing.py177CODE
LOWtorch_geometric/visualization/graph.py155CODE
LOWtorch_geometric/llm/utils/backend_utils.py319CODE
LOWtorch_geometric/llm/models/sentence_transformer.py169CODE
LOWtorch_geometric/llm/models/qa_gen.py2414CODE
LOWtorch_geometric/llm/models/qa_gen.py168CODE
LOWtorch_geometric/llm/models/glem.py46CODE
LOWtorch_geometric/llm/models/protein_mpnn.py188CODE
LOW…rch_geometric/explain/algorithm/graphmask_explainer.py83CODE
LOW…rch_geometric/explain/algorithm/graphmask_explainer.py140CODE
LOWtorch_geometric/nn/attention/performer.py50CODE
LOWtorch_geometric/nn/attention/performer.py63CODE
LOWtorch_geometric/nn/attention/performer.py95CODE
LOWtorch_geometric/nn/attention/performer.py173CODE
LOWtorch_geometric/nn/attention/qformer.py66CODE
LOWtorch_geometric/nn/dense/mincut_pool.py117CODE
LOWtorch_geometric/nn/models/lpformer.py720CODE
LOWtorch_geometric/nn/models/graph_mixer.py133CODE
LOWtorch_geometric/nn/models/gpse.py494CODE
LOWtorch_geometric/nn/models/visnet.py753CODE
LOWtorch_geometric/nn/models/visnet.py1079CODE
LOWtorch_geometric/nn/models/mlp.py78CODE
LOWtorch_geometric/nn/models/dimenet.py126CODE
LOWtorch_geometric/nn/models/dimenet.py501CODE
LOWtorch_geometric/nn/models/dimenet.py768CODE
LOWtorch_geometric/nn/models/basic_gnn.py70CODE
LOWtorch_geometric/nn/models/polynormer.py45CODE
LOWtorch_geometric/nn/models/attentive_fp.py50CODE
LOWtorch_geometric/nn/models/schnet.py93CODE
LOWtorch_geometric/nn/conv/gatv2_conv.py133CODE
LOWtorch_geometric/nn/conv/general_conv.py69CODE
LOWtorch_geometric/nn/conv/x_conv.py157CODE
LOWtorch_geometric/nn/conv/point_transformer_conv.py138CODE
LOWtorch_geometric/nn/conv/supergat_conv.py128CODE
LOWtorch_geometric/nn/conv/cg_conv.py91CODE
LOWtorch_geometric/nn/conv/gat_conv.py130CODE
LOWtorch_geometric/nn/conv/dna_conv.py66CODE
LOWtorch_geometric/nn/conv/dna_conv.py161CODE
LOWtorch_geometric/nn/conv/transformer_conv.py283CODE
LOWtorch_geometric/nn/conv/pan_conv.py130CODE
LOWtorch_geometric/nn/conv/pna_conv.py91CODE
LOWtorch_geometric/nn/conv/rgat_conv.py174CODE
LOWtorch_geometric/nn/conv/cluster_gcn_conv.py124CODE
LOWtorch_geometric/nn/conv/gps_conv.py62CODE
LOWtorch_geometric/nn/conv/gen_conv.py120CODE
LOWtorch_geometric/nn/aggr/basic.py139CODE
LOW…rch_geometric/distributed/dist_link_neighbor_loader.py42CODE
LOWtorch_geometric/distributed/dist_neighbor_loader.py42CODE
LOWtorch_geometric/distributed/dist_neighbor_sampler.py70CODE
LOWtorch_geometric/datasets/graphland.py227CODE
LOWtorch_geometric/datasets/fake.py43CODE
LOWtorch_geometric/datasets/fake.py143CODE
LOWtorch_geometric/datasets/opf.py69CODE
LOWtorch_geometric/datasets/protein_mpnn_dataset.py75CODE
LOWtorch_geometric/io/obj.py42CODE
21 more matches not shown…
Excessive Try-Catch Wrapping94 hits · 77 pts
SeverityFileLineSnippetContext
LOWtest/nn/dense/test_linear.py274 except Exception:CODE
LOWtorch_geometric/device.py12 except Exception:CODE
LOWtorch_geometric/config_store.py18except Exception:CODE
LOWtorch_geometric/config_store.py24except Exception:CODE
LOWtorch_geometric/_onnx.py77 except Exception as e:STRING
LOWtorch_geometric/_onnx.py130 except Exception:STRING
LOWtorch_geometric/_onnx.py148 except Exception:STRING
LOWtorch_geometric/_onnx.py164 except Exception:STRING
LOWtorch_geometric/_onnx.py186 except Exception:STRING
LOWtorch_geometric/typing.py82 except Exception:CODE
LOWtorch_geometric/typing.py87 except Exception:CODE
LOWtorch_geometric/typing.py89except Exception as e:CODE
LOWtorch_geometric/typing.py141except Exception as e:CODE
LOWtorch_geometric/typing.py169except Exception as e:CODE
LOWtorch_geometric/typing.py302except Exception:CODE
LOWtorch_geometric/typing.py313except Exception:CODE
LOWtorch_geometric/hash_tensor.py46 except Exception:CODE
LOWtorch_geometric/metrics/link_pred.py13except Exception:CODE
LOWtorch_geometric/llm/models/qa_gen.py1154 except Exception as e:CODE
LOWtorch_geometric/llm/models/qa_gen.py1163 except Exception as e:CODE
LOWtorch_geometric/llm/models/qa_gen.py613 except Exception as e:CODE
LOWtorch_geometric/llm/models/qa_gen.py635 except Exception:CODE
LOWtorch_geometric/llm/models/qa_gen.py780 except Exception as e:CODE
LOWtorch_geometric/llm/models/qa_gen.py821 except Exception as e:CODE
LOWtorch_geometric/llm/models/qa_gen.py834 except Exception:CODE
LOWtorch_geometric/llm/models/qa_gen.py852 except Exception as e2:CODE
LOWtorch_geometric/llm/models/qa_gen.py1109 except Exception as e:CODE
LOWtorch_geometric/llm/models/qa_gen.py1344 except Exception as e:CODE
LOWtorch_geometric/llm/models/qa_gen.py1501 except Exception:CODE
LOWtorch_geometric/llm/models/qa_gen.py1551 except Exception:CODE
LOWtorch_geometric/llm/models/qa_gen.py1702 except Exception:CODE
LOWtorch_geometric/llm/models/qa_gen.py2753 except Exception:CODE
LOWtorch_geometric/llm/models/qa_gen.py2905 except Exception as e:CODE
LOWtorch_geometric/llm/models/qa_gen.py3022 except Exception as e:CODE
LOWtorch_geometric/llm/models/qa_gen.py3061 except Exception as e:CODE
LOWtorch_geometric/llm/models/qa_gen.py3323 except Exception as e:CODE
LOWtorch_geometric/llm/models/qa_gen.py3492 except Exception as e:CODE
LOWtorch_geometric/llm/models/qa_gen.py3515 except Exception as e:CODE
LOWtorch_geometric/llm/models/qa_gen.py3635 except Exception as e:CODE
LOWtorch_geometric/llm/models/qa_gen.py3854 except Exception as e:CODE
LOWtorch_geometric/llm/models/qa_gen.py3881 except Exception as e:CODE
LOWtorch_geometric/llm/models/qa_gen.py4201 except Exception as e:CODE
LOWtorch_geometric/llm/models/qa_gen.py4376 except Exception as e:CODE
LOWtorch_geometric/llm/models/qa_gen.py3586 except Exception as e:STRING
LOWtorch_geometric/llm/models/qa_gen.py3596 except Exception as e1:STRING
LOWtorch_geometric/llm/models/qa_gen.py2231 except Exception:STRING
LOWtorch_geometric/llm/models/qa_gen.py2369 except Exception:STRING
LOWtorch_geometric/llm/models/qa_gen.py3750 except Exception as e:STRING
LOWtorch_geometric/llm/models/txt2kg.py195 except Exception as e:CODE
LOWtorch_geometric/llm/models/txt2kg.py317 except Exception:CODE
LOWtorch_geometric/llm/models/txt2kg.py334 except Exception:CODE
LOW…rch_geometric/explain/algorithm/graphmask_explainer.py410 except Exception:STRING
LOW…rch_geometric/explain/algorithm/graphmask_explainer.py416 except Exception:STRING
LOWtorch_geometric/nn/sequential.py265 except Exception as e: # pragma: no coverCODE
LOWtorch_geometric/nn/conv/message_passing.py961 except Exception as e: # pragma: no coverSTRING
LOWtorch_geometric/nn/conv/message_passing.py994 except Exception as e: # pragma: no coverSTRING
LOWtorch_geometric/distributed/event_loop.py22 except Exception as e:CODE
LOWtorch_geometric/distributed/event_loop.py84 except Exception as e:STRING
MEDIUMtorch_geometric/distributed/event_loop.py19def on_done(*_):CODE
LOWtorch_geometric/distributed/dist_neighbor_sampler.py392 except Exception:STRING
34 more matches not shown…
Modern Structural Boilerplate66 hits · 60 pts
SeverityFileLineSnippetContext
LOWbenchmark/citation/__init__.py4__all__ = [CODE
LOWbenchmark/runtime/__init__.py3__all__ = [CODE
LOWbenchmark/utils/__init__.py8__all__ = [CODE
LOWbenchmark/points/__init__.py4__all__ = [CODE
LOWbenchmark/kernel/__init__.py4__all__ = [CODE
LOWgraphgym/custom_graphgym/pooling/__init__.py5__all__ = [CODE
LOWgraphgym/custom_graphgym/optimizer/__init__.py5__all__ = [CODE
LOWgraphgym/custom_graphgym/loss/__init__.py5__all__ = [CODE
LOWgraphgym/custom_graphgym/config/__init__.py5__all__ = [CODE
LOWgraphgym/custom_graphgym/encoder/__init__.py5__all__ = [CODE
LOWgraphgym/custom_graphgym/network/__init__.py5__all__ = [CODE
LOWgraphgym/custom_graphgym/act/__init__.py5__all__ = [CODE
LOWgraphgym/custom_graphgym/head/__init__.py5__all__ = [CODE
LOWgraphgym/custom_graphgym/layer/__init__.py5__all__ = [CODE
LOWgraphgym/custom_graphgym/loader/__init__.py5__all__ = [CODE
LOWgraphgym/custom_graphgym/train/__init__.py5__all__ = [CODE
LOWgraphgym/custom_graphgym/stage/__init__.py5__all__ = [CODE
LOWgraphgym/custom_graphgym/transform/__init__.py5__all__ = [CODE
LOWtorch_geometric/experimental.py37def set_experimental_mode_enabled(mode: bool, options: Options = None) -> None:STRING
LOWtorch_geometric/home.py23def set_home_dir(path: str) -> None:STRING
LOWtorch_geometric/__init__.py36__all__ = [CODE
LOWtorch_geometric/debug.py11def set_debug_enabled(mode: bool) -> None:CODE
LOWtorch_geometric/visualization/__init__.py6__all__ = [CODE
LOWtorch_geometric/llm/utils/feature_store.py31 def _set_from_config(self, config: Dict[str, Any], attr_name: str) -> None:CODE
LOWtorch_geometric/llm/utils/graph_store.py54 def _set_from_config(self, config: Dict[str, Any], attr_name: str) -> None:CODE
LOWtorch_geometric/llm/models/qa_gen.py24logger = logging.getLogger(__name__)CODE
LOWtorch_geometric/llm/models/qa_gen.py329 def update_generation_model(self, model: str) -> None:CODE
LOWtorch_geometric/explain/__init__.py7__all__ = [CODE
LOWtorch_geometric/nn/__init__.py22__all__ = [CODE
LOWtorch_geometric/nn/sequential.py240 def _set_jittable_template(self, raise_on_error: bool = False) -> None:CODE
LOWtorch_geometric/nn/unpool/__init__.py5__all__ = [CODE
LOWtorch_geometric/nn/dense/__init__.py17__all__ = [STRING
LOWtorch_geometric/nn/models/basic_gnn.py692__all__ = [STRING
LOWtorch_geometric/nn/conv/__init__.py68__all__ = [CODE
LOWtorch_geometric/nn/conv/message_passing.py926 def _set_jittable_templates(self, raise_on_error: bool = False) -> None:STRING
LOWtorch_geometric/nn/conv/cugraph/__init__.py6__all__ = [CODE
LOWtorch_geometric/nn/conv/utils/__init__.py14__all__ = [CODE
LOWtorch_geometric/nn/norm/__init__.py13__all__ = [CODE
LOWtorch_geometric/nn/pool/__init__.py378__all__ = [STRING
LOWtorch_geometric/nn/pool/select/__init__.py10__all__ = [STRING
LOWtorch_geometric/nn/pool/connect/__init__.py10__all__ = [STRING
LOWtorch_geometric/datasets/utils/__init__.py3__all__ = [CODE
LOWtorch_geometric/io/__init__.py10__all__ = [CODE
LOWtorch_geometric/utils/__init__.py62__all__ = [CODE
LOWtorch_geometric/contrib/__init__.py13__all__ = []CODE
LOWtorch_geometric/contrib/nn/__init__.py4__all__ = []CODE
LOWtorch_geometric/contrib/nn/models/mgnan.py9__all__ = [CODE
LOWtorch_geometric/contrib/utils/__init__.py3__all__ = ['from_relbench']CODE
LOWtorch_geometric/graphgym/utils/__init__.py8__all__ = [CODE
LOWtorch_geometric/graphgym/models/__init__.py10__all__ = [CODE
LOWtorch_geometric/graphgym/contrib/pooling/__init__.py5__all__ = [CODE
LOWtorch_geometric/graphgym/contrib/optimizer/__init__.py5__all__ = [CODE
LOWtorch_geometric/graphgym/contrib/loss/__init__.py5__all__ = [CODE
LOWtorch_geometric/graphgym/contrib/config/__init__.py5__all__ = [CODE
LOWtorch_geometric/graphgym/contrib/encoder/__init__.py5__all__ = [CODE
LOWtorch_geometric/graphgym/contrib/network/__init__.py5__all__ = [CODE
LOWtorch_geometric/graphgym/contrib/act/__init__.py5__all__ = [CODE
LOWtorch_geometric/graphgym/contrib/head/__init__.py5__all__ = [CODE
LOWtorch_geometric/graphgym/contrib/layer/__init__.py5__all__ = [CODE
LOWtorch_geometric/graphgym/contrib/loader/__init__.py5__all__ = [CODE
6 more matches not shown…
Hallucination Indicators4 hits · 40 pts
SeverityFileLineSnippetContext
CRITICALtest/test_config_store.py130 assert (cfg.dataset.transform.NormalizeFeatures._target_.split('.')[-1] ==CODE
CRITICALtest/test_config_store.py135 assert (cfg.dataset.transform.AddSelfLoops._target_.split('.')[-1] ==CODE
CRITICALtest/data/lightning/test_datamodule.py49 self.trainer.datamodule.train_dataset._data.x.add_(1)CODE
CRITICALtest/data/lightning/test_datamodule.py176 self.trainer.datamodule.data.x.add_(1)CODE
AI Slop Vocabulary19 hits · 34 pts
SeverityFileLineSnippetContext
MEDIUMtest/test_onnx.py67 # Use comprehensive mocking to avoid any real ONNX callsCOMMENT
MEDIUMtest/test_onnx.py146 # Use multiple patch targets to ensure comprehensive mockingCOMMENT
MEDIUMtest/test_onnx.py178 # Use comprehensive mocking to prevent real ONNX callsCOMMENT
MEDIUMtorch_geometric/backend.py8# If set to `None`, will automatically decide whether to utilizeCOMMENT
LOWtorch_geometric/llm/models/qa_gen.py2816 # No hop contexts, just use top-level as-isCOMMENT
MEDIUMtorch_geometric/nn/sequential.py31 r"""An extension of the :class:`torch.nn.Sequential` container in order toCODE
LOWtorch_geometric/datasets/karate.py76 # (we just use the first one).STRING
MEDIUMtorch_geometric/datasets/medshapenet.py75 r"""The absolute filepaths that must be present in order to skipSTRING
MEDIUMtorch_geometric/contrib/nn/models/rbcd_attack.py602 <https://www.cs.cit.tum.de/daml/are-gnn-defenses-robust>`_ for details.CODE
MEDIUMtorch_geometric/profile/profile.py49 r"""A decorator to facilitate profiling a function, *e.g.*, obtainingCODE
MEDIUMtorch_geometric/profile/profile.py145 r"""A context decorator to facilitate timing a function, *e.g.*, obtainingSTRING
MEDIUMtorch_geometric/loader/node_loader.py274 # f'best practices for PyG [{link}])')STRING
MEDIUMtorch_geometric/loader/utils.py233 # NOTE Here, we utilize `feature_store.multi_get` to give the feature storeSTRING
MEDIUMtorch_geometric/loader/utils.py267 # NOTE Here, we utilize `feature_store.multi_get` to give the feature storeSTRING
LOWtorch_geometric/data/collate.py274 # Other-wise, just return the list of values as it is.COMMENT
MEDIUMtorch_geometric/data/dataset.py199 r"""The absolute filepaths that must be present in order to skipCODE
MEDIUMtorch_geometric/data/dataset.py211 r"""The absolute filepaths that must be present in order to skipSTRING
MEDIUMexamples/llm/relbench_gretriever.py223 # Single-graph paradigm: all nodes belong to batch index 0.COMMENT
LOWexamples/llm/txt2qa.py510 # If file_path is not relative to input_dir, just use the stemCOMMENT
Modern AI Meta-Vocabulary12 hits · 25 pts
SeverityFileLineSnippetContext
MEDIUMtest/llm/test_rag_loader.py237 # Create RAG loaderCOMMENT
MEDIUMtorch_geometric/llm/models/qa_gen.py3079 # Truncate texts to fit embedding model's max length (512 tokens)COMMENT
MEDIUMtorch_geometric/llm/models/qa_gen.py3140 # Truncate answer to fit embedding model's max length (512 tokens)COMMENT
MEDIUMtorch_geometric/llm/models/qa_gen.py3218 # Truncate questions to fit embedding model's max length (512 tokens)COMMENT
MEDIUMtorch_geometric/llm/models/qa_gen.py243 # Handle embedding model GPU memorySTRING
MEDIUMexamples/rect.py12# RECT focuses on the zero-shot, i.e. completely-imbalanced label setting:COMMENT
MEDIUMexamples/rect.py14# RECT (or more specifically its supervised part RECT-L) model in the zero-shotCOMMENT
MEDIUMexamples/llm/txt2kg_rag.py273 # Read corpus data to create the KG and for document retrieval (RAG).STRING
MEDIUMexamples/llm/txt2kg_rag.py381 # creating the embedding modelSTRING
MEDIUMexamples/llm/txt2kg_rag.py453 # creating the embedding modelSTRING
MEDIUMexamples/llm/txt2kg_rag.py521 # VectorDB retrieval just vanilla vector RAGSTRING
MEDIUMexamples/llm/txt2qa_config/text_config_vllm.yaml31 embedding: 0.3 # GPU memory for embedding model (typically smaller)CODE
Structural Annotation Overuse18 hits · 24 pts
SeverityFileLineSnippetContext
LOWtorch_geometric/llm/models/qa_gen.py1390 # Step 1: Clean markdown code blocksCOMMENT
LOWtorch_geometric/llm/models/qa_gen.py1395 # Step 2: Try direct parsing first (fastest path)COMMENT
LOWtorch_geometric/llm/models/qa_gen.py1406 # Step 3: Find JSON array/object with bracket countingCOMMENT
LOWtorch_geometric/llm/models/qa_gen.py1470 # Step 4: Last resort - old regex fallbackCOMMENT
LOWtorch_geometric/llm/models/qa_gen.py2009 # Step 1: Calculate exact (floating-point) values for each categorySTRING
LOWtorch_geometric/llm/models/qa_gen.py2016 # Step 2: Sort by fractional part descending (0.9, 0.9, 0.2)STRING
LOWtorch_geometric/llm/models/qa_gen.py2021 # Step 3: Assign floor values first (everyone gets their integer part)STRING
LOWtorch_geometric/llm/models/qa_gen.py2027 # Step 4: Distribute remaining items based on fractional partsSTRING
LOWtorch_geometric/llm/models/qa_gen.py2035 # Step 5: Edge case - if still items left (e.g., rounding errors)STRING
LOWexamples/distributed/graphlearn_for_pytorch/README.md22#### Step 1: Prepare and partition the dataCOMMENT
LOWexamples/distributed/graphlearn_for_pytorch/README.md30#### Step 2: Run the example in each training nodeCOMMENT
LOWexamples/distributed/graphlearn_for_pytorch/README.md55#### Step 1: Setup a distributed file systemCOMMENT
LOWexamples/distributed/graphlearn_for_pytorch/README.md62#### Step 2: Prepare and partition the dataCOMMENT
LOWexamples/distributed/graphlearn_for_pytorch/README.md85#### Step 3: Set up the configure fileCOMMENT
LOWexamples/distributed/graphlearn_for_pytorch/README.md89#### Step 4: Launch the distributed trainingCOMMENT
LOWexamples/quiver/single_gpu_quiver.py21# Step 1: Using Quiver's samplerCOMMENT
LOWexamples/quiver/single_gpu_quiver.py99# Step 2: Using Quiver's FeatureCOMMENT
LOWexamples/quiver/single_gpu_quiver.py117 # Step 3: Training the PyG Model with QuiverCOMMENT
Redundant / Tautological Comments15 hits · 20 pts
SeverityFileLineSnippetContext
LOWtest/explain/algorithm/test_pg_explainer.py222 # Check if the explanation is validCOMMENT
LOWtest/explain/algorithm/test_pg_explainer.py371 # Check if the explanation is validCOMMENT
LOWtest/explain/algorithm/test_pg_explainer.py467 # Check if the explanation is validCOMMENT
LOWtest/loader/test_link_neighbor_loader.py284 # Check if each seed edge has a different batch:COMMENT
LOWtorch_geometric/llm/utils/backend_utils.py383 ) # Check if pandas is installedCODE
LOWtorch_geometric/llm/models/qa_gen.py3847 # Check if segment overlaps with QA time rangeCOMMENT
LOWtorch_geometric/llm/models/qa_gen.py4174 # Check if we have context_segments from processingCOMMENT
LOW…rch_geometric/explain/algorithm/attention_explainer.py128 # Check if all components appear in the module name inCOMMENT
LOW…rch_geometric/explain/algorithm/attention_explainer.py180 # Check if we collected any attention coefficients.COMMENT
LOWtorch_geometric/datasets/tag_dataset.py368 # Check if the .pt files already existSTRING
LOWtorch_geometric/io/fs.py167 # Open file has protocol stripped.STRING
LOWtorch_geometric/utils/embedding.py97 # Check if the outputs is a dictionary mapping node types to embeddingsCOMMENT
LOWtorch_geometric/contrib/nn/models/rbcd_attack.py497 # Check if middle point is rootCOMMENT
LOWexamples/llm/txt2qa.py394 # Check if file exists before removingCOMMENT
LOWexamples/llm/txt2qa.py531 # Check if output file already exists (resume functionality)COMMENT
Decorative Section Separators8 hits · 20 pts
SeverityFileLineSnippetContext
MEDIUMtest/utils/test_scatter.py144 # ================COMMENT
MEDIUMtest/utils/test_scatter.py153 # ================COMMENT
MEDIUMtest/utils/test_segment.py58 # ================COMMENT
MEDIUMtest/utils/test_segment.py63 # ================COMMENT
MEDIUMtorch_geometric/graphgym/config.py321 # ===================================STRING
MEDIUMtorch_geometric/graphgym/config.py329 # ===================================STRING
MEDIUMexamples/explain/mgnan_graph_mutagenicity.py246 # --------------------------------------------------------------COMMENT
MEDIUMexamples/explain/mgnan_graph_mutagenicity.py248 # --------------------------------------------------------------COMMENT
Verbosity Indicators12 hits · 15 pts
SeverityFileLineSnippetContext
LOWtorch_geometric/llm/models/qa_gen.py1390 # Step 1: Clean markdown code blocksCOMMENT
LOWtorch_geometric/llm/models/qa_gen.py1395 # Step 2: Try direct parsing first (fastest path)COMMENT
LOWtorch_geometric/llm/models/qa_gen.py1406 # Step 3: Find JSON array/object with bracket countingCOMMENT
LOWtorch_geometric/llm/models/qa_gen.py1470 # Step 4: Last resort - old regex fallbackCOMMENT
LOWtorch_geometric/llm/models/qa_gen.py2009 # Step 1: Calculate exact (floating-point) values for each categorySTRING
LOWtorch_geometric/llm/models/qa_gen.py2016 # Step 2: Sort by fractional part descending (0.9, 0.9, 0.2)STRING
LOWtorch_geometric/llm/models/qa_gen.py2021 # Step 3: Assign floor values first (everyone gets their integer part)STRING
LOWtorch_geometric/llm/models/qa_gen.py2027 # Step 4: Distribute remaining items based on fractional partsSTRING
LOWtorch_geometric/llm/models/qa_gen.py2035 # Step 5: Edge case - if still items left (e.g., rounding errors)STRING
LOWexamples/quiver/single_gpu_quiver.py21# Step 1: Using Quiver's samplerCOMMENT
LOWexamples/quiver/single_gpu_quiver.py99# Step 2: Using Quiver's FeatureCOMMENT
LOWexamples/quiver/single_gpu_quiver.py117 # Step 3: Training the PyG Model with QuiverCOMMENT
Fake / Example Data11 hits · 12 pts
SeverityFileLineSnippetContext
LOWtest/transforms/test_pad.py20def fake_data() -> Data:CODE
LOWtest/transforms/test_pad.py426 data = fake_data()CODE
LOWtest/transforms/test_pad.py439 data = fake_data()CODE
LOWtest/transforms/test_pad.py464 data = fake_data()CODE
LOWtest/transforms/test_pad.py327@pytest.mark.parametrize('data', [fake_data(), fake_hetero_data()])CODE
LOWtest/transforms/test_pad.py341 data = fake_data()CODE
LOWtest/transforms/test_pad.py367 data = fake_data()CODE
LOWtest/transforms/test_pad.py404@pytest.mark.parametrize('data', [fake_data(), fake_hetero_data()])CODE
LOWtest/transforms/test_pad.py479 data = fake_data()CODE
LOWtorch_geometric/nn/fx.py141 if node.op == 'placeholder':STRING
LOWtorch_geometric/nn/fx.py178 if node.op not in ['placeholder', 'output']:STRING
Docstring Block Structure2 hits · 10 pts
SeverityFileLineSnippetContext
HIGHtorch_geometric/nn/models/gpse.py1009Calculates the average cosine similarity between predicted and true features on a batch of graphs. Args: STRING
HIGHtorch_geometric/contrib/utils/_relbench.py11Converts a :class:`relbench.base.Database` object into a :class:`~torch_geometric.data.HeteroData` object. EachSTRING
AI Response Leakage1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHexamples/datapipe.py1# In this example, you will find data loading implementations using PyTorchCOMMENT
Over-Commented Block6 hits · 6 pts
SeverityFileLineSnippetContext
LOWtest/utils/test_scatter.py141COMMENT
LOWtest/sampler/test_sampler_neighbor_sampler.py521 expected_output = SamplerOutput(COMMENT
LOWtorch_geometric/nn/conv/meshcnn_conv.py401 # Option 2COMMENT
LOWtorch_geometric/graphgym/config.py301 # Auto match computational budget, match upper bound / lower boundCOMMENT
LOWtorch_geometric/graphgym/config.py321 # ===================================COMMENT
LOWexamples/tgn.py1# This code achieves a performance of around 96.60%. However, it is notCOMMENT
Cross-Language Confusion1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHtorch_geometric/utils/geodesic.py29 To install, run :obj:`pip install cython && pip install gdist`.CODE
Overly Generic Function Names2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtorch_geometric/distributed/event_loop.py92 def run_task(self, coro):STRING
LOWexamples/llm/txt2qa.py516 async def process_data(self, data: str, data_id: str,CODE
Slop Phrases1 hit · 0 pts
SeverityFileLineSnippetContext
LOWtorch_geometric/io/fs.py145 # If the source path points to a directory, we need to make sure toSTRING