Repository Analysis

pyg-team/pytorch_geometric

Graph Neural Network Library for PyTorch

10.1 Low AI signal View on GitHub
10.1
Adjusted Score
10.1
Raw Score
100%
Time Factor
2026-05-18
Last Push
23,785
Stars
Python
Language
194,617
Lines of Code
1404
Files
1979
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 4HIGH 22MEDIUM 56LOW 1897

Pattern Findings

1979 matches across 16 categories. Click a row to expand file-level details.

Unused Imports880 hits · 710 pts
SeverityFileLineSnippet
LOWbenchmark/citation/__init__.py1
LOWbenchmark/citation/__init__.py2
LOWbenchmark/citation/__init__.py2
LOWbenchmark/runtime/__init__.py1
LOWbenchmark/utils/__init__.py1
LOWbenchmark/utils/__init__.py2
LOWbenchmark/utils/__init__.py2
LOWbenchmark/utils/__init__.py3
LOWbenchmark/utils/__init__.py4
LOWbenchmark/utils/__init__.py5
LOWbenchmark/utils/__init__.py5
LOWbenchmark/utils/__init__.py6
LOWbenchmark/utils/utils.py19
LOWbenchmark/multi_gpu/training/training_benchmark_xpu.py5
LOWbenchmark/points/__init__.py1
LOWbenchmark/points/__init__.py2
LOWbenchmark/kernel/__init__.py1
LOWbenchmark/kernel/__init__.py2
LOWtest/testing/test_decorators.py7
LOWtest/testing/test_decorators.py13
LOWtest/testing/test_decorators.py19
LOWgraphgym/main.py4
LOWgraphgym/custom_graphgym/__init__.py1
LOWgraphgym/custom_graphgym/__init__.py2
LOWgraphgym/custom_graphgym/__init__.py3
LOWgraphgym/custom_graphgym/__init__.py4
LOWgraphgym/custom_graphgym/__init__.py5
LOWgraphgym/custom_graphgym/__init__.py6
LOWgraphgym/custom_graphgym/__init__.py7
LOWgraphgym/custom_graphgym/__init__.py8
LOWgraphgym/custom_graphgym/__init__.py9
LOWgraphgym/custom_graphgym/__init__.py10
LOWgraphgym/custom_graphgym/__init__.py11
LOWgraphgym/custom_graphgym/__init__.py12
LOWgraphgym/custom_graphgym/__init__.py13
LOWgraphgym/custom_graphgym/network/example.py5
LOWtorch_geometric/experimental.py9
LOWtorch_geometric/__init__.py6
LOWtorch_geometric/__init__.py6
LOWtorch_geometric/__init__.py7
LOWtorch_geometric/__init__.py7
LOWtorch_geometric/__init__.py11
LOWtorch_geometric/__init__.py12
LOWtorch_geometric/__init__.py12
LOWtorch_geometric/__init__.py13
LOWtorch_geometric/__init__.py13
LOWtorch_geometric/__init__.py13
LOWtorch_geometric/__init__.py14
LOWtorch_geometric/__init__.py15
LOWtorch_geometric/__init__.py15
LOWtorch_geometric/__init__.py15
LOWtorch_geometric/__init__.py27
LOWtorch_geometric/__init__.py27
LOWtorch_geometric/__init__.py27
LOWtorch_geometric/config_store.py23
LOWtorch_geometric/typing.py166
LOWtorch_geometric/typing.py311
LOWtorch_geometric/visualization/__init__.py3
LOWtorch_geometric/visualization/__init__.py3
LOWtorch_geometric/visualization/__init__.py4
820 more matches not shown…
Hyper-Verbose Identifiers645 hits · 622 pts
SeverityFileLineSnippet
LOWbenchmark/utils/utils.py39def get_dataset_with_transformation(name, root, use_sparse_tensor=False,
LOWbenchmark/kernel/train_eval.py20def cross_validation_with_val_set(dataset, model, folds, epochs, batch_size,
LOWtest/test_warnings.py15def test_no_warn_if_compiling(_):
LOWtest/test_onnx.py32def test_safe_onnx_export_ci_resilient() -> None:
LOWtest/test_onnx.py62def test_safe_onnx_export_success() -> None:
LOWtest/test_onnx.py107def test_safe_onnx_export_with_skip_on_error() -> None:
LOWtest/test_onnx.py134def test_serde_error_patterns() -> None:
LOWtest/test_onnx.py173def test_non_serde_error_reraise() -> None:
LOWtest/test_onnx.py303def test_pytest_environment_detection() -> None:
LOWtest/test_config_mixin.py116def test_config_mixin_compound() -> None:
LOWtest/test_edge_index.py1375def test_compile_create_edge_index():
LOWtest/test_inspector.py102def test_get_params_from_method_call() -> None:
LOWtest/visualization/test_graph_visualization.py12def test_visualize_graph_via_graphviz(tmp_path, backend):
LOWtest/visualization/test_graph_visualization.py26def test_visualize_graph_via_graphviz_with_node_labels(tmp_path, backend):
LOWtest/visualization/test_graph_visualization.py41def test_visualize_graph_via_networkx(tmp_path, backend):
LOWtest/llm/conftest.py8def pytest_collection_modifyitems(items):
LOWtest/llm/test_rag_loader.py97 def test_initialization_basic(self):
LOWtest/llm/test_rag_loader.py108 def test_initialization_with_all_params(self):
LOWtest/llm/test_rag_loader.py140 def test_basic_query_without_vector_retriever(self):
LOWtest/llm/test_rag_loader.py156 def test_query_with_vector_retriever(self):
LOWtest/llm/test_rag_loader.py177 def test_query_with_subgraph_filter(self):
LOWtest/llm/test_rag_loader.py204def test_rag_loader_integration(tmp_path):
LOWtest/llm/test_large_graph_indexer.py130 def _sorted_tensors_are_close(tensor1, tensor2):
LOWtest/llm/test_txt2qa.py67 def test_route_after_validation_continue(self):
LOWtest/llm/test_txt2qa.py73 def test_route_after_validation_feedback(self):
LOWtest/llm/test_txt2qa.py95def test_generate_single_query_nim(tmp_path):
LOWtest/llm/utils/test_rag_backend_utils.py101def create_mock_graph_and_triples():
LOWtest/llm/utils/test_rag_backend_utils.py121def test_apply_retrieval_via_pcst_isolated_node():
LOWtest/llm/utils/test_rag_backend_utils.py171 def test_create_graph_basic_functionality(self):
LOWtest/llm/utils/test_rag_backend_utils.py192 def test_create_graph_empty_triples(self):
LOWtest/llm/utils/test_rag_backend_utils.py219 def test_create_backend_data_load(self):
LOWtest/llm/utils/test_rag_feature_store.py43 def test_retrieve_seed_nodes_single_query(self):
LOWtest/llm/utils/test_rag_feature_store.py78 def test_retrieve_seed_nodes_multiple_queries(self):
LOWtest/llm/utils/test_rag_feature_store.py112 def test_load_subgraph_valid_sample(self, induced):
LOWtest/llm/utils/test_rag_graph_store.py18def test_sample_subgraph_with_valid_tensor_input():
LOWtest/llm/models/test_glem.py10def test_deal_nan_tensor_replaces_nans():
LOWtest/llm/models/test_glem.py20def test_deal_nan_non_tensor_passthrough():
LOWtest/llm/models/test_glem.py26def test_deal_nan_tensor_dtypes(dtype):
LOWtest/llm/models/test_glem.py46def test_deal_nan_is_non_mutating():
LOWtest/llm/models/test_glem.py76def test_glem_bert_tiny_branch(monkeypatch):
LOWtest/llm/models/test_glem.py101def test_glem_auto_model_branch(monkeypatch):
LOWtest/llm/models/test_llm.py127def test_llm_variable_lengths(dummy_llm):
LOWtest/llm/models/test_sentence_transformer.py17def test_sentence_transformer(batch_size, pooling_strategy, device, verbose):
LOWtest/llm/models/test_g_retriever.py63def test_g_retriever_many_tokens() -> None:
LOWtest/llm/models/test_g_retriever.py160def test_gretriever_prefix_embedding_injection(batch_size):
LOWtest/llm/models/test_txt2kg.py22def test_parse_n_check_triples_formats():
LOWtest/llm/models/test_txt2kg.py29def test_chunk_text_simple_sentence():
LOWtest/llm/models/test_txt2kg.py44def test_local_lm_integration(monkeypatch):
LOWtest/llm/models/test_txt2kg.py83def test_merge_triples_deterministically_basic():
LOWtest/llm/models/test_txt2kg.py101def test_merge_triples_deterministically_unicode_and_nonstring():
LOWtest/llm/models/test_txt2kg.py119def test_merge_triples_deterministically_empty():
LOWtest/llm/models/test_txt2kg.py127def test_merge_triples_deterministically_singleton():
LOWtest/llm/models/test_txt2kg.py135def test_chunk_to_triples_str_cloud(monkeypatch):
LOWtest/llm/models/test_txt2kg.py191def test_extract_relevant_triples_cloud(monkeypatch):
LOWtest/llm/models/test_txt2kg.py202def test_multiproc_helper_success(monkeypatch):
LOWtest/llm/models/test_txt2kg.py233def test_multiproc_helper_retry(monkeypatch):
LOWtest/llm/models/test_txt2kg.py292def test_add_doc_empty_text_cpu(kg_cpu):
LOWtest/llm/models/test_txt2kg.py308def test_add_doc_nonempty_text_placeholder(kg_cpu, monkeypatch):
LOWtest/explain/conftest.py139 def _check_explanation_hetero(
LOWtest/explain/test_explanation.py13def create_random_explanation(
585 more matches not shown…
Deep Nesting243 hits · 236 pts
SeverityFileLineSnippet
LOWbenchmark/citation/train_eval.py43
LOWbenchmark/citation/train_eval.py121
LOWbenchmark/training/training_benchmark.py98
LOWbenchmark/loader/neighbor_loader.py16
LOWbenchmark/points/train_eval.py58
LOWbenchmark/inference/inference_benchmark.py44
LOWbenchmark/kernel/main_performance.py75
LOWbenchmark/kernel/main_performance.py117
LOWbenchmark/kernel/train_eval.py20
LOWtest/test_onnx.py32
LOWtest/test_onnx.py62
LOWtest/test_onnx.py107
LOWtest/test_onnx.py134
LOWtest/test_onnx.py173
LOWtest/test_onnx.py197
LOWtest/test_onnx.py233
LOWtest/test_onnx.py272
LOWtest/test_onnx.py303
LOWtest/test_onnx.py335
LOWtest/test_onnx.py385
LOWtest/explain/conftest.py106
LOWtest/explain/conftest.py138
LOWtest/explain/conftest.py86
LOWtest/explain/conftest.py107
LOWtest/explain/conftest.py139
LOWtest/explain/conftest.py289
LOWtest/explain/test_hetero_explanation.py13
LOWtest/explain/algorithm/test_captum.py65
LOWtest/explain/algorithm/test_attention_explainer.py69
LOWtest/explain/algorithm/test_attention_explainer.py145
LOWtest/explain/algorithm/test_graphmask_explainer.py28
LOWtest/explain/algorithm/test_gnn_explainer.py38
LOWtest/explain/algorithm/test_captum_hetero.py35
LOWtest/explain/algorithm/test_captum_explainer.py54
LOWtest/distributed/test_dist_neighbor_loader.py82
LOWtest/utils/conftest.py35
LOWtest/sampler/test_sampler_neighbor_sampler.py63
LOWgraphgym/configs_gen.py90
LOWgraphgym/configs_gen.py124
LOWgraphgym/configs_gen.py166
LOWtorch_geometric/experimental.py95
LOWtorch_geometric/experimental.py100
LOWtorch_geometric/experimental.py115
LOWtorch_geometric/index.py696
LOWtorch_geometric/edge_index.py1477
LOWtorch_geometric/edge_index.py1849
LOWtorch_geometric/inspector.py514
LOWtorch_geometric/inspector.py207
LOWtorch_geometric/inspector.py336
LOWtorch_geometric/config_store.py190
LOWtorch_geometric/config_store.py31
LOWtorch_geometric/config_store.py119
LOWtorch_geometric/config_store.py36
LOWtorch_geometric/config_store.py124
LOWtorch_geometric/hash_tensor.py39
LOWtorch_geometric/llm/models/qa_gen.py1384
LOWtorch_geometric/llm/models/qa_gen.py1715
LOWtorch_geometric/llm/models/qa_gen.py2239
LOWtorch_geometric/llm/models/qa_gen.py2350
LOWtorch_geometric/llm/models/qa_gen.py2414
183 more matches not shown…
Cross-File Repetition20 hits · 100 pts
SeverityFileLineSnippet
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
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
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
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
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
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
HIGHtorch_geometric/nn/models/deep_graph_infomax.py0evaluates latent space quality via a logistic regression downstream task.
HIGHtorch_geometric/nn/models/node2vec.py0evaluates latent space quality via a logistic regression downstream task.
HIGHtorch_geometric/nn/models/metapath2vec.py0evaluates latent space quality via a logistic regression downstream task.
HIGHtorch_geometric/nn/norm/pair_norm.py0forward pass. args: x (torch.tensor): the source tensor. batch (torch.tensor, optional): the batch vector :math:`\mathbf
HIGHtorch_geometric/nn/norm/graph_size_norm.py0forward pass. args: x (torch.tensor): the source tensor. batch (torch.tensor, optional): the batch vector :math:`\mathbf
HIGHtorch_geometric/nn/norm/instance_norm.py0forward pass. args: x (torch.tensor): the source tensor. batch (torch.tensor, optional): the batch vector :math:`\mathbf
HIGHtorch_geometric/nn/norm/graph_norm.py0forward pass. args: x (torch.tensor): the source tensor. batch (torch.tensor, optional): the batch vector :math:`\mathbf
HIGHtorch_geometric/nn/norm/layer_norm.py0forward pass. args: x (torch.tensor): the source tensor. batch (torch.tensor, optional): the batch vector :math:`\mathbf
HIGHtorch_geometric/data/feature_store.py0to be implemented by :class:`featurestore` subclasses.
HIGHtorch_geometric/data/feature_store.py0to be implemented by :class:`featurestore` subclasses.
HIGHtorch_geometric/data/feature_store.py0to be implemented by :class:`featurestore` subclasses.
HIGHtorch_geometric/data/graph_store.py0to be implemented by :class:`graphstore` subclasses.
HIGHtorch_geometric/data/graph_store.py0to be implemented by :class:`graphstore` subclasses.
HIGHtorch_geometric/data/graph_store.py0to be implemented by :class:`graphstore` subclasses.
Self-Referential Comments30 hits · 82 pts
SeverityFileLineSnippet
MEDIUMtest/llm/utils/test_rag_feature_store.py116 # Create a mock SamplerOutput
MEDIUMtest/llm/models/test_glem.py27 # Create a tensor with one NaN value
MEDIUMtest/explain/conftest.py268 # Create a HeteroConv model
MEDIUMtest/explain/algorithm/test_attention_explainer.py44 # Create a single BaseGNN that uses all three attention mechanisms
MEDIUMtest/explain/algorithm/test_attention_explainer.py105 # Create a dictionary of attention-based convolutions for each edge
MEDIUMtest/explain/algorithm/test_attention_explainer.py122 # Create the HeteroConv layer
MEDIUMtest/explain/algorithm/test_attention_explainer.py251 # Create the hetero attention model
MEDIUMtest/explain/algorithm/test_attention_explainer.py254 # Create the explainer
MEDIUMtest/explain/algorithm/test_attention_explainer.py290 # Create the hetero conv attention model
MEDIUMtest/explain/algorithm/test_attention_explainer.py293 # Create the explainer
MEDIUMtest/utils/test_negative_sampling.py33 # Create a fully-connected graph:
MEDIUMtorch_geometric/llm/utils/vectorrag.py121 # Create a new DocumentRetriever with the loaded data
MEDIUMtorch_geometric/nn/to_hetero_with_bases_transformer.py537# This method is used to split the output tensors into individual type-wise
MEDIUMtorch_geometric/nn/aggr/base.py47 # Define the boundary indices for three sets:
MEDIUMtorch_geometric/datasets/web_qsp_dataset.py124 # Create an iterator for each element's graph in the current split
MEDIUMtorch_geometric/datasets/ged_dataset.py208 # Create a one-hot encoded feature matrix denoting the atom
MEDIUMtorch_geometric/data/remote_backend_utils.py1# This file defines a set of utilities for remote backends (backends that are
MEDIUMtorch_geometric/data/in_memory_dataset.py232 # Create the on-disk dataset ==========================================
MEDIUMtorch_geometric/data/database.py307 # Create the table (if it does not exist) by mapping the Python schema
MEDIUMtorch_geometric/data/hetero_data.py63 # Create an edge type "(author, writes, paper)" and building the
MEDIUMtorch_geometric/data/lightning/datamodule.py127 # Define a new `NeighborSampler` to be re-used across data loaders:
MEDIUMexamples/llm/txt2qa.py158 # Create the graph
MEDIUMexamples/llm/g_retriever.py62 # Create a dictionary mapping parameter names to their requires_grad status
MEDIUMexamples/llm/txt2qa_config/text_config_nim.yaml2# This file contains all the settings for the QA generation workflow
MEDIUMexamples/llm/txt2qa_config/text_config_vllm.yaml2# This file contains all the settings for the QA generation workflow
MEDIUMexamples/distributed/kuzu/papers_100M/train.py32# The below code sets up the remote backend of Kùzu for PyG.
MEDIUM…d/graphlearn_for_pytorch/dist_train_sage_supervised.py126 # Define the model and optimizer.
MEDIUMexamples/quiver/multi_gpu_quiver.py131 # The below code enable Quiver for PyG.
MEDIUMexamples/quiver/single_gpu_quiver.py28# The below code enable Quiver for PyG.
MEDIUMexamples/pytorch_ignite/gin.py127 # Create a tensorboard logger to write logs:
Excessive Try-Catch Wrapping94 hits · 80 pts
SeverityFileLineSnippet
LOWtest/nn/dense/test_linear.py274 except Exception:
LOWtorch_geometric/device.py12 except Exception:
LOWtorch_geometric/config_store.py19except Exception:
LOWtorch_geometric/config_store.py25except Exception:
LOWtorch_geometric/_onnx.py77 except Exception as e:
LOWtorch_geometric/_onnx.py130 except Exception:
LOWtorch_geometric/_onnx.py148 except Exception:
LOWtorch_geometric/_onnx.py164 except Exception:
LOWtorch_geometric/_onnx.py186 except Exception:
LOWtorch_geometric/typing.py82 except Exception:
LOWtorch_geometric/typing.py87 except Exception:
LOWtorch_geometric/typing.py89except Exception as e:
LOWtorch_geometric/typing.py141except Exception as e:
LOWtorch_geometric/typing.py169except Exception as e:
LOWtorch_geometric/typing.py302except Exception:
LOWtorch_geometric/typing.py313except Exception:
LOWtorch_geometric/hash_tensor.py46 except Exception:
LOWtorch_geometric/metrics/link_pred.py13except Exception:
LOWtorch_geometric/llm/models/qa_gen.py1154 except Exception as e:
LOWtorch_geometric/llm/models/qa_gen.py1163 except Exception as e:
LOWtorch_geometric/llm/models/qa_gen.py613 except Exception as e:
LOWtorch_geometric/llm/models/qa_gen.py635 except Exception:
LOWtorch_geometric/llm/models/qa_gen.py780 except Exception as e:
LOWtorch_geometric/llm/models/qa_gen.py821 except Exception as e:
LOWtorch_geometric/llm/models/qa_gen.py834 except Exception:
LOWtorch_geometric/llm/models/qa_gen.py852 except Exception as e2:
LOWtorch_geometric/llm/models/qa_gen.py1109 except Exception as e:
LOWtorch_geometric/llm/models/qa_gen.py1344 except Exception as e:
LOWtorch_geometric/llm/models/qa_gen.py1501 except Exception:
LOWtorch_geometric/llm/models/qa_gen.py1551 except Exception:
LOWtorch_geometric/llm/models/qa_gen.py1702 except Exception:
LOWtorch_geometric/llm/models/qa_gen.py2753 except Exception:
LOWtorch_geometric/llm/models/qa_gen.py2905 except Exception as e:
LOWtorch_geometric/llm/models/qa_gen.py3022 except Exception as e:
LOWtorch_geometric/llm/models/qa_gen.py3061 except Exception as e:
LOWtorch_geometric/llm/models/qa_gen.py3323 except Exception as e:
LOWtorch_geometric/llm/models/qa_gen.py3492 except Exception as e:
LOWtorch_geometric/llm/models/qa_gen.py3515 except Exception as e:
LOWtorch_geometric/llm/models/qa_gen.py3635 except Exception as e:
LOWtorch_geometric/llm/models/qa_gen.py3854 except Exception as e:
LOWtorch_geometric/llm/models/qa_gen.py3881 except Exception as e:
LOWtorch_geometric/llm/models/qa_gen.py4201 except Exception as e:
LOWtorch_geometric/llm/models/qa_gen.py4376 except Exception as e:
LOWtorch_geometric/llm/models/qa_gen.py3586 except Exception as e:
LOWtorch_geometric/llm/models/qa_gen.py3596 except Exception as e1:
LOWtorch_geometric/llm/models/qa_gen.py2231 except Exception:
LOWtorch_geometric/llm/models/qa_gen.py2369 except Exception:
LOWtorch_geometric/llm/models/qa_gen.py3750 except Exception as e:
LOWtorch_geometric/llm/models/txt2kg.py195 except Exception as e:
LOWtorch_geometric/llm/models/txt2kg.py317 except Exception:
LOWtorch_geometric/llm/models/txt2kg.py334 except Exception:
LOW…rch_geometric/explain/algorithm/graphmask_explainer.py410 except Exception:
LOW…rch_geometric/explain/algorithm/graphmask_explainer.py416 except Exception:
LOWtorch_geometric/nn/sequential.py265 except Exception as e: # pragma: no cover
LOWtorch_geometric/nn/conv/message_passing.py961 except Exception as e: # pragma: no cover
LOWtorch_geometric/nn/conv/message_passing.py994 except Exception as e: # pragma: no cover
LOWtorch_geometric/distributed/event_loop.py22 except Exception as e:
LOWtorch_geometric/distributed/event_loop.py84 except Exception as e:
MEDIUMtorch_geometric/distributed/event_loop.py19def on_done(*_):
LOWtorch_geometric/distributed/dist_neighbor_sampler.py392 except Exception:
34 more matches not shown…
Hallucination Indicators4 hits · 40 pts
SeverityFileLineSnippet
CRITICALtest/test_config_store.py118 assert (cfg.dataset.transform.NormalizeFeatures._target_.split('.')[-1] ==
CRITICALtest/test_config_store.py123 assert (cfg.dataset.transform.AddSelfLoops._target_.split('.')[-1] ==
CRITICALtest/data/lightning/test_datamodule.py50 self.trainer.datamodule.train_dataset._data.x.add_(1)
CRITICALtest/data/lightning/test_datamodule.py177 self.trainer.datamodule.data.x.add_(1)
AI Slop Vocabulary18 hits · 31 pts
SeverityFileLineSnippet
MEDIUMtest/test_onnx.py67 # Use comprehensive mocking to avoid any real ONNX calls
MEDIUMtest/test_onnx.py146 # Use multiple patch targets to ensure comprehensive mocking
MEDIUMtest/test_onnx.py178 # Use comprehensive mocking to prevent real ONNX calls
MEDIUMtorch_geometric/backend.py8# If set to `None`, will automatically decide whether to utilize
LOWtorch_geometric/llm/models/qa_gen.py2816 # No hop contexts, just use top-level as-is
MEDIUMtorch_geometric/nn/sequential.py31 r"""An extension of the :class:`torch.nn.Sequential` container in order to
LOWtorch_geometric/datasets/karate.py76 # (we just use the first one).
MEDIUMtorch_geometric/datasets/medshapenet.py75 r"""The absolute filepaths that must be present in order to skip
MEDIUMtorch_geometric/contrib/nn/models/rbcd_attack.py602 <https://www.cs.cit.tum.de/daml/are-gnn-defenses-robust>`_ for details.
MEDIUMtorch_geometric/profile/profile.py49 r"""A decorator to facilitate profiling a function, *e.g.*, obtaining
MEDIUMtorch_geometric/profile/profile.py145 r"""A context decorator to facilitate timing a function, *e.g.*, obtaining
MEDIUMtorch_geometric/loader/node_loader.py274 # f'best practices for PyG [{link}])')
MEDIUMtorch_geometric/loader/utils.py233 # NOTE Here, we utilize `feature_store.multi_get` to give the feature store
MEDIUMtorch_geometric/loader/utils.py267 # NOTE Here, we utilize `feature_store.multi_get` to give the feature store
LOWtorch_geometric/data/collate.py274 # Other-wise, just return the list of values as it is.
MEDIUMtorch_geometric/data/dataset.py199 r"""The absolute filepaths that must be present in order to skip
MEDIUMtorch_geometric/data/dataset.py211 r"""The absolute filepaths that must be present in order to skip
LOWexamples/llm/txt2qa.py510 # If file_path is not relative to input_dir, just use the stem
Redundant / Tautological Comments15 hits · 20 pts
SeverityFileLineSnippet
LOWtest/explain/algorithm/test_pg_explainer.py222 # Check if the explanation is valid
LOWtest/explain/algorithm/test_pg_explainer.py371 # Check if the explanation is valid
LOWtest/explain/algorithm/test_pg_explainer.py467 # Check if the explanation is valid
LOWtest/loader/test_link_neighbor_loader.py284 # Check if each seed edge has a different batch:
LOWtorch_geometric/llm/utils/backend_utils.py383 ) # Check if pandas is installed
LOWtorch_geometric/llm/models/qa_gen.py3847 # Check if segment overlaps with QA time range
LOWtorch_geometric/llm/models/qa_gen.py4174 # Check if we have context_segments from processing
LOW…rch_geometric/explain/algorithm/attention_explainer.py128 # Check if all components appear in the module name in
LOW…rch_geometric/explain/algorithm/attention_explainer.py180 # Check if we collected any attention coefficients.
LOWtorch_geometric/datasets/tag_dataset.py368 # Check if the .pt files already exist
LOWtorch_geometric/io/fs.py167 # Open file has protocol stripped.
LOWtorch_geometric/utils/embedding.py97 # Check if the outputs is a dictionary mapping node types to embeddings
LOWtorch_geometric/contrib/nn/models/rbcd_attack.py497 # Check if middle point is root
LOWexamples/llm/txt2qa.py394 # Check if file exists before removing
LOWexamples/llm/txt2qa.py531 # Check if output file already exists (resume functionality)
Decorative Section Separators6 hits · 14 pts
SeverityFileLineSnippet
MEDIUMtest/utils/test_scatter.py144 # ================
MEDIUMtest/utils/test_scatter.py153 # ================
MEDIUMtest/utils/test_segment.py58 # ================
MEDIUMtest/utils/test_segment.py63 # ================
MEDIUMtorch_geometric/graphgym/config.py321 # ===================================
MEDIUMtorch_geometric/graphgym/config.py329 # ===================================
Verbosity Indicators12 hits · 14 pts
SeverityFileLineSnippet
LOWtorch_geometric/llm/models/qa_gen.py1390 # Step 1: Clean markdown code blocks
LOWtorch_geometric/llm/models/qa_gen.py1395 # Step 2: Try direct parsing first (fastest path)
LOWtorch_geometric/llm/models/qa_gen.py1406 # Step 3: Find JSON array/object with bracket counting
LOWtorch_geometric/llm/models/qa_gen.py1470 # Step 4: Last resort - old regex fallback
LOWtorch_geometric/llm/models/qa_gen.py2009 # Step 1: Calculate exact (floating-point) values for each category
LOWtorch_geometric/llm/models/qa_gen.py2016 # Step 2: Sort by fractional part descending (0.9, 0.9, 0.2)
LOWtorch_geometric/llm/models/qa_gen.py2021 # Step 3: Assign floor values first (everyone gets their integer part)
LOWtorch_geometric/llm/models/qa_gen.py2027 # Step 4: Distribute remaining items based on fractional parts
LOWtorch_geometric/llm/models/qa_gen.py2035 # Step 5: Edge case - if still items left (e.g., rounding errors)
LOWexamples/quiver/single_gpu_quiver.py21# Step 1: Using Quiver's sampler
LOWexamples/quiver/single_gpu_quiver.py99# Step 2: Using Quiver's Feature
LOWexamples/quiver/single_gpu_quiver.py117 # Step 3: Training the PyG Model with Quiver
Over-Commented Block7 hits · 7 pts
SeverityFileLineSnippet
LOWtest/utils/test_scatter.py141
LOWtest/sampler/test_sampler_neighbor_sampler.py521 expected_output = SamplerOutput(
LOWtorch_geometric/nn/conv/meshcnn_conv.py401 # Option 2
LOWtorch_geometric/graphgym/config.py301 # Auto match computational budget, match upper bound / lower bound
LOWtorch_geometric/graphgym/config.py321 # ===================================
LOWexamples/tgn.py1# This code achieves a performance of around 96.60%. However, it is not
LOW.github/workflows/testing.yml81 "os": ["ubuntu-22.04", "macos-14", "windows-2022"],
Docstring Block Structure1 hit · 5 pts
SeverityFileLineSnippet
HIGHtorch_geometric/nn/models/gpse.py1009Calculates the average cosine similarity between predicted and true features on a batch of graphs. Args:
Cross-Language Confusion1 hit · 5 pts
SeverityFileLineSnippet
HIGHtorch_geometric/utils/geodesic.py29 To install, run :obj:`pip install cython && pip install gdist`.
Overly Generic Function Names2 hits · 2 pts
SeverityFileLineSnippet
LOWtorch_geometric/distributed/event_loop.py92 def run_task(self, coro):
LOWexamples/llm/txt2qa.py516 async def process_data(self, data: str, data_id: str,
Slop Phrases1 hit · 0 pts
SeverityFileLineSnippet
LOWtorch_geometric/io/fs.py145 # If the source path points to a directory, we need to make sure to