Repository Analysis

pytorch/tutorials

PyTorch tutorials.

61.5 Strong AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of pytorch/tutorials, a Python project with 9,236 GitHub stars. SynthScan v2.0 examined 57,407 lines of code across 238 source files, recording 2063 pattern matches distributed across 18 syntactic categories. The overall adjusted score of 61.5 places this repository in the Strong 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).

61.5
Adjusted Score
61.5
Raw Score
100%
Time Factor
2026-07-09
Last Push
9.2K
Stars
Python
Language
57.4K
Lines of Code
238
Files
2.1K
Pattern Hits
2026-07-14
Scan Date
0.08
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

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

No multi-scan history yet — run the scanner again to build trend data.

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 0HIGH 20MEDIUM 732LOW 1311

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 2063 distinct pattern matches across 18 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.

Decorative Section Separators593 hits · 1810 pts
SeverityFileLineSnippetContext
MEDIUMrecipes_source/foreach_map.py23# -------------COMMENT
MEDIUMrecipes_source/regional_compilation.py172# -----------COMMENT
MEDIUMrecipes_source/torch_export_aoti_python.py37# -------------COMMENT
MEDIUMrecipes_source/torch_export_aoti_python.py44# ----------------------COMMENT
MEDIUMrecipes_source/torch_export_aoti_python.py52# -----------------COMMENT
MEDIUMrecipes_source/torch_export_aoti_python.py167# -------------------------COMMENT
MEDIUMrecipes_source/torch_export_aoti_python.py187# ---------------------------------------------COMMENT
MEDIUMrecipes_source/torch_export_aoti_python.py270# ----------COMMENT
MEDIUMrecipes_source/torch_compiler_set_stance_tutorial.py21# ---------------COMMENT
MEDIUMrecipes_source/torch_compiler_set_stance_tutorial.py27# -----------COMMENT
MEDIUMrecipes_source/torch_compiler_set_stance_tutorial.py174# ===========================COMMENT
MEDIUMrecipes_source/torch_compiler_set_stance_tutorial.py215# ===============COMMENT
MEDIUMrecipes_source/torch_compiler_set_stance_tutorial.py236# --------------COMMENT
MEDIUMrecipes_source/regional_aot.py52# ---------------------------COMMENT
MEDIUMrecipes_source/regional_aot.py95# ---------------------------------COMMENT
MEDIUMrecipes_source/regional_aot.py125# ----------------------------------------------COMMENT
MEDIUMrecipes_source/regional_aot.py174# --------------------------COMMENT
MEDIUMrecipes_source/regional_aot.py235# -----------COMMENT
MEDIUM…e/torch_compile_user_defined_triton_kernel_tutorial.py19# -------------------COMMENT
MEDIUM…e/torch_compile_user_defined_triton_kernel_tutorial.py38# --------------------COMMENT
MEDIUM…e/torch_compile_user_defined_triton_kernel_tutorial.py83# -------------------------------------------------------------------COMMENT
MEDIUM…e/torch_compile_user_defined_triton_kernel_tutorial.py144# -------------------------------------------------------------------COMMENT
MEDIUM…e/torch_compile_user_defined_triton_kernel_tutorial.py344# --------------------------------------------------------------------COMMENT
MEDIUM…e/torch_compile_user_defined_triton_kernel_tutorial.py361# -----------COMMENT
MEDIUMrecipes_source/debug_mode_tutorial.py50# -----------COMMENT
MEDIUMrecipes_source/debug_mode_tutorial.py72# -----------COMMENT
MEDIUMrecipes_source/debug_mode_tutorial.py108# ------------------COMMENT
MEDIUMrecipes_source/debug_mode_tutorial.py133# --------------------------------------COMMENT
MEDIUMrecipes_source/debug_mode_tutorial.py215# ---------------------COMMENT
MEDIUMrecipes_source/debug_mode_tutorial.py239# ----------------------------------COMMENT
MEDIUMrecipes_source/debug_mode_tutorial.py273# ----------COMMENT
MEDIUMrecipes_source/recipes/tensorboard_with_pytorch.py23# -----------------------------COMMENT
MEDIUMrecipes_source/recipes/tensorboard_with_pytorch.py40# -----------COMMENT
MEDIUMrecipes_source/recipes/tensorboard_with_pytorch.py86# ----------------COMMENT
MEDIUMrecipes_source/recipes/tensorboard_with_pytorch.py118# ----------------------------COMMENT
MEDIUMrecipes_source/recipes/swap_tensors.py19# ----------------------------COMMENT
MEDIUMrecipes_source/recipes/swap_tensors.py37# ----------------------------COMMENT
MEDIUMrecipes_source/recipes/swap_tensors.py56# --------------------------------------COMMENT
MEDIUMrecipes_source/recipes/swap_tensors.py146# --------------------------------COMMENT
MEDIUMrecipes_source/recipes/swap_tensors.py237# ----------COMMENT
MEDIUMrecipes_source/recipes/benchmark.py883# ----------COMMENT
MEDIUMrecipes_source/recipes/profiler_recipe.py12# ------------COMMENT
MEDIUMrecipes_source/recipes/profiler_recipe.py20# ---------------COMMENT
MEDIUMrecipes_source/recipes/profiler_recipe.py477# ----------COMMENT
MEDIUMrecipes_source/recipes/defining_a_neural_network.py178# ----------COMMENT
MEDIUMrecipes_source/recipes/zeroing_out_gradients.py188# ----------COMMENT
MEDIUMrecipes_source/recipes/tuning_guide.py212# --------------------------COMMENT
MEDIUMrecipes_source/recipes/tuning_guide.py289# --------------------------COMMENT
MEDIUMrecipes_source/recipes/tuning_guide.py434# -------------------------COMMENT
MEDIUMrecipes_source/recipes/tuning_guide.py510# ----------COMMENT
MEDIUMrecipes_source/recipes/tuning_guide.py528# ---------------COMMENT
MEDIUMrecipes_source/recipes/Captum_Recipe.py26# ----------------COMMENT
MEDIUMrecipes_source/recipes/Captum_Recipe.py72# ---------------------COMMENT
MEDIUMrecipes_source/recipes/Captum_Recipe.py123# -----------------------COMMENT
MEDIUMrecipes_source/recipes/Captum_Recipe.py173# -----------COMMENT
MEDIUMrecipes_source/recipes/what_is_state_dict.py128# ----------COMMENT
MEDIUM…rting_model_using_parameters_from_a_different_model.py137# ----------COMMENT
MEDIUMrecipes_source/recipes/amp_recipe.py52# ----------------COMMENT
MEDIUMrecipes_source/recipes/amp_recipe.py92# -----------------COMMENT
MEDIUMrecipes_source/recipes/amp_recipe.py110# -------------------------COMMENT
533 more matches not shown…
Over-Commented Block1103 hits · 921 pts
SeverityFileLineSnippetContext
LOWconf.py1#!/usr/bin/env python3COMMENT
LOWconf.py301COMMENT
LOWconf.py341# If true, `todo` and `todoList` produce output, else they produce nothing.COMMENT
LOWconf.py361# 'sidebar_includehidden': TrueCOMMENT
LOWconf.py381COMMENT
LOWrecipes_source/foreach_map.py1"""COMMENT
LOWrecipes_source/foreach_map.py21#COMMENT
LOWrecipes_source/foreach_map.py141# Setting up and running the compiled kernelCOMMENT
LOWrecipes_source/foreach_map.py201# See also:COMMENT
LOWrecipes_source/regional_compilation.py41# 1. Import all necessary libraries.COMMENT
LOWrecipes_source/regional_compilation.py101####################################################COMMENT
LOWrecipes_source/regional_compilation.py121#COMMENT
LOWrecipes_source/torch_export_aoti_python.py21# runtime.COMMENT
LOWrecipes_source/torch_export_aoti_python.py41COMMENT
LOWrecipes_source/torch_export_aoti_python.py61# Once we have exported the PyTorch model and obtained an ``ExportedProgram``,COMMENT
LOWrecipes_source/torch_export_aoti_python.py101 )COMMENT
LOWrecipes_source/torch_export_aoti_python.py121# │ │ ├── xxx.cpp # AOTInductor generated cpp fileCOMMENT
LOWrecipes_source/torch_export_aoti_python.py141# Length Date Time NameCOMMENT
LOWrecipes_source/torch_export_aoti_python.py181with torch.inference_mode():COMMENT
LOWrecipes_source/torch_export_aoti_python.py261 _, time_taken = timed(lambda: model(example_inputs))COMMENT
LOWrecipes_source/torch_compiler_set_stance_tutorial.py1# -*- coding: utf-8 -*-COMMENT
LOWrecipes_source/torch_compiler_set_stance_tutorial.py21# ---------------COMMENT
LOWrecipes_source/torch_compiler_set_stance_tutorial.py241# to control compilation stances like ``force_eager``, ``default``,COMMENT
LOWrecipes_source/regional_aot.py41#COMMENT
LOWrecipes_source/regional_aot.py161COMMENT
LOWrecipes_source/regional_aot.py221regional_compilation_latency = measure_compile_time(input, regional=True)COMMENT
LOWrecipes_source/torch_compile_torch_function_modes.py1"""COMMENT
LOWrecipes_source/compiling_optimizer_lr_scheduler.py1"""COMMENT
LOWrecipes_source/compiling_optimizer_lr_scheduler.py41#COMMENT
LOWrecipes_source/compiling_optimizer_lr_scheduler.py101######################################################################COMMENT
LOWrecipes_source/torch_logs.py21######################################################################COMMENT
LOWrecipes_source/torch_logs.py81######################################################################COMMENT
LOW…e/torch_compile_user_defined_triton_kernel_tutorial.py1# -*- coding: utf-8 -*-COMMENT
LOW…e/torch_compile_user_defined_triton_kernel_tutorial.py21# Before starting this recipe, make sure that you have the following:COMMENT
LOW…e/torch_compile_user_defined_triton_kernel_tutorial.py81######################################################################COMMENT
LOW…e/torch_compile_user_defined_triton_kernel_tutorial.py141COMMENT
LOW…e/torch_compile_user_defined_triton_kernel_tutorial.py161# Here’s a chart of which API to use when integrating Triton kernels with PyTorch.COMMENT
LOW…e/torch_compile_user_defined_triton_kernel_tutorial.py181# - YesCOMMENT
LOW…e/torch_compile_user_defined_triton_kernel_tutorial.py341COMMENT
LOW…e/torch_compile_user_defined_triton_kernel_tutorial.py361# -----------COMMENT
LOWrecipes_source/debug_mode_tutorial.py21COMMENT
LOWrecipes_source/debug_mode_tutorial.py41#COMMENT
LOWrecipes_source/debug_mode_tutorial.py61 return torch.mm(torch.relu(x), y)COMMENT
LOWrecipes_source/debug_mode_tutorial.py101######################################################################COMMENT
LOWrecipes_source/recipes/tensorboard_with_pytorch.py21######################################################################COMMENT
LOWrecipes_source/recipes/tensorboard_with_pytorch.py81COMMENT
LOWrecipes_source/recipes/tensorboard_with_pytorch.py101#COMMENT
LOWrecipes_source/recipes/tensorboard_with_pytorch.py121# - `Visualizing models, data, and training with TensorBoard <https://pytorch.org/tutorials/intermediate/tensorboard_tuCOMMENT
LOWrecipes_source/recipes/swap_tensors.py21# utility function that takes in two Python tensors and swaps them.COMMENT
LOWrecipes_source/recipes/swap_tensors.py41# the parameters will not see the change. A classic example of this is theCOMMENT
LOWrecipes_source/recipes/swap_tensors.py61#COMMENT
LOWrecipes_source/recipes/swap_tensors.py141print(f"m.bias.dtype: {m.bias.dtype}")COMMENT
LOWrecipes_source/recipes/swap_tensors.py161#COMMENT
LOWrecipes_source/recipes/swap_tensors.py221print(f"m.state_dict() before load_state_dict():\n {m.state_dict()}")COMMENT
LOWrecipes_source/recipes/benchmark.py41# 3. Benchmarking with ``torch.utils.benchmark.Timer``COMMENT
LOWrecipes_source/recipes/benchmark.py101print(f'bmm(x, x): {t1.timeit(100) / 100 * 1e6:>5.1f} us')COMMENT
LOWrecipes_source/recipes/benchmark.py141# <torch.utils.benchmark.utils.common.Measurement object at 0x7fb10400d0f0>COMMENT
LOWrecipes_source/recipes/benchmark.py201# 1 measurement, 100 runs , 40 threadsCOMMENT
LOWrecipes_source/recipes/benchmark.py261# .. code-block:: noneCOMMENT
LOWrecipes_source/recipes/benchmark.py281# it's important to do a warm-up run before benchmarking, luckily forCOMMENT
1043 more matches not shown…
Self-Referential Comments63 hits · 187 pts
SeverityFileLineSnippetContext
MEDIUMconf.py7# This file is execfile()d with the current directory set to itsCOMMENT
MEDIUMrecipes_source/regional_aot.py51# Defining the Neural NetworkCOMMENT
MEDIUMrecipes_source/recipes/zeroing_out_gradients.py107# Defining a Neural Network recipe.COMMENT
MEDIUMadvanced_source/pendulum.py517# The following code will just put together the pieces we have coded above.COMMENT
MEDIUMunstable_source/maskedtensor_adagrad.py162# Create an entirely new set of parameters to avoid errorsCOMMENT
MEDIUMintermediate_source/reinforcement_ppo.py203# Define an environmentCOMMENT
MEDIUM…ermediate_source/intermediate_data_loading_tutorial.py54# Creating a Sample DatasetCOMMENT
MEDIUMintermediate_source/char_rnn_generation_tutorial.py129# Creating the NetworkCOMMENT
MEDIUMintermediate_source/char_rnn_classification_tutorial.py222# Creating the NetworkCOMMENT
MEDIUMintermediate_source/fx_profiling_tutorial.py82# Creating a Profiling InterpreterCOMMENT
MEDIUMintermediate_source/pinmem_nonblock.py289# Create a figure with the resultsCOMMENT
MEDIUMintermediate_source/pinmem_nonblock.py363# Create a list of tensorsCOMMENT
MEDIUMintermediate_source/pinmem_nonblock.py531 # Create a tensor in pin-memoryCOMMENT
MEDIUMintermediate_source/pinmem_nonblock.py550 # Create a tensor in pageable memoryCOMMENT
MEDIUMintermediate_source/pinmem_nonblock.py647# Create the datasetCOMMENT
MEDIUMintermediate_source/neural_tangent_kernels.py59# Create a function version of the modelCOMMENT
MEDIUMintermediate_source/pruning_tutorial.py35# Create a modelCOMMENT
MEDIUMintermediate_source/torch_compile_tutorial.py53# The following code will print out the PyTorch ops that ``torch.compile`` traced.COMMENT
MEDIUMintermediate_source/ax_multiobjective_nas_tutorial.py45# Defining the TorchX AppCOMMENT
MEDIUMintermediate_source/ax_multiobjective_nas_tutorial.py314# Creating the Ax ExperimentCOMMENT
MEDIUMintermediate_source/mnist_train_nas.py74 # Create a PyTorch modelCOMMENT
MEDIUMintermediate_source/torchvision_tutorial.py25# Defining the DatasetCOMMENT
MEDIUMintermediate_source/torch_compile_conv_bn_fuser.py141# Define the pattern we want to match: conv2d followed by batch_normCOMMENT
MEDIUMintermediate_source/torch_compile_conv_bn_fuser.py179# Create a pattern matcher pass and register our patternCOMMENT
MEDIUMintermediate_source/torch_compile_conv_bn_fuser.py190# Create a custom pass function that applies our patternsCOMMENT
MEDIUMintermediate_source/torch_compile_conv_bn_fuser.py231# Create a model with different shapes than our example_inputsCOMMENT
MEDIUM…ermediate_source/variable_length_attention_tutorial.py271# Creating a TransformerCOMMENT
MEDIUMintermediate_source/visualizing_gradients_tutorial.py137# The following code defines our hooks and gathers descriptive names forCOMMENT
MEDIUMbeginner_source/chatbot_tutorial.py160# The following functions facilitate the parsing of the rawCOMMENT
MEDIUMbeginner_source/mosaic_memory_profiling_tutorial.py1018# Create a reusable function for analyzing training memory snapshots.COMMENT
MEDIUMbeginner_source/transfer_learning_tutorial.py152 # Create a temporary directory to save training checkpointsCOMMENT
MEDIUMbeginner_source/fgsm_tutorial.py219 # Create the perturbed image by adjusting each pixel of the input imageCOMMENT
MEDIUMbeginner_source/dcgan_faces_tutorial.py247# Create the datasetCOMMENT
MEDIUMbeginner_source/dcgan_faces_tutorial.py255# Create the dataloaderCOMMENT
MEDIUMbeginner_source/dcgan_faces_tutorial.py368# Create the generatorCOMMENT
MEDIUMbeginner_source/dcgan_faces_tutorial.py439# Create the DiscriminatorCOMMENT
MEDIUMbeginner_source/saving_loading_models.py242# # Create a sample inputCOMMENT
MEDIUMbeginner_source/hyperparameter_tuning_tutorial.py127# Define the search spaceCOMMENT
MEDIUMbeginner_source/hyperparameter_tuning_tutorial.py454# Creating the TunerCOMMENT
MEDIUM…inner_source/distributed_training_with_ray_tutorial.py241# Define the transformer modelCOMMENT
MEDIUM…inner_source/distributed_training_with_ray_tutorial.py276# Define the distributed training functionCOMMENT
MEDIUMbeginner_source/serving_tutorial.py66# Define a PyTorch modelCOMMENT
MEDIUMbeginner_source/serving_tutorial.py69# Define a simple convolutional neural network for the MNIST digitCOMMENT
MEDIUMbeginner_source/serving_tutorial.py97# Define the Ray Serve deploymentCOMMENT
MEDIUMbeginner_source/serving_tutorial.py120 # Define the transformation pipeline for the input images.COMMENT
MEDIUMbeginner_source/knowledge_distillation_tutorial.py416# Create a similar student class where we return a tuple. We do not apply pooling after flattening.COMMENT
MEDIUMbeginner_source/knowledge_distillation_tutorial.py458# Create a sample input tensorCOMMENT
MEDIUMbeginner_source/basics/buildmodel_tutorial.py42# Define the ClassCOMMENT
MEDIUMbeginner_source/basics/data_tutorial.py111# Creating a Custom Dataset for your filesCOMMENT
MEDIUMbeginner_source/introyt/trainingyt.py119# Create a grid from the images and show themCOMMENT
MEDIUMbeginner_source/introyt/autogradyt_tutorial.py465# The following code cell throws a runtime error. This is expected.COMMENT
MEDIUMbeginner_source/introyt/tensorboardyt_tutorial.py117# Create a grid from the images and show themCOMMENT
MEDIUMbeginner_source/onnx/onnx_registry_tutorial.py78# Create a model that uses the operator torch.ops.aten.add.TensorCOMMENT
MEDIUMbeginner_source/onnx/onnx_registry_tutorial.py143# Create a namespace for the custom operator using ONNX ScriptCOMMENT
MEDIUM…rce/onnx/export_control_flow_model_to_onnx_tutorial.py41# Define the ModelsCOMMENT
MEDIUMbeginner_source/blitz/autograd_tutorial.py84# The below sections detail the workings of autograd - feel free to skip them.COMMENT
MEDIUMbeginner_source/nlp/deep_learning_tutorial.py266 # Define the parameters that you will need. In this case, we need A and b,STRING
MEDIUMbeginner_source/nlp/sequence_models_tutorial.py152# Create the model:STRING
MEDIUMbeginner_source/nlp/advanced_tutorial.py237 # Initialize the viterbi variables in log spaceSTRING
MEDIUMbeginner_source/nlp/pytorch_tutorial.py39# Create a 3D tensor of size 2x2x2.STRING
3 more matches not shown…
AI Slop Vocabulary54 hits · 153 pts
SeverityFileLineSnippetContext
MEDIUMrecipes_source/foreach_map.py197# optimizer that can be used in various machine learning applications. This tutorial provides a comprehensive guideCOMMENT
MEDIUMrecipes_source/torch_export_aoti_python.py70# CUDA graphs and leverage Triton based matrix multiplications andCOMMENT
MEDIUMrecipes_source/torch_compile_torch_function_modes.py73# using torch function modes from within ``torch.compile``. This enables users to utilizeCOMMENT
MEDIUM…e/torch_compile_user_defined_triton_kernel_tutorial.py362# In this recipe, we explored how to utilize user-defined Triton kernelsCOMMENT
MEDIUMrecipes_source/recipes/tuning_guide.py161# convolutional networks. This format is meant to be used in conjunction withCOMMENT
MEDIUMrecipes_source/recipes/tuning_guide.py512# This tutorial covered a comprehensive set of performance optimization techniquesCOMMENT
MEDIUMrecipes_source/recipes/Captum_Recipe.py13# Using Captum, you can apply a wide range of state-of-the-art featureCOMMENT
MEDIUMadvanced_source/coding_ddpg.py572# To leverage the vectorization capabilities of PyTorch, we adoptCOMMENT
LOWadvanced_source/coding_ddpg.py179# accessible but this will just return a **detached** version of theCOMMENT
LOWadvanced_source/coding_ddpg.py425# are collected by :func:`env.step()`, simply pass the ``from_pixels=True``COMMENT
MEDIUMadvanced_source/semi_structured_sparse.py129# that a simple paradigm of magnitude pruning once to be 2:4 sparse andCOMMENT
MEDIUMadvanced_source/usb_semisup_learn.py54# USB is easy to use and extend, affordable to small groups, and comprehensiveCOMMENT
MEDIUMadvanced_source/pendulum.py169# To facilitate the reading and writing from that ``tensordict`` and to make sureCOMMENT
MEDIUMunstable_source/gpu_direct_storage.py131# in conjunction with ``torch.save`` and ``torch.load`` on local filesystem. PleaseCOMMENT
LOWunstable_source/vmap_recipe.py55# shenanigins), we can simply call `vmap`. `vmap` batches over ALLCOMMENT
MEDIUMunstable_source/nestedtensor.py161# The primary objective of nested tensor is to facilitate operations on raggedCOMMENT
MEDIUMunstable_source/maskedtensor_advanced_semantics.py99# Fundamentally, :class:`MaskedTensor`s perform the same reduction operation while ignoring the masked outCOMMENT
MEDIUM…ermediate_source/intermediate_data_loading_tutorial.py821# improvement in throughput. These should be considered best practicesCOMMENT
LOW…ermediate_source/intermediate_data_loading_tutorial.py270# Since batch size is model-dependent (not a "just add it" optimization),COMMENT
MEDIUMintermediate_source/inductor_debug_cpu.py22# comprehensive `troubleshooting <https://pytorch.org/docs/stable/torch.compiler_troubleshooting.html>`_COMMENT
MEDIUMintermediate_source/inductor_debug_cpu.py633# We demonstrate step by step the way to delve deeper the issue and find the root cause of failures, with the help of deCOMMENT
LOWintermediate_source/char_rnn_generation_tutorial.py286 loss = torch.Tensor([0]) # you can also just simply use ``loss = 0``CODE
MEDIUMintermediate_source/torch_export_tutorial.py659# While these options are valid, they have their pitfalls. Option 1 sometimes requires drastic, invasive rewrites of theCOMMENT
MEDIUMintermediate_source/transformer_building_blocks.py563# aforementioned building blocks, including the following:COMMENT
MEDIUMintermediate_source/forward_ad_usage.py105# Another way to use ``nn.Module`` with forward AD is to utilizeCOMMENT
MEDIUMintermediate_source/dqn_with_rnn_tutorial.py220# values for these attributes to facilitate its construction.COMMENT
LOWintermediate_source/reinforcement_q_learning.py186# approximators, we can simply create one and train it to resembleCOMMENT
MEDIUMintermediate_source/reinforcement_q_learning.py202# absolute error when the error is large - this makes it more robust toCOMMENT
MEDIUMintermediate_source/torchrec_intro_tutorial.py93# * The **embeddings are used in conjunction with the rest of the model toCOMMENT
MEDIUMintermediate_source/torchrec_intro_tutorial.py797# TorchRec modules provide a seamless API to fuse theCOMMENT
MEDIUMbeginner_source/chatbot_tutorial.py22# not robust enough for more general use-cases. Teaching a machine toCOMMENT
MEDIUMbeginner_source/chatbot_tutorial.py135# diversity makes our model robust to many forms of inputs and queries.COMMENT
MEDIUMbeginner_source/chatbot_tutorial.py160# The following functions facilitate the parsing of the rawCOMMENT
MEDIUMbeginner_source/chatbot_tutorial.py454# to leverage GPU parallelization capabilities, you will need to trainCOMMENT
MEDIUMbeginner_source/chatbot_tutorial.py489# and target tensors using the aforementioned functions.COMMENT
MEDIUMbeginner_source/chatbot_tutorial.py1102# To facilitate the greedy decoding operation, we define aCOMMENT
MEDIUMbeginner_source/fgsm_tutorial.py435# more *robust* in general, to both naturally perturbed and adversariallyCOMMENT
MEDIUMbeginner_source/nn_tutorial.py18# In order to fully utilize their power and customizeCOMMENT
LOWbeginner_source/nn_tutorial.py162# (again, we can just use standard Python):COMMENT
MEDIUM…inner_source/distributed_training_with_ray_tutorial.py495# your training jobs robust to unexpected failures. CheckpointingCOMMENT
MEDIUMbeginner_source/knowledge_distillation_tutorial.py385# Now, the forward function returns not only the logits of the network but also the flattened hidden representation afteCOMMENT
MEDIUMbeginner_source/knowledge_distillation_tutorial.py570# However, this time, we will introduce a regressor between the networks to facilitate the matching process.COMMENT
MEDIUMbeginner_source/basics/optimization_tutorial.py153 # Unnecessary in this situation but added for best practicesCOMMENT
MEDIUMbeginner_source/basics/optimization_tutorial.py172 # Unnecessary in this situation but added for best practicesCOMMENT
LOWbeginner_source/introyt/autogradyt_tutorial.py291# loss function, we’ll just use the square of the Euclidean distanceCOMMENT
MEDIUMbeginner_source/introyt/tensors_deeper_tutorial.py637# One of the major advantages of PyTorch is its robust acceleration on anCOMMENT
LOWbeginner_source/introyt/tensors_deeper_tutorial.py875# lets us cheat and just use a series of integers. Here, we had to add theCOMMENT
MEDIUMbeginner_source/introyt/introyt1_tutorial.py628# accurate at this point. That’s not exactly state-of-the-art, but it’sCOMMENT
MEDIUMbeginner_source/onnx/onnx_registry_tutorial.py56# Because we don't actually have an unsupported PyTorch operator to use in this tutorial, we are going to leverageCOMMENT
MEDIUMbeginner_source/onnx/onnx_registry_tutorial.py256# providing us with a comprehensive understanding of handling unsupportedCOMMENT
LOWbeginner_source/blitz/neural_networks_tutorial.py127# If you have a single sample, just use ``input.unsqueeze(0)`` to addCOMMENT
MEDIUMbeginner_source/blitz/cifar10_tutorial.py351# - `Train a state-of-the-art ResNet network on imagenet`_COMMENT
MEDIUMbeginner_source/blitz/cifar10_tutorial.py359# .. _Train a state-of-the-art ResNet network on imagenet: https://github.com/pytorch/examples/tree/main/imagenetCOMMENT
LOWbeginner_source/nlp/deep_learning_tutorial.py329# functions in torch.optim. Here, we will just use SGD.STRING
AI Response Leakage16 hits · 114 pts
SeverityFileLineSnippetContext
HIGHrecipes_source/regional_compilation.py105# most users take with ``torch.compile``. In this example, we apply ``torch.compile`` toCOMMENT
HIGHrecipes_source/compiling_optimizer_lr_scheduler.py10# In this example, we will show how to pair the optimizer, which has been compiled using ``torch.compile``,COMMENT
HIGHrecipes_source/torch_logs.py24# In this example, we'll set up a simple Python function which performs an elementwiseCOMMENT
HIGH…e/torch_compile_user_defined_triton_kernel_tutorial.py40# In this example, we will use a simple vector addition kernel from the Triton documentationCOMMENT
HIGHadvanced_source/pendulum.py306# In this example, we do not pass a done state as this is not mandatoryCOMMENT
HIGHadvanced_source/pendulum.py813# In this example, we will train a simple policy using the reward as aCOMMENT
HIGH…ediate_source/autograd_saved_tensors_hooks_tutorial.py71# In this example, PyTorch saves intermediary values :math:`a` andCOMMENT
HIGHintermediate_source/mario_rl_tutorial.py735# In this example we run the training loop for 40 episodes, but for Mario to truly learn the ways ofCOMMENT
HIGHintermediate_source/pinmem_nonblock.py684# In this example, we are transferring many large tensors from the CPU to the GPU.COMMENT
HIGHintermediate_source/pruning_tutorial.py91# In this example, we will prune at random 30% of the connections inCOMMENT
HIGHbeginner_source/hyperparameter_tuning_tutorial.py151# sampled from. In this example, the ``l1`` and ``l2`` parameter valuesCOMMENT
HIGHbeginner_source/hyperparameter_tuning_tutorial.py276# each trial. In this example, the model architecture and optimizerCOMMENT
HIGHbeginner_source/profiler.py41# models. In this example, we build a custom module that performs twoCOMMENT
HIGHbeginner_source/basics/buildmodel_tutorial.py178# In this example, we iterate over each parameter, and print its size and a preview of its values.COMMENT
HIGHbeginner_source/nlp/sequence_models_tutorial.py98# used after you have seen what is going on. In this example, we also referSTRING
HIGHbeginner_source/nlp/word_embeddings_tutorial.py188# In this example, we will compute the loss function on some trainingSTRING
Slop Phrases36 hits · 94 pts
SeverityFileLineSnippetContext
MEDIUM…e/torch_compile_user_defined_triton_kernel_tutorial.py16# This recipes demonstrates how you can use user-defined Triton kernels with ``torch.compile``.COMMENT
LOW…e/torch_compile_user_defined_triton_kernel_tutorial.py336# Before running the code below, make sure you have ``tabulate`` installed or install byCOMMENT
MEDIUMrecipes_source/debug_mode_tutorial.py135# If you have numerical divergence between modes, you can use DebugMode to find where theCOMMENT
LOWadvanced_source/coding_ddpg.py281# When computing this value, we must make sure to take the value parameters outCOMMENT
MEDIUMunstable_source/gpu_direct_storage.py70# be saved or loaded to repeatedly you can use the ``torch.cuda.gds.gds_register_buffer`` which wrapsCOMMENT
MEDIUMunstable_source/gpu_direct_storage.py102# The loading flow is the inverse: you can use ``torch.load`` with the ``torch.serialization.skip_data`` contextCOMMENT
LOWunstable_source/maskedtensor_advanced_semantics.py14# Before working on this tutorial, please make sure to review ourCOMMENT
MEDIUMunstable_source/gpu_quantization_torchao_tutorial.py38# 1. Go to the `segment-anything repo checkpoint <https://github.com/facebookresearch/segment-anything/tree/main#model-cCOMMENT
MEDIUMunstable_source/gpu_quantization_torchao_tutorial.py170# into an issue, you can use ``apply_dynamic_quant`` andCOMMENT
LOWunstable_source/maskedtensor_sparsity.py9# Before working on this tutorial, please make sure to review ourCOMMENT
MEDIUMintermediate_source/reinforcement_ppo.py482# it is an iterator that you can use to get batches of data of a given length, andCOMMENT
LOWintermediate_source/reinforcement_ppo.py38# If you are running this in Google Colab, make sure you install the following dependencies:COMMENT
MEDIUMintermediate_source/inductor_debug_cpu.py40# Here is a simple example to run the ``torch.compile`` using Inductor and compare its result with eager mode:COMMENT
MEDIUMintermediate_source/inductor_debug_cpu.py273# Otherwise, if the model runs with other errors or accuracy problem, you can use the PyTorch debugging tool called `MinCOMMENT
MEDIUMintermediate_source/fx_profiling_tutorial.py19# for demonstration purposes.COMMENT
LOWintermediate_source/fx_profiling_tutorial.py59# make sure you've installed it from your favorite Python package source.COMMENT
MEDIUMintermediate_source/pinmem_nonblock.py76# can live anywhere in the virtual memory (both in RAM or on disk). As mentioned earlier, this has the advantage thatCOMMENT
MEDIUMintermediate_source/pinmem_nonblock.py336# As mentioned earlier, many PyTorch operations have the option of being executed asynchronously with respect to the hosCOMMENT
MEDIUMintermediate_source/dqn_with_rnn_tutorial.py257# As mentioned earlier, we have one more optional transform to add to ourCOMMENT
LOWintermediate_source/dqn_with_rnn_tutorial.py61# If you are running this in Google Colab, make sure you install the following dependencies:COMMENT
MEDIUM…ediate_source/scaled_dot_product_attention_tutorial.py278# PyTorch comes with an amazing built-in profiler that you can use toCOMMENT
MEDIUMintermediate_source/seq2seq_translation_tutorial.py870# (``I am test \t I am test``), you can use this as an autoencoder. TryCOMMENT
MEDIUMintermediate_source/torch_compile_conv_bn_fuser.py200# We make some simplifications here for demonstration purposes, such as onlyCOMMENT
MEDIUMintermediate_source/torchrec_intro_tutorial.py837# ``CombinedOptimizer`` that you can use in your training loop toCOMMENT
LOWintermediate_source/torchrec_intro_tutorial.py33# Before running this tutorial in Google Colab, make sure to install theCOMMENT
LOWintermediate_source/torchrec_intro_tutorial.py44# If you are running this in Google Colab, make sure to switch to a GPU runtime type.COMMENT
MEDIUMbeginner_source/chatbot_tutorial.py1365# interested, you can try tailoring the chatbot’s behavior by tweaking theCOMMENT
LOWbeginner_source/mosaic_memory_profiling_tutorial.py367# Google Colab, make sure to select a GPU runtime:COMMENT
MEDIUMbeginner_source/nn_tutorial.py870# We now have a general data pipeline and training loop which you can use forCOMMENT
MEDIUMbeginner_source/hyperparameter_tuning_tutorial.py78# dataset across different trials. In a cluster environment, you can useCOMMENT
MEDIUM…inner_source/distributed_training_with_ray_tutorial.py564# low GPU use because workers are waiting on data, you can addCOMMENT
MEDIUMbeginner_source/basics/autogradqs_tutorial.py168# you can change the shape, size and operations at every iteration ifCOMMENT
LOWbeginner_source/onnx/onnx_registry_tutorial.py37# Before starting this tutorial, make sure you have completed the following prerequisites:COMMENT
MEDIUMbeginner_source/onnx/onnx_registry_tutorial.py50# might not be supported yet. In this section, we will demonstrate how you can addCOMMENT
MEDIUMbeginner_source/blitz/data_parallel_tutorial.py91# gives an output. However, you can use ``DataParallel`` on any model (CNN, RNN,COMMENT
MEDIUMbeginner_source/blitz/autograd_tutorial.py248# you can change the shape, size and operations at every iteration ifCOMMENT
Unused Imports62 hits · 52 pts
SeverityFileLineSnippetContext
LOWconf.py40CODE
LOWconf.py41CODE
LOWconf.py43CODE
LOWconf.py46CODE
LOWconf.py48CODE
LOWconf.py56CODE
LOWconf.py108CODE
LOW…e/torch_compile_user_defined_triton_kernel_tutorial.py323CODE
LOWrecipes_source/debug_mode_tutorial.py54CODE
LOWrecipes_source/recipes/benchmark.py556CODE
LOWrecipes_source/recipes/tuning_guide.py41CODE
LOWrecipes_source/recipes/timer_quick_start.py138CODE
LOWrecipes_source/recipes/what_is_state_dict.py53CODE
LOW…rting_model_using_parameters_from_a_different_model.py50CODE
LOWadvanced_source/numpy_extensions_tutorial.py80CODE
LOWadvanced_source/neural_style_tutorial.py61CODE
LOWadvanced_source/semi_structured_sparse.py55CODE
LOWadvanced_source/semi_structured_sparse.py206CODE
LOWadvanced_source/cuda_graph_annotations_tutorial.py121CODE
LOWadvanced_source/usb_semisup_learn.py87CODE
LOWintermediate_source/mario_rl_tutorial.py42CODE
LOWintermediate_source/mario_rl_tutorial.py45CODE
LOWintermediate_source/mario_rl_tutorial.py46CODE
LOWintermediate_source/char_rnn_classification_tutorial.py239CODE
LOWintermediate_source/ax_multiobjective_nas_tutorial.py480CODE
LOWintermediate_source/ax_multiobjective_nas_tutorial.py480CODE
LOWintermediate_source/mnist_train_nas.py8CODE
LOWintermediate_source/seq2seq_translation_tutorial.py85CODE
LOWintermediate_source/seq2seq_translation_tutorial.py85CODE
LOWintermediate_source/seq2seq_translation_tutorial.py85CODE
LOWintermediate_source/torch_compile_conv_bn_fuser.py31CODE
LOWintermediate_source/torch_compile_conv_bn_fuser.py31CODE
LOWintermediate_source/torch_compile_conv_bn_fuser.py31CODE
LOWintermediate_source/torch_compile_conv_bn_fuser.py31CODE
LOWintermediate_source/torch_compile_conv_bn_fuser.py31CODE
LOWbeginner_source/chatbot_tutorial.py95CODE
LOWbeginner_source/chatbot_tutorial.py95CODE
LOWbeginner_source/chatbot_tutorial.py107CODE
LOWbeginner_source/fgsm_tutorial.py96CODE
LOWbeginner_source/dcgan_faces_tutorial.py116CODE
LOWbeginner_source/dcgan_faces_tutorial.py117CODE
LOWbeginner_source/nn_tutorial.py219CODE
LOWbeginner_source/nn_tutorial.py80CODE
LOW…inner_source/distributed_training_with_ray_tutorial.py64CODE
LOWbeginner_source/basics/buildmodel_tutorial.py25CODE
LOWbeginner_source/basics/buildmodel_tutorial.py28CODE
LOWbeginner_source/basics/buildmodel_tutorial.py29CODE
LOWbeginner_source/basics/buildmodel_tutorial.py29CODE
LOWbeginner_source/introyt/autogradyt_tutorial.py119CODE
LOWbeginner_source/introyt/captumyt.py127CODE
LOWbeginner_source/introyt/captumyt.py131CODE
LOWbeginner_source/introyt/captumyt.py131CODE
LOWbeginner_source/introyt/introyt1_tutorial.py420CODE
LOWbeginner_source/nlp/advanced_tutorial.py120CODE
LOW…ginner_source/examples_autograd/polynomial_autograd.py17CODE
LOW.jenkins/custom_pandoc_filter.py1CODE
LOW.jenkins/custom_pandoc_filter.py1CODE
LOW.jenkins/custom_pandoc_filter.py1CODE
LOW.jenkins/get_sphinx_filenames.py1CODE
LOW.jenkins/remove_invisible_code_block_from_rst_txt.py2CODE
2 more matches not shown…
Structural Annotation Overuse17 hits · 34 pts
SeverityFileLineSnippetContext
LOW.claude/skills/pr-review/SKILL.md145### Step 1: Fetch PR InformationCOMMENT
LOW.claude/skills/pr-review/SKILL.md153### Step 2: Analyze ChangesCOMMENT
LOW.claude/skills/pr-review/SKILL.md160### Step 3: Deep ReviewCOMMENT
LOW.claude/skills/pr-review/SKILL.md169### Step 4: Formulate ReviewCOMMENT
LOW.jenkins/build.sh61 # Step 2: Keep certain tutorials based on file count, and remove runnable code in all other tutorialsCOMMENT
LOW.jenkins/build.sh68 # Step 3: Run `make docs` to generate HTML files and static files for these tutorialisCOMMENT
LOW.jenkins/build.sh74 # Step 4: If any of the generated files are not related the tutorial files we want to run,COMMENT
LOW.jenkins/build.sh121 # Step 5: Remove INVISIBLE_CODE_BLOCK from .html/.rst.txt/.ipynb/.py filesCOMMENT
LOW.jenkins/build.sh125 # Step 6: Copy generated files to S3, tag with commit IDCOMMENT
LOW.jenkins/build.sh131 # Step 1: Generate no-plot HTML pages for all tutorialsCOMMENT
LOW.jenkins/build.sh135 # Step 2: Wait for all workers to finishCOMMENT
LOW.jenkins/build.sh138 # Step 3: Download generated with-plot HTML files and static files from S3, merge into one folderCOMMENT
LOW.jenkins/build.sh146 # Step 4: Copy all generated files into docsCOMMENT
LOW.jenkins/build.sh149 # Step 5: Remove INVISIBLE_CODE_BLOCK from .html/.rst.txt/.ipynb/.py filesCOMMENT
LOW.jenkins/build.sh156 # Step 6: Copy generated HTML files and static files to S3COMMENT
LOW.jenkins/build.sh160 # Step 7: push new HTML files and static files to gh-pagesCOMMENT
LOW.jenkins/build.sh50 # Step 1: Remove runnable code from tutorials that are not supposed to be runCOMMENT
Redundant / Tautological Comments19 hits · 30 pts
SeverityFileLineSnippetContext
LOWconf.py443 # Check if the page is in gallery directoriesSTRING
LOWadvanced_source/cuda_graph_annotations_tutorial.py546 # Check if annotation support is availableCOMMENT
LOWintermediate_source/mario_rl_tutorial.py775 # Check if end of gameCOMMENT
LOWintermediate_source/char_rnn_classification_tutorial.py61# Check if CUDA is availableCOMMENT
LOWintermediate_source/mnist_train_nas.py166 # Print outputsCOMMENT
LOWintermediate_source/seq2seq_translation_tutorial.py208 # Read the file and split into linesCOMMENT
LOW.github/scripts/check_redirects.sh11# Check if any deleted or renamed files were foundCOMMENT
LOW.github/scripts/check_redirects.sh20# Check if redirects.py has been updatedCOMMENT
LOW.github/scripts/check_redirects.sh28# Check if each deleted file has a redirect entryCOMMENT
LOW.github/scripts/check_redirects.sh34 # Check if this path exists in redirects.py as a key. We don't check for values.COMMENT
LOWbeginner_source/chatbot_tutorial.py350 # Read the file and split into linesCOMMENT
LOWbeginner_source/chatbot_tutorial.py1208 # Check if it is quit caseCOMMENT
LOWbeginner_source/chatbot_tutorial.py1247# Set checkpoint to load from; set to None if starting from scratchCOMMENT
LOWbeginner_source/mosaic_memory_profiling_tutorial.py384# Check if Mosaic CLI is availableCOMMENT
LOWbeginner_source/transfer_learning_tutorial.py166 model.train() # Set model to training modeCODE
LOWbeginner_source/transfer_learning_tutorial.py168 model.eval() # Set model to evaluate modeCODE
LOWbeginner_source/transfer_learning_tutorial.py173 # Iterate over data.COMMENT
LOWbeginner_source/knowledge_distillation_tutorial.py40# Check if the current `accelerator <https://pytorch.org/docs/stable/torch.html#accelerators>`__COMMENT
LOW.jenkins/insert_last_verified.py118 # Check if the <p> tag with class "date-info-last-verified" already existsCOMMENT
Excessive Try-Catch Wrapping26 hits · 28 pts
SeverityFileLineSnippetContext
LOWconf.py75 except Exception as e:CODE
MEDIUMconf.py71def call_fn(func, args, kwargs, result_queue):CODE
LOWrecipes_source/torch_compiler_set_stance_tutorial.py91except Exception as e:CODE
LOWrecipes_source/torch_compiler_set_stance_tutorial.py108except Exception as e:CODE
LOWrecipes_source/torch_compiler_set_stance_tutorial.py145 except Exception as e:CODE
LOWrecipes_source/torch_compiler_set_stance_tutorial.py231except Exception as e:CODE
LOWadvanced_source/python_custom_ops_functional.py144except Exception as exc:CODE
LOWunstable_source/gpu_quantization_torchao_tutorial.py99except Exception as e:CODE
LOWunstable_source/gpu_quantization_torchao_tutorial.py301except Exception as e:CODE
LOWintermediate_source/torch_export_tutorial.py123except Exception:CODE
LOWintermediate_source/torch_export_tutorial.py136except Exception:CODE
LOWintermediate_source/torch_export_tutorial.py149except Exception:CODE
LOWintermediate_source/torch_export_tutorial.py287except Exception:CODE
LOWintermediate_source/torch_export_tutorial.py419except Exception:CODE
LOWintermediate_source/torch_export_tutorial.py432except Exception:CODE
LOWintermediate_source/torch_export_tutorial.py469except Exception:CODE
LOWintermediate_source/torch_export_tutorial.py501except Exception:CODE
LOWintermediate_source/torch_export_tutorial.py565except Exception:CODE
LOWintermediate_source/torch_export_tutorial.py710except Exception:CODE
LOWintermediate_source/torch_export_tutorial.py757except Exception:CODE
LOWintermediate_source/memory_format_tutorial.py333 except Exception as e:CODE
LOWintermediate_source/memory_format_tutorial.py371 except Exception as e:CODE
MEDIUMbeginner_source/chatbot_tutorial.py1219 print("Error: Encountered unknown word.")CODE
LOW…rce/onnx/export_control_flow_model_to_onnx_tutorial.py95except Exception as e:CODE
LOW.jenkins/download_data.py109 except Exception as e:CODE
MEDIUM.jenkins/insert_last_verified.py147 print("Error: Build directory not provided. Exiting.")CODE
Verbosity Indicators14 hits · 27 pts
SeverityFileLineSnippetContext
LOWbeginner_source/blitz/cifar10_tutorial.py206# But we need to check if the network has learnt anything at all.COMMENT
LOW.jenkins/build.sh61 # Step 2: Keep certain tutorials based on file count, and remove runnable code in all other tutorialsCOMMENT
LOW.jenkins/build.sh68 # Step 3: Run `make docs` to generate HTML files and static files for these tutorialisCOMMENT
LOW.jenkins/build.sh74 # Step 4: If any of the generated files are not related the tutorial files we want to run,COMMENT
LOW.jenkins/build.sh121 # Step 5: Remove INVISIBLE_CODE_BLOCK from .html/.rst.txt/.ipynb/.py filesCOMMENT
LOW.jenkins/build.sh125 # Step 6: Copy generated files to S3, tag with commit IDCOMMENT
LOW.jenkins/build.sh131 # Step 1: Generate no-plot HTML pages for all tutorialsCOMMENT
LOW.jenkins/build.sh135 # Step 2: Wait for all workers to finishCOMMENT
LOW.jenkins/build.sh138 # Step 3: Download generated with-plot HTML files and static files from S3, merge into one folderCOMMENT
LOW.jenkins/build.sh146 # Step 4: Copy all generated files into docsCOMMENT
LOW.jenkins/build.sh149 # Step 5: Remove INVISIBLE_CODE_BLOCK from .html/.rst.txt/.ipynb/.py filesCOMMENT
LOW.jenkins/build.sh156 # Step 6: Copy generated HTML files and static files to S3COMMENT
LOW.jenkins/build.sh160 # Step 7: push new HTML files and static files to gh-pagesCOMMENT
LOW.jenkins/build.sh50 # Step 1: Remove runnable code from tutorials that are not supposed to be runCOMMENT
Hyper-Verbose Identifiers22 hits · 20 pts
SeverityFileLineSnippetContext
LOWrecipes_source/foreach_map.py176def benchmark_torch_function_in_microseconds(f, *args, **kwargs):CODE
LOWadvanced_source/neural_style_tutorial.py307def get_style_model_and_losses(cnn, normalization_mean, normalization_std,CODE
LOWadvanced_source/semi_structured_sparse.py223def preprocess_validation_function(examples, tokenizer):CODE
LOWadvanced_source/semi_structured_sparse.py249def preprocess_train_function(examples, tokenizer):CODE
LOWadvanced_source/cuda_graph_annotations_tutorial.py218def capture_graph_with_annotations(model_fn):CODE
LOWadvanced_source/pendulum.py689 def transform_observation_spec(self, observation_spec):CODE
LOWadvanced_source/pendulum.py713 def transform_observation_spec(self, observation_spec):CODE
LOWintermediate_source/jacobians_hessians.py290def predict_with_output_summed(weight, bias, x):CODE
LOWintermediate_source/pinmem_nonblock.py354def copy_to_device_nonblocking(*tensors):CODE
LOWintermediate_source/pinmem_nonblock.py448def pin_copy_to_device_nonblocking(*tensors):CODE
LOWintermediate_source/neural_tangent_kernels.py103def empirical_ntk_jacobian_contraction(fnet_single, params, x1, x2):CODE
LOWintermediate_source/neural_tangent_kernels.py128def empirical_ntk_jacobian_contraction(fnet_single, params, x1, x2, compute='full'):CODE
LOWintermediate_source/ax_multiobjective_nas_tutorial.py244 def _get_event_multiplexer_for_trial(self, trial):CODE
LOWintermediate_source/ax_multiobjective_nas_tutorial.py255 def is_available_while_running(cls):CODE
LOWintermediate_source/torchvision_tutorial.py318def get_model_instance_segmentation(num_classes):CODE
LOW…ediate_source/scaled_dot_product_attention_tutorial.py68def benchmark_torch_function_in_microseconds(f, *args, **kwargs):CODE
LOWbeginner_source/mosaic_memory_profiling_tutorial.py936def run_training_with_memory_capture(CODE
LOWbeginner_source/mosaic_memory_profiling_tutorial.py1070def training_pipeline_with_memory_monitoring(CODE
LOWbeginner_source/transfer_learning_tutorial.py354def visualize_model_predictions(model,img_path):CODE
LOWbeginner_source/knowledge_distillation_tutorial.py303def train_knowledge_distillation(teacher, student, train_loader, epochs, learning_rate, T, soft_target_loss_weight, ce_lCODE
LOW.jenkins/download_data.py72def download_hymenoptera_data():CODE
LOW.jenkins/download_data.py118def download_gpu_quantization_torchao() -> None:CODE
Modern AI Meta-Vocabulary5 hits · 15 pts
SeverityFileLineSnippetContext
MEDIUMadvanced_source/semi_structured_sparse.py541# zero-shot pruning, or pruning without fine-tuning / retraining.COMMENT
MEDIUMadvanced_source/pendulum.py291# it (for example, in multi-agent settings we may want to indicate which agents needCOMMENT
MEDIUMbeginner_source/serving_tutorial.py184# number of CPUs or GPUs. Ray Serve handles the orchestration of theseCOMMENT
MEDIUMbeginner_source/serving_tutorial.py340# to orchestrate multiple deployments into a single app.COMMENT
MEDIUMbeginner_source/nlp/word_embeddings_tutorial.py295# :math:`N` context window on each side, :math:`w_{i-1}, \dots, w_{i-N}`COMMENT
Cross-Language Confusion3 hits · 15 pts
SeverityFileLineSnippetContext
HIGH…rce/custom_classes/custom_class_project/custom_test.py19s.push("pushed")CODE
HIGH…rce/custom_classes/custom_class_project/custom_test.py23s.push("pushed")CODE
HIGHintermediate_source/reinforcement_q_learning.py447 memory.push(state, action, next_state, reward)CODE
Deep Nesting17 hits · 13 pts
SeverityFileLineSnippetContext
LOWadvanced_source/neural_style_tutorial.py307CODE
LOWadvanced_source/coding_ddpg.py247CODE
LOWadvanced_source/semi_structured_sparse.py299CODE
LOWadvanced_source/cuda_graph_annotations_tutorial.py363CODE
LOWadvanced_source/cuda_graph_annotations_tutorial.py382CODE
LOWadvanced_source/cuda_graph_annotations_tutorial.py750CODE
LOWintermediate_source/memory_format_tutorial.py304CODE
LOWbeginner_source/transfer_learning_tutorial.py149CODE
LOWbeginner_source/transfer_learning_tutorial.py227CODE
LOWbeginner_source/nn_tutorial.py355CODE
LOW…inner_source/distributed_training_with_ray_tutorial.py295CODE
LOW.jenkins/custom_pandoc_filter.py5CODE
LOW.jenkins/custom_pandoc_filter.py29CODE
LOW.jenkins/custom_pandoc_filter.py101CODE
LOW.jenkins/remove_runnable_code.py8CODE
LOW.jenkins/insert_last_verified.py66CODE
LOW.jenkins/post_process_notebooks.py18CODE
AI Structural Patterns11 hits · 10 pts
SeverityFileLineSnippetContext
LOWrecipes_source/recipes/defining_a_neural_network.py151CODE
LOWadvanced_source/pendulum.py273CODE
LOWadvanced_source/pendulum.py345CODE
LOWintermediate_source/char_rnn_classification_tutorial.py254CODE
LOWintermediate_source/per_sample_grads.py45CODE
LOWintermediate_source/neural_tangent_kernels.py117CODE
LOWintermediate_source/neural_tangent_kernels.py152CODE
LOWbeginner_source/fgsm_tutorial.py172CODE
LOWbeginner_source/serving_tutorial.py166CODE
LOW…rce/onnx/export_control_flow_model_to_onnx_tutorial.py71CODE
LOWbeginner_source/blitz/neural_networks_tutorial.py84CODE
Docstring Block Structure1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHintermediate_source/pruning_tutorial.py372Prunes tensor corresponding to parameter called `name` in `module` by removing every other entry in the tensors. STRING
Overly Generic Function Names1 hit · 1 pts
SeverityFileLineSnippetContext
LOWbeginner_source/serving_tutorial.py155 async def handle_request(self, request: ImageRequest):CODE