AI Slop Code RIsk Monitor

pyg-team/pytorch_geometric

Graph Neural Network Library for PyTorch

12.4 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for pyg-team/pytorch_geometric, a Python project with 24,112 GitHub stars. SynthScan examined 196,317 lines of code across 1412 source files, recording 2238 pattern matches distributed across 23 syntactic categories. The legacy adjusted pattern signal is 12.4 (Moderate pattern signal); it is not an authorship estimate.

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

12.4
Adjusted Signal
12.4
Raw Pattern Score
100%
Time Factor
2026-10-06
Last Push
24.1K
Stars
Python
Language
196.3K
Lines of Code
1.4K
Files
2.2K
Pattern Hits
2026-10-12
Scan Date
0.05
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 25.8/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 17.8/100 · LOW

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

Agent Over-Engineering Ratio 26.4/100 · MEDIUM

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

PR Review Velocity Impact 50.6/100 · HIGH

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

What These Metrics Mean

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

Pattern-Signal History

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

Severity Breakdown

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

CRITICAL 4HIGH 71MEDIUM 72LOW 2091

Directory Score Breakdown

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

Pattern Findings

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

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

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 Identifiers658 hits · 631 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
LOW⚡test/llm/models/test_glem.py10def test_deal_nan_tensor_replaces_nans():CODE
LOW⚡test/llm/models/test_glem.py20def test_deal_nan_non_tensor_passthrough():CODE
LOW⚡test/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
LOW⚡test/llm/models/test_txt2kg.py119def test_merge_triples_deterministically_empty():CODE
LOW⚡test/llm/models/test_txt2kg.py127def test_merge_triples_deterministically_singleton():CODE
LOW⚡test/llm/models/test_txt2kg.py135def test_chunk_to_triples_str_cloud(monkeypatch):CODE
LOWtest/llm/models/test_txt2kg.py194def test_extract_relevant_triples_cloud(monkeypatch):CODE
LOWtest/llm/models/test_txt2kg.py205def test_multiproc_helper_success(monkeypatch):CODE
LOWtest/llm/models/test_txt2kg.py237def test_multiproc_helper_retry(monkeypatch):CODE
LOWtest/llm/models/test_txt2kg.py300def test_add_doc_empty_text_cpu(kg_cpu):CODE
LOWtest/llm/models/test_txt2kg.py316def test_add_doc_nonempty_text_placeholder(kg_cpu, monkeypatch):CODE
LOWtest/llm/models/test_txt2kg.py332def test_is_retryable_exception_status_codes():CODE
LOWtest/llm/models/test_txt2kg.py341def test_is_retryable_exception_network_errors():CODE
598 more matches not shown…
Empty Error Handlers49 hits · 245 pts
SeverityFileLineSnippetContext
HIGHbenchmark/citation/train_eval.py64except ImportError:CODE
HIGHbenchmark/citation/train_eval.py101except ImportError:CODE
HIGHbenchmark/kernel/train_eval.py50except ImportError:CODE
HIGHtest/test_onnx.py58except (PermissionError, OSError):CODE
HIGHtest/test_onnx.py103except (PermissionError, OSError):CODE
HIGHtest/test_onnx.py129except (PermissionError, OSError):CODE
HIGHtest/test_onnx.py192except (PermissionError, OSError):CODE
HIGHtest/test_onnx.py228except (PermissionError, OSError):CODE
HIGHtest/test_onnx.py268except (PermissionError, OSError):CODE
HIGHtest/test_onnx.py298except (PermissionError, OSError):CODE
HIGHtest/test_onnx.py373except (PermissionError, OSError):CODE
HIGHtest/test_onnx.py407except (PermissionError, OSError):CODE
HIGHtest/test_onnx.py100except (PermissionError, OSError):CODE
HIGHtest/test_onnx.py169except (PermissionError, OSError):CODE
HIGHtest/test_onnx.py265except (PermissionError, OSError):CODE
HIGHtest/test_onnx.py330except (PermissionError, OSError):CODE
HIGHtest/test_onnx.py166except (PermissionError, OSError):CODE
HIGHtest/data/test_database.py40except NotImplementedError:CODE
HIGHtest/data/test_database.py49except NotImplementedError:CODE
HIGHtorch_geometric/config_mixin.py89except ImportError:CODE
HIGHtorch_geometric/_onnx.py164except Exception:CODE
HIGHtorch_geometric/_onnx.py186except Exception:CODE
HIGHtorch_geometric/_onnx.py130except Exception:CODE
HIGHtorch_geometric/llm/models/qa_gen.py1403except json.JSONDecodeError:CODE
HIGHtorch_geometric/llm/models/qa_gen.py1492except json.JSONDecodeError:CODE
HIGHtorch_geometric/llm/models/qa_gen.py1501except Exception:CODE
HIGHtorch_geometric/llm/models/qa_gen.py635except Exception:CODE
HIGHtorch_geometric/llm/models/qa_gen.py1477except json.JSONDecodeError:CODE
HIGHtorch_geometric/llm/models/qa_gen.py1514except json.JSONDecodeError:CODE
HIGHtorch_geometric/llm/models/txt2kg.py400except Exception:CODE
HIGHtorch_geometric/llm/models/llm_judge.py144except: # noqaCODE
HIGHtorch_geometric/llm/models/llm_judge.py155except: # noqaCODE
HIGHtorch_geometric/nn/fx.py180except RuntimeError:CODE
HIGHtorch_geometric/nn/conv/cugraph/gat_conv.py17except ImportError:CODE
HIGHtorch_geometric/nn/conv/cugraph/sage_conv.py18except ImportError:CODE
HIGHtorch_geometric/nn/conv/cugraph/base.py22except ImportError:CODE
HIGHtorch_geometric/nn/conv/cugraph/rgcn_conv.py19except ImportError:CODE
HIGHtorch_geometric/distributed/dist_neighbor_sampler.py392except Exception:CODE
HIGHtorch_geometric/distributed/local_feature_store.py159except KeyError:CODE
HIGHtorch_geometric/datasets/motif_generator/custom.py28except ImportError:CODE
HIGHtorch_geometric/io/fs.py181except Exception: # FIXMECODE
HIGHtorch_geometric/utils/convert.py279except Exception:CODE
HIGHtorch_geometric/profile/utils.py80except Exception:CODE
HIGHtorch_geometric/profile/utils.py99except Exception:CODE
HIGHtorch_geometric/loader/cluster.py120except (AttributeError, RuntimeError):CODE
HIGHtorch_geometric/data/storage.py899except Exception:CODE
HIGHexamples/llm/txt2qa.py26except RuntimeError:CODE
HIGHexamples/multi_gpu/papers100m_gcn_multinode.py29except Exception:CODE
HIGHexamples/multi_gpu/papers100m_gcn.py23except Exception:CODE
Deep Nesting245 hits · 233 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
MEDIUM⚡test/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
MEDIUM⚡examples/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 Wrapping93 hits · 76 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
LOW⚡torch_geometric/typing.py82 except Exception:CODE
LOW⚡torch_geometric/typing.py87 except Exception:CODE
LOW⚡torch_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
LOW⚡torch_geometric/llm/models/qa_gen.py1154 except Exception as e:CODE
LOW⚡torch_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
LOW⚡torch_geometric/llm/models/qa_gen.py3586 except Exception as e:STRING
LOW⚡torch_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.py365 except Exception as e:CODE
LOWtorch_geometric/llm/models/txt2kg.py400 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
LOWtorch_geometric/distributed/rpc.py12except Exception:CODE
33 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 · 33 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 · 24 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 · 23 pts
SeverityFileLineSnippetContext
LOW⚡torch_geometric/llm/models/qa_gen.py1390 # Step 1: Clean markdown code blocksCOMMENT
LOW⚡torch_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
LOW⚡torch_geometric/llm/models/qa_gen.py2009 # Step 1: Calculate exact (floating-point) values for each categorySTRING
LOW⚡torch_geometric/llm/models/qa_gen.py2016 # Step 2: Sort by fractional part descending (0.9, 0.9, 0.2)STRING
LOW⚡torch_geometric/llm/models/qa_gen.py2021 # Step 3: Assign floor values first (everyone gets their integer part)STRING
LOW⚡torch_geometric/llm/models/qa_gen.py2027 # Step 4: Distribute remaining items based on fractional partsSTRING
LOW⚡torch_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
LOW⚡examples/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
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
Redundant / Tautological Comments15 hits · 18 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
Verbosity Indicators12 hits · 15 pts
SeverityFileLineSnippetContext
LOW⚡torch_geometric/llm/models/qa_gen.py1390 # Step 1: Clean markdown code blocksCOMMENT
LOW⚡torch_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
LOW⚡torch_geometric/llm/models/qa_gen.py2009 # Step 1: Calculate exact (floating-point) values for each categorySTRING
LOW⚡torch_geometric/llm/models/qa_gen.py2016 # Step 2: Sort by fractional part descending (0.9, 0.9, 0.2)STRING
LOW⚡torch_geometric/llm/models/qa_gen.py2021 # Step 3: Assign floor values first (everyone gets their integer part)STRING
LOW⚡torch_geometric/llm/models/qa_gen.py2027 # Step 4: Distribute remaining items based on fractional partsSTRING
LOW⚡torch_geometric/llm/models/qa_gen.py2035 # Step 5: Edge case - if still items left (e.g., rounding errors)STRING
LOW⚡examples/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
LOW⚡test/transforms/test_pad.py20def fake_data() -> Data:CODE
LOW⚡test/transforms/test_pad.py426 data = fake_data()CODE
LOW⚡test/transforms/test_pad.py439 data = fake_data()CODE
LOW⚡test/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