The fastai deep learning library
This report summarizes scanner evidence for fastai/fastai, a Jupyter Notebook project with 28,219 GitHub stars. SynthScan examined 20,095 lines of code across 114 source files, recording 480 pattern matches distributed across 12 syntactic categories. The legacy adjusted pattern signal is 24.3 (Elevated 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.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 61 finding(s).
Are imports declared and package/API names verified? 343 finding(s).
Are wrappers, guards, and repeated structures necessary? 119 finding(s).
Which changes need focused human review? 480 finding(s).
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.
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.
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.
The scanner identified 480 distinct pattern matches across 12 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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | nbs/dltest.py | 1 | CODE | |
| LOW | nbs/dltest.py | 2 | CODE | |
| LOW | nbs/examples/distrib.py | 1 | CODE | |
| LOW | nbs/examples/distrib.py | 2 | CODE | |
| LOW | nbs/examples/distrib.py | 3 | CODE | |
| LOW | nbs/examples/dataloader_spawn.py | 4 | CODE | |
| LOW | nbs/examples/train_imdbclassifier.py | 1 | CODE | |
| LOW | nbs/examples/train_imdbclassifier.py | 2 | CODE | |
| LOW | nbs/examples/train_imdbclassifier.py | 3 | CODE | |
| LOW | nbs/examples/train_imdbclassifier.py | 5 | CODE | |
| LOW | nbs/examples/train_imdbclassifier.py | 6 | CODE | |
| LOW | nbs/examples/train_imdbclassifier.py | 7 | CODE | |
| LOW | nbs/examples/train_imagenette.py | 1 | CODE | |
| LOW | nbs/examples/train_imagenette.py | 2 | CODE | |
| LOW | nbs/examples/train_imagenette.py | 3 | CODE | |
| LOW | nbs/examples/train_imagenette.py | 4 | CODE | |
| LOW | nbs/examples/train_imagenette.py | 6 | CODE | |
| LOW | nbs/examples/train_imagenette.py | 7 | CODE | |
| LOW | nbs/examples/train_imagenette.py | 8 | CODE | |
| LOW | nbs/examples/train_imagenette.py | 9 | CODE | |
| LOW | nbs/examples/mnist_items.py | 1 | CODE | |
| LOW | nbs/examples/mnist_blocks.py | 1 | CODE | |
| LOW | nbs/examples/train_wt2.py | 1 | CODE | |
| LOW | nbs/examples/train_wt2.py | 2 | CODE | |
| LOW | nbs/examples/train_wt2.py | 3 | CODE | |
| LOW | nbs/examples/train_wt2.py | 4 | CODE | |
| LOW | nbs/examples/distrib_pytorch.py | 1 | CODE | |
| LOW | nbs/examples/distrib_pytorch.py | 2 | CODE | |
| LOW | nbs/examples/train_tabular.py | 1 | CODE | |
| LOW | nbs/examples/train_tabular.py | 2 | CODE | |
| LOW | nbs/examples/train_tabular.py | 3 | CODE | |
| LOW | nbs/examples/train_tabular.py | 4 | CODE | |
| LOW | nbs/examples/train_tabular.py | 6 | CODE | |
| LOW | nbs/examples/train_tabular.py | 7 | CODE | |
| LOW | nbs/examples/migrating_fastai.py | 1 | CODE | |
| LOW | fastai/torch_imports.py | 1 | CODE | |
| LOW | fastai/torch_imports.py | 2 | CODE | |
| LOW | fastai/torch_imports.py | 3 | CODE | |
| LOW | fastai/torch_imports.py | 3 | CODE | |
| LOW | fastai/torch_imports.py | 3 | CODE | |
| LOW | fastai/torch_imports.py | 3 | CODE | |
| LOW | fastai/torch_imports.py | 3 | CODE | |
| LOW | fastai/torch_imports.py | 3 | CODE | |
| LOW | fastai/torch_imports.py | 3 | CODE | |
| LOW | fastai/torch_imports.py | 4 | CODE | |
| LOW | fastai/torch_imports.py | 5 | CODE | |
| LOW | fastai/torch_imports.py | 6 | CODE | |
| LOW | fastai/torch_imports.py | 6 | CODE | |
| LOW | fastai/torch_imports.py | 6 | CODE | |
| LOW | fastai/torch_imports.py | 6 | CODE | |
| LOW | fastai/torch_imports.py | 7 | CODE | |
| LOW | fastai/torch_imports.py | 7 | CODE | |
| LOW | fastai/torch_imports.py | 8 | CODE | |
| LOW | fastai/torch_imports.py | 8 | CODE | |
| LOW | fastai/metrics.py | 18 | CODE | |
| LOW | fastai/metrics.py | 19 | CODE | |
| LOW | fastai/metrics.py | 20 | CODE | |
| LOW | fastai/test_utils.py | 12 | CODE | |
| LOW | fastai/test_utils.py | 13 | CODE | |
| LOW | fastai/test_utils.py | 14 | CODE | |
| 283 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | fastai/metrics.py | 8 | __all__ = ['rmse', 'exp_rmspe', 'perplexity', 'AccumMetric', 'skm_to_fastai', 'optim_metric', 'accuracy', 'error_rate', | CODE |
| LOW | fastai/test_utils.py | 8 | __all__ = ['synth_dbunch', 'RegModel', 'synth_learner', 'VerboseCallback', 'get_env', 'try_import', 'nvidia_smi', 'nvidi | CODE |
| LOW | fastai/interpret.py | 8 | __all__ = ['plot_top_losses', 'Interpretation', 'ClassificationInterpretation', 'SegmentationInterpretation'] | CODE |
| LOW | fastai/torch_core.py | 8 | __all__ = ['norm_types', 'setup_cuda', 'subplots', 'show_image', 'show_titled_image', 'show_images', 'ArrayBase', | CODE |
| LOW | fastai/_nbdev.py | 3 | __all__ = ["index", "modules", "custom_doc_links", "git_url"] | CODE |
| LOW | fastai/_pytorch_doc.py | 6 | __all__ = ['PYTORCH_URL', 'pytorch_doc_link'] | CODE |
| LOW | fastai/distributed.py | 8 | __all__ = ['ParallelTrainer', 'setup_distrib', 'teardown_distrib', 'DistributedDL', 'DistributedTrainer', 'rank0_first'] | CODE |
| LOW | fastai/collab.py | 8 | __all__ = ['TabularCollab', 'CollabDataLoaders', 'EmbeddingDotBias', 'EmbeddingNN', 'collab_learner'] | CODE |
| LOW | fastai/optimizer.py | 8 | __all__ = ['pytorch_hp_map', 'Optimizer', 'sgd_step', 'weight_decay', 'l2_reg', 'average_grad', 'average_sqr_grad', | CODE |
| LOW | fastai/losses.py | 8 | __all__ = ['BaseLoss', 'CrossEntropyLossFlat', 'FocalLoss', 'FocalLossFlat', 'BCEWithLogitsLossFlat', 'BCELossFlat', | CODE |
| LOW | fastai/layers.py | 8 | __all__ = ['NormType', 'inplace_relu', 'Mish', 'Swish', 'module', 'Identity', 'Lambda', 'PartialLambda', 'Flatten', | CODE |
| LOW | fastai/learner.py | 8 | __all__ = ['replacing_yield', 'mk_metric', 'save_model', 'load_model', 'SkipToEpoch', 'Learner', 'before_batch_cb', | CODE |
| LOW | fastai/tabular/core.py | 8 | __all__ = ['make_date', 'add_datepart', 'add_elapsed_times', 'cont_cat_split', 'df_shrink_dtypes', 'df_shrink', 'Tabular | CODE |
| LOW | fastai/tabular/model.py | 8 | __all__ = ['emb_sz_rule', 'get_emb_sz', 'TabularModel', 'tabular_config'] | CODE |
| LOW | fastai/tabular/data.py | 8 | __all__ = ['TabularDataLoaders'] | CODE |
| LOW | fastai/tabular/learner.py | 8 | __all__ = ['TabularLearner', 'tabular_learner', 'show_results'] | CODE |
| LOW | fastai/vision/gan.py | 8 | __all__ = ['GANModule', 'basic_critic', 'AddChannels', 'basic_generator', 'DenseResBlock', 'gan_critic', 'GANLoss', | CODE |
| LOW | fastai/vision/core.py | 8 | __all__ = ['imagenet_stats', 'cifar_stats', 'mnist_stats', 'OpenMask', 'TensorPointCreate', 'to_image', 'load_image', | CODE |
| LOW | fastai/vision/augment.py | 8 | __all__ = ['TensorTypes', 'RandTransform', 'FlipItem', 'DihedralItem', 'CropPad', 'RandomCrop', 'OldRandomCrop', 'Resize | CODE |
| LOW | fastai/vision/widgets.py | 8 | __all__ = ['widget', 'carousel', 'ImagesCleaner', 'ImageClassifierCleaner', 'HBox', 'VBox', 'widgets', 'Button', 'Checkb | CODE |
| LOW | fastai/vision/utils.py | 8 | __all__ = ['download_images', 'verify_image', 'verify_images', 'resize_to', 'resize_image', 'resize_images', | CODE |
| LOW | fastai/vision/data.py | 8 | __all__ = ['PointBlock', 'BBoxBlock', 'get_grid', 'clip_remove_empty', 'bb_pad', 'show_batch', 'ImageBlock', 'MaskBlock' | CODE |
| LOW | fastai/vision/learner.py | 8 | __all__ = ['model_meta', 'has_pool_type', 'cut_model', 'create_body', 'create_head', 'default_split', 'add_head', | CODE |
| LOW | fastai/vision/models/xresnet.py | 8 | __all__ = ['se_kwargs1', 'se_kwargs2', 'se_kwargs3', 'g0', 'g1', 'g2', 'g3', 'init_cnn', 'XResNet', 'xresnet18', 'xresne | CODE |
| LOW | fastai/vision/models/unet.py | 8 | __all__ = ['UnetBlock', 'ResizeToOrig', 'DynamicUnet'] | CODE |
| LOW | fastai/medical/text.py | 8 | __all__ = [] | CODE |
| LOW | fastai/medical/imaging.py | 8 | __all__ = ['dicom_windows', 'get_dicom_files', 'TensorDicom', 'PILDicom', 'array_freqhist_bins', 'TensorCTScan', 'PILCTS | CODE |
| LOW | fastai/text/core.py | 8 | __all__ = ['UNK', 'PAD', 'BOS', 'EOS', 'FLD', 'TK_REP', 'TK_WREP', 'TK_UP', 'TK_MAJ', 'WordTokenizer', 'fn_counter_pkl', | CODE |
| LOW | fastai/text/data.py | 8 | __all__ = ['pad_input', 'reverse_text', 'make_vocab', 'TensorText', 'LMTensorText', 'Numericalize', 'LMDataLoader', 'sho | CODE |
| LOW | fastai/text/learner.py | 8 | __all__ = ['match_embeds', 'load_ignore_keys', 'clean_raw_keys', 'load_model_text', 'TextLearner', 'decode_spec_tokens', | CODE |
| LOW | fastai/text/models/core.py | 8 | __all__ = ['LinearDecoder', 'SequentialRNN', 'get_language_model', 'SentenceEncoder', 'masked_concat_pool', | CODE |
| LOW | fastai/text/models/awdlstm.py | 8 | __all__ = ['awd_lstm_lm_config', 'awd_lstm_clas_config', 'dropout_mask', 'RNNDropout', 'WeightDropout', 'EmbeddingDropou | CODE |
| LOW | fastai/callback/comet.py | 8 | __all__ = ['CometCallback'] | CODE |
| LOW | fastai/callback/mixup.py | 8 | __all__ = ['reduce_loss', 'MixHandler', 'MixUp', 'CutMix'] | CODE |
| LOW | fastai/callback/wandb.py | 8 | __all__ = ['WandbCallback', 'log_dataset', 'log_model', 'wandb_process'] | CODE |
| LOW | fastai/callback/fp16.py | 8 | __all__ = ['AMPMode', 'MixedPrecision', 'get_master', 'to_master_grads', 'to_model_params', 'test_overflow', 'grad_overf | CODE |
| LOW | fastai/callback/hook.py | 8 | __all__ = ['Hook', 'hook_output', 'Hooks', 'hook_outputs', 'dummy_eval', 'model_sizes', 'num_features_model', 'has_param | CODE |
| LOW | fastai/callback/core.py | 8 | __all__ = ['Callback', 'TrainEvalCallback', 'GatherPredsCallback', 'FetchPredsCallback', 'CancelStepException', | CODE |
| LOW | fastai/callback/captum.py | 6 | __all__ = ['CaptumInterpretation'] | CODE |
| LOW | fastai/callback/preds.py | 8 | __all__ = ['MCDropoutCallback'] | CODE |
| LOW | fastai/callback/azureml.py | 3 | __all__ = ['AzureMLCallback'] | CODE |
| LOW | fastai/callback/tracker.py | 8 | __all__ = ['TerminateOnNaNCallback', 'TrackerCallback', 'EarlyStoppingCallback', 'SaveModelCallback', 'ReduceLROnPlateau | CODE |
| LOW | fastai/callback/channelslast.py | 8 | __all__ = ['ChannelsLast'] | CODE |
| LOW | fastai/callback/schedule.py | 8 | __all__ = ['annealer', 'sched_lin', 'sched_cos', 'sched_no', 'sched_exp', 'SchedLin', 'SchedCos', 'SchedNo', 'SchedExp', | CODE |
| LOW | fastai/callback/progress.py | 8 | __all__ = ['ProgressCallback', 'ShowGraphCallback', 'CSVLogger'] | CODE |
| LOW | fastai/callback/rnn.py | 8 | __all__ = ['ModelResetter', 'RNNCallback', 'RNNRegularizer', 'rnn_cbs'] | CODE |
| LOW | fastai/callback/tensorboard.py | 8 | __all__ = ['TensorBoardBaseCallback', 'TensorBoardCallback', 'TensorBoardProjectorCallback', 'projector_word_embeddings' | CODE |
| LOW | fastai/callback/training.py | 8 | __all__ = ['bn_types', 'ShortEpochCallback', 'GradientAccumulation', 'GradientClip', 'set_bn_eval', 'BnFreeze'] | CODE |
| LOW | fastai/callback/training.py | 48 | def set_bn_eval(m:nn.Module, use_eval=True)->None: | CODE |
| LOW | fastai/callback/data.py | 8 | __all__ = ['CollectDataCallback', 'WeightedDL', 'PartialDL'] | CODE |
| LOW | fastai/data/transforms.py | 8 | __all__ = ['image_extensions', 'get_files', 'FileGetter', 'get_image_files', 'ImageGetter', 'get_text_files', 'ItemGette | CODE |
| LOW | fastai/data/core.py | 8 | __all__ = ['show_batch', 'get_show_batch_func', 'show_results', 'TfmdDL', 'DataLoaders', 'FilteredBase', 'TfmdLists', 'd | CODE |
| LOW | fastai/data/block.py | 8 | __all__ = ['TransformBlock', 'CategoryBlock', 'MultiCategoryBlock', 'RegressionBlock', 'DataBlock'] | CODE |
| LOW | fastai/data/load.py | 8 | __all__ = ['fa_collate', 'fa_convert', 'SkipItemException', 'collate_error', 'DataLoader'] | CODE |
| LOW | fastai/data/external.py | 8 | __all__ = ['fastai_cfg', 'fastai_path', 'URLs', 'untar_data', 'nb_urls', 'prefetch_data'] | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | fastai/torch_core.py | 745 | except: pass | CODE |
| HIGH | fastai/torch_core.py | 165 | except NameError: pass | CODE |
| HIGH | fastai/torch_core.py | 167 | except NameError: pass | CODE |
| HIGH | fastai/torch_core.py | 169 | except NameError: pass | CODE |
| HIGH | fastai/_pytorch_doc.py | 39 | except: pass | CODE |
| HIGH | fastai/distributed.py | 17 | except ModuleNotFoundError: pass | CODE |
| HIGH | fastai/vision/learner.py | 23 | except ModuleNotFoundError: pass | CODE |
| HIGH | fastai/medical/imaging.py | 26 | except: pass | CODE |
| HIGH | fastai/data/load.py | 104 | except TypeError: pass | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | nbs/examples/train_imagenette.py | 39 | CODE | |
| LOW | fastai/layers.py | 245 | CODE | |
| LOW | fastai/layers.py | 469 | CODE | |
| LOW | fastai/learner.py | 109 | CODE | |
| LOW | fastai/learner.py | 291 | CODE | |
| LOW | fastai/tabular/core.py | 147 | CODE | |
| LOW | fastai/tabular/model.py | 40 | CODE | |
| LOW | fastai/vision/augment.py | 1225 | CODE | |
| LOW | fastai/vision/augment.py | 740 | CODE | |
| LOW | fastai/vision/augment.py | 795 | CODE | |
| LOW | fastai/vision/augment.py | 886 | CODE | |
| LOW | fastai/vision/utils.py | 107 | CODE | |
| LOW | fastai/vision/data.py | 114 | CODE | |
| LOW | fastai/vision/data.py | 166 | CODE | |
| LOW | fastai/vision/data.py | 221 | CODE | |
| LOW | fastai/vision/learner.py | 91 | CODE | |
| LOW | fastai/vision/learner.py | 155 | CODE | |
| LOW | fastai/vision/learner.py | 166 | CODE | |
| LOW | fastai/vision/learner.py | 191 | CODE | |
| LOW | fastai/vision/learner.py | 220 | CODE | |
| LOW | fastai/vision/learner.py | 266 | CODE | |
| LOW | fastai/vision/models/xresnet.py | 30 | CODE | |
| LOW | fastai/vision/models/unet.py | 59 | CODE | |
| LOW | fastai/medical/imaging.py | 413 | CODE | |
| LOW | fastai/text/core.py | 352 | CODE | |
| LOW | fastai/text/data.py | 253 | CODE | |
| LOW | fastai/text/data.py | 269 | CODE | |
| LOW | fastai/text/learner.py | 257 | CODE | |
| LOW | fastai/text/models/core.py | 147 | CODE | |
| LOW | fastai/callback/wandb.py | 28 | CODE | |
| LOW | fastai/callback/core.py | 118 | CODE | |
| LOW | fastai/callback/tracker.py | 81 | CODE | |
| LOW | fastai/callback/schedule.py | 114 | CODE | |
| LOW | fastai/data/transforms.py | 30 | CODE | |
| LOW | fastai/data/core.py | 309 | CODE | |
| LOW | fastai/data/core.py | 344 | CODE | |
| LOW | fastai/data/load.py | 94 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | fastai/fp16_utils.py | 121 | print("Error in prep_param_lists: model may contain a mixture of parameters " | CODE |
| LOW | fastai/vision/utils.py | 38 | except Exception as e: f"Couldn't download {url}." | CODE |
| LOW | fastai/medical/imaging.py | 385 | except Exception as e: | CODE |
| LOW | fastai/callback/wandb.py | 70 | except Exception as e: print(f'WandbCallback could not log config parameters -> {e}') | CODE |
| LOW | fastai/callback/wandb.py | 104 | except Exception as e: | CODE |
| LOW | fastai/callback/wandb.py | 133 | except Exception as e: | CODE |
| LOW | fastai/callback/hook.py | 100 | except Exception as e: | CODE |
| LOW | fastai/callback/core.py | 65 | except Exception as e: raise modify_exception(e, f'Exception occured in `{self.__class__.__name__}` when cal | CODE |
| LOW | fastai/data/core.py | 107 | except Exception as e: | CODE |
| LOW | fastai/data/block.py | 182 | except Exception as e: | CODE |
| LOW | fastai/data/block.py | 236 | except Exception as e: | CODE |
| LOW | fastai/data/load.py | 183 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | nbs/examples/train_imagenette.py | 39 | CODE | |
| LOW | fastai/metrics.py | 421 | CODE | |
| LOW | fastai/torch_core.py | 531 | CODE | |
| LOW | fastai/fp16_utils.py | 137 | CODE | |
| LOW | fastai/learner.py | 451 | CODE | |
| LOW | fastai/text/learner.py | 174 | CODE | |
| LOW | fastai/callback/wandb.py | 55 | CODE | |
| LOW | fastai/data/load.py | 71 | CODE | |
| LOW | fastai/data/load.py | 158 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | fastai/interpret.py | 164 | def print_classification_report(self): | CODE |
| LOW | fastai/fp16_utils.py | 137 | def model_grads_to_master_grads(model_params, master_params, flat_master=False): | CODE |
| LOW | fastai/fp16_utils.py | 159 | def master_params_to_model_params(model_params, master_params, flat_master=False): | CODE |
| LOW | fastai/vision/utils.py | 20 | def _get_downloaded_image_filename(dest, name, suffix): | CODE |
| LOW | fastai/callback/tensorboard.py | 101 | def _write_projector_embedding(learn, writer, feat): | CODE |
| LOW | fastai/callback/tensorboard.py | 137 | def projector_word_embeddings(learn=None, layer=None, vocab=None, limit=-1, start=0, log_dir=None): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | fastai/callback/wandb.py | 57 | # Check if wandb.init has been called | COMMENT |
| LOW | fastai/callback/wandb.py | 229 | # Check if wandb.init has been called in case datasets are logged manually | COMMENT |
| LOW | fastai/callback/fp16.py | 211 | # Check if it's been long enough without overflow | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | fastai/tabular/data.py | 24 | cat_names:list=None, # Column names pertaining to categorical variables | CODE |
| MEDIUM | fastai/tabular/data.py | 25 | cont_names:list=None, # Column names pertaining to continuous variables | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | fastai/interpret.py | 132 | # This function is mainly copied from the sklearn docs | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | fastai/vision/gan.py | 241 | # "Show a sample image." | COMMENT |
| LOW | fastai/callback/schedule.py | 21 | def __init__(self, f, start, end): store_attr('f,start,end') | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | fastai/data/block.py | 84 | _msg = "If you wanted to compose several transforms in your getter don't forget to wrap them in a `Pipeline`." | CODE |