Repository Analysis

PriorLabs/TabPFN

⚡ TabPFN: Foundation Model for Tabular Data ⚡

24.5 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of PriorLabs/TabPFN, a Python project with 7,860 GitHub stars. SynthScan v2.0 examined 90,767 lines of code across 258 source files, recording 1711 pattern matches distributed across 17 syntactic categories. The overall adjusted score of 24.5 places this repository in the Moderate 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).

24.5
Adjusted Score
24.5
Raw Score
100%
Time Factor
2026-08-28
Last Push
7.9K
Stars
Python
Language
90.8K
Lines of Code
258
Files
1.7K
Pattern Hits
2026-08-29
Scan Date
0.29
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 76MEDIUM 143LOW 1492

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 1711 distinct pattern matches across 17 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.

Hyper-Verbose Identifiers1103 hits · 1012 pts
SeverityFileLineSnippetContext
LOWtests/test_inference.py106 def reset_save_peak_mem_factor(self, factor: int | None = None) -> None:CODE
LOWtests/test_inference.py149 def reset_save_peak_mem_factor(self, factor: int | None = None) -> None:CODE
LOWtests/test_inference.py230 def reset_save_peak_mem_factor(self, factor: int | None = None) -> None:CODE
LOWtests/test_inference.py262def test__cache_preprocessing__result_equal_in_serial_and_in_parallel() -> None:CODE
LOWtests/test_inference.py315def test__cache_preprocessing__with_outlier_removal() -> None:CODE
LOWtests/test_inference.py369def test__on_demand__result_equal_in_serial_and_in_parallel() -> None:CODE
LOWtests/test_inference.py432def test__iter_outputs__task_type_forwarded(CODE
LOWtests/test_inference.py476def _create_test_ensemble_configs(CODE
LOWtests/test_inference.py525def test__explicit_kv_cache__produces_outputs() -> None:CODE
LOWtests/test_inference.py583def test__explicit_kv_cache__task_type_forwarded_to_cache_build(CODE
LOWtests/test_inference.py631def test__explicit_kv_cache__keep_on_device_reuses_tensors(device: str) -> None:CODE
LOWtests/test_inference.py705def test__public_keep_cache_on_device__controls_cache_placement(CODE
LOWtests/test_inference.py767def test__init__mps_target_device__applies_mps_linear_bug_workaround(CODE
LOWtests/test_inference.py824def test__to__mps_target_device__applies_mps_linear_bug_workaround(CODE
LOWtests/test_inference.py877def test__kv_cache_chunking__matches_unchunked(CODE
LOWtests/test_inference.py947def test__kv_cache__embeddings_test_only_and_chunk_safe(CODE
LOWtests/test_inference.py985def test__resolve_kv_cache_precision__warns_when_unsupported() -> None:CODE
LOWtests/test_consistency.py51def _get_tiny_classification_data() -> tuple[np.ndarray, np.ndarray, np.ndarray]:CODE
LOWtests/test_consistency.py68def _get_tiny_regression_data() -> tuple[np.ndarray, np.ndarray, np.ndarray]:CODE
LOWtests/test_consistency.py84def _get_iris_multiclass_data() -> tuple[np.ndarray, np.ndarray, np.ndarray]:CODE
LOWtests/test_consistency.py245def _get_current_platform_string() -> str:CODE
LOWtests/test_consistency.py271def test__fit_predict__predictions_match_reference(CODE
LOWtests/test_consistency.py314def _load_reference_predictions_or_fail(test_name: str) -> np.ndarray:CODE
LOWtests/test_consistency.py324def save_reference_predictions() -> None:CODE
LOWtests/test_utils.py24def test__infer_devices__auto__cuda_and_mps_not_available__selects_cpu(CODE
LOWtests/test_utils.py33def test__infer_devices__auto__single_cuda_gpu_available__selects_it(CODE
LOWtests/test_utils.py44def test__infer_devices__auto__multiple_cuda_gpus_available__selects_all(CODE
LOWtests/test_utils.py60def test__infer_devices__auto__cuda_and_mps_available_but_excluded__selects_cpu(CODE
LOWtests/test_utils.py71def test__infer_devices__auto__mps_available_but_torch_too_old__selects_cpu(CODE
LOWtests/test_utils.py80def test__infer_devices__device_specified__selects_it(CODE
LOWtests/test_utils.py91def test__infer_devices__multiple_devices_specified___selects_them(CODE
LOWtests/test_utils.py104def test__infer_devices__device_specified_twice__raises() -> None:CODE
LOWtests/test_utils.py112def test__infer_devices__mps_specified_but_torch_too_old__raises(CODE
LOWtests/test_utils.py202def test_balance_probas_by_class_counts():CODE
LOWtests/test_utils.py218def test__translate_probs_across_borders__matches_unchunked(batch: int) -> None:CODE
LOWtests/test_utils.py235def test__translate_probs_across_borders__forces_chunking(CODE
LOWtests/test_utils.py313def test__infer_autocast_inference_mode__cpu(CODE
LOWtests/test_utils.py345def test__repair_borders__collapsed_top_gap__widens_upwards(borders, expected_last):CODE
LOWtests/test_utils.py360def test__repair_borders__nan_top__widens_upwards(borders, expected_last):CODE
LOWtests/test_estimators.py47def test__to__before_fit__does_not_crash(CODE
LOWtests/test_estimators.py65def test__to__between_fit_and_predict__does_not_crash(CODE
LOWtests/test_estimators.py83def test__to__between_fits__outputs_equal(CODE
LOWtests/test_estimators.py120def test__to__after_fit__no_tensors_left_on_old_device(CODE
LOWtests/test_estimators.py143def test__to__after_fit_and_predict__no_tensors_left_on_old_device(CODE
LOWtests/test_estimators.py178def test__fit_and_predict__do_not_write_into_the_callers_arrays(CODE
LOWtests/test_estimators.py212def test__fit_and_predict__do_not_modify_the_callers_dataframe(CODE
LOWtests/test_estimators.py431 def reset_save_peak_mem_factor(self, factor: int | None = None) -> None:CODE
LOWtests/test_estimators.py436def _get_shipped_inference_config(CODE
LOWtests/test_estimators.py462def _get_stand_in_model_specs(CODE
LOWtests/test_notebook_installs.py96def test_notebook_resolves_latest_pinned_packages(CODE
LOWtests/test_save_load_fitted_model.py31def _make_classification_data_with_categoricals() -> tuple[np.ndarray, np.ndarray]:CODE
LOWtests/test_save_load_fitted_model.py48def _assert_roundtrip_predictions(CODE
LOWtests/test_save_load_fitted_model.py95def test__save_and_load_twice__predictions_equal_to_before_save(CODE
LOWtests/test_save_load_fitted_model.py134def test__save_fit_state__does_not_move_live_estimator_to_cpu(CODE
LOWtests/test_save_load_fitted_model.py156def test__save_fit_state__keeps_tabpfn_fit_parent_name(tmp_path: Path) -> None:CODE
LOWtests/test_save_load_fitted_model.py176def test_saving_unfitted_model_raises_error(tmp_path: Path) -> None:CODE
LOWtests/test_save_load_fitted_model.py183def test__load_regressor_state_in_classifier__raises_error(tmp_path: Path) -> None:CODE
LOWtests/test_save_load_fitted_model.py196def test__load_classifier_state_in_regressor__raises_error(tmp_path: Path) -> None:CODE
LOWtests/test_save_load_fitted_model.py209def _init_and_save_unique_checkpoint(CODE
LOWtests/test_save_load_fitted_model.py224def test_saving_and_loading_model_with_weights(tmp_path: Path) -> None:CODE
1043 more matches not shown…
Decorative Section Separators108 hits · 375 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_finetuning_logging.py15# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_finetuning_logging.py17# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_browser_auth.py56# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_browser_auth.py58# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_browser_auth.py108# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_browser_auth.py110# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_browser_auth.py131# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_browser_auth.py133# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_browser_auth.py591# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_browser_auth.py593# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_browser_auth.py26# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_browser_auth.py28# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_browser_auth.py235# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_browser_auth.py237# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_browser_auth.py358# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_browser_auth.py360# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_browser_auth.py405# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_browser_auth.py407# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_regressor_interface.py1031# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_regressor_interface.py1033# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_regressor_interface.py1237# =============================================================================COMMENT
MEDIUMtests/test_regressor_interface.py1239# =============================================================================COMMENT
MEDIUMtests/test_finetuning_classifier.py486# =============================================================================COMMENT
MEDIUMtests/test_finetuning_classifier.py488# =============================================================================COMMENT
MEDIUMtests/test_finetuning_classifier.py939# =============================================================================COMMENT
MEDIUMtests/test_finetuning_classifier.py941# =============================================================================COMMENT
MEDIUMtests/test_finetuning_classifier.py1308# =============================================================================COMMENT
MEDIUMtests/test_finetuning_classifier.py1310# =============================================================================COMMENT
MEDIUMtests/test_finetuning_classifier.py105# =============================================================================COMMENT
MEDIUMtests/test_finetuning_classifier.py107# =============================================================================COMMENT
MEDIUMtests/test_classifier_interface.py1373# =============================================================================COMMENT
MEDIUMtests/test_classifier_interface.py1375# =============================================================================COMMENT
MEDIUM…preprocessing/test_encode_categorical_features_step.py556# ---------------------------------------------------------------------------COMMENT
MEDIUM…preprocessing/test_encode_categorical_features_step.py558# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_preprocessing/test_preprocessing_steps.py582# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_preprocessing/test_preprocessing_steps.py584# ---------------------------------------------------------------------------COMMENT
MEDIUM…ch_preprocessing/test_gpu_preprocessing_consistency.py39# ---------------------------------------------------------------------------COMMENT
MEDIUM…ch_preprocessing/test_gpu_preprocessing_consistency.py41# ---------------------------------------------------------------------------COMMENT
MEDIUM…ch_preprocessing/test_gpu_preprocessing_consistency.py231# ---------------------------------------------------------------------------COMMENT
MEDIUM…ch_preprocessing/test_gpu_preprocessing_consistency.py233# ---------------------------------------------------------------------------COMMENT
MEDIUM…ch_preprocessing/test_gpu_preprocessing_consistency.py258# ---------------------------------------------------------------------------COMMENT
MEDIUM…ch_preprocessing/test_gpu_preprocessing_consistency.py260# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_architectures/test_mlx_backend.py171# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_architectures/test_mlx_backend.py173# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_architectures/test_mlx_backend.py244# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_architectures/test_mlx_backend.py246# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_architectures/test_attention_backends.py63# ---------------------------------------------------------------------COMMENT
MEDIUMtests/test_architectures/test_attention_backends.py65# ---------------------------------------------------------------------COMMENT
MEDIUMtests/test_architectures/test_attention_backends.py131# ---------------------------------------------------------------------COMMENT
MEDIUMtests/test_architectures/test_attention_backends.py133# ---------------------------------------------------------------------COMMENT
MEDIUMexamples/finetune_classifier.py41# =============================================================================COMMENT
MEDIUMexamples/finetune_classifier.py47# =============================================================================COMMENT
MEDIUMexamples/sagemaker.py45# ---------------------------------------------------------------------------COMMENT
MEDIUMexamples/sagemaker.py47# ---------------------------------------------------------------------------COMMENT
MEDIUMexamples/sagemaker.py57# ---------------------------------------------------------------------------COMMENT
MEDIUMexamples/sagemaker.py59# ---------------------------------------------------------------------------COMMENT
MEDIUMexamples/sagemaker.py74# ---------------------------------------------------------------------------COMMENT
MEDIUMexamples/sagemaker.py76# ---------------------------------------------------------------------------COMMENT
MEDIUMexamples/sagemaker.py353# ---------------------------------------------------------------------------COMMENT
MEDIUMexamples/sagemaker.py355# ---------------------------------------------------------------------------COMMENT
48 more matches not shown…
Cross-File Repetition60 hits · 300 pts
SeverityFileLineSnippetContext
HIGH…torch_preprocessing/test_torch_quantile_transformer.py0test with 3d tensor (t, b, h) shape commonly used in tabpfn.STRING
HIGH…t_torch_preprocessing/test_torch_soft_clip_outliers.py0test with 3d tensor (t, b, h) shape commonly used in tabpfn.STRING
HIGH…test_torch_preprocessing/test_torch_standard_scaler.py0test with 3d tensor (t, b, h) shape commonly used in tabpfn.STRING
HIGHtests/test_architectures/test_tabpfn_v2.py0kv-cache inference must match the standard (full train+test) forward.STRING
HIGHtests/test_architectures/test_tabpfn_v2_6.py0kv-cache inference must match the standard (full train+test) forward.STRING
HIGHtests/test_architectures/test_tabpfn_v2_5.py0kv-cache inference must match the standard (full train+test) forward.STRING
HIGHtests/test_architectures/test_tabpfn_v2.py0the cache path also returns matching embeddings dicts.STRING
HIGHtests/test_architectures/test_tabpfn_v2_6.py0the cache path also returns matching embeddings dicts.STRING
HIGHtests/test_architectures/test_tabpfn_v2_5.py0the cache path also returns matching embeddings dicts.STRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_6.py0number of key/value heads to use for per-column-inter-row attention.STRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_5.py0number of key/value heads to use for per-column-inter-row attention.STRING
HIGHsrc/tabpfn/architectures/tabpfn_v2.py0number of key/value heads to use for per-column-inter-row attention.STRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_6.py0if > 1, the features will be grouped into groups of this size and the attention is across groups.STRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_5.py0if > 1, the features will be grouped into groups of this size and the attention is across groups.STRING
HIGHsrc/tabpfn/architectures/tabpfn_v2.py0if > 1, the features will be grouped into groups of this size and the attention is across groups.STRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_6.py0base class for the between-features and between-rows attention layers.STRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_5.py0base class for the between-features and between-rows attention layers.STRING
HIGHsrc/tabpfn/architectures/tabpfn_v2.py0base class for the between-features and between-rows attention layers.STRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_6.py0construct a new instance. args: embedding_size: the size of the input embedding. num_heads: the number of heads to use. STRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_5.py0construct a new instance. args: embedding_size: the size of the input embedding. num_heads: the number of heads to use. STRING
HIGHsrc/tabpfn/architectures/tabpfn_v2.py0construct a new instance. args: embedding_size: the size of the input embedding. num_heads: the number of heads to use. STRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_6.py0computes the attention between features of a single row. this is standard multi-head self-attention, where all features STRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_5.py0computes the attention between features of a single row. this is standard multi-head self-attention, where all features STRING
HIGHsrc/tabpfn/architectures/tabpfn_v2.py0computes the attention between features of a single row. this is standard multi-head self-attention, where all features STRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_6.py0forward pass for along-row attention between features. args: x_brse: the input tensor of shape (br, c, e), where: - br: STRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_5.py0forward pass for along-row attention between features. args: x_brse: the input tensor of shape (br, c, e), where: - br: STRING
HIGHsrc/tabpfn/architectures/tabpfn_v2.py0forward pass for along-row attention between features. args: x_brse: the input tensor of shape (br, c, e), where: - br: STRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_6.py0computes the attention between cells of a single column. this is multi-head attention featuring: - an implicit mask: theSTRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_5.py0computes the attention between cells of a single column. this is multi-head attention featuring: - an implicit mask: theSTRING
HIGHsrc/tabpfn/architectures/tabpfn_v2.py0computes the attention between cells of a single column. this is multi-head attention featuring: - an implicit mask: theSTRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_6.py0forward pass for attention between cells of a single column. args: x_bcre: the input tensor of shape (bc, r, e), where: STRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_5.py0forward pass for attention between cells of a single column. args: x_bcre: the input tensor of shape (bc, r, e), where: STRING
HIGHsrc/tabpfn/architectures/tabpfn_v2.py0forward pass for attention between cells of a single column. args: x_bcre: the input tensor of shape (bc, r, e), where: STRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_6.py0layernorm that maintains fp16 precision in autocast mode. pytorch autocast runs layernorm in fp32, which has bad effectsSTRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_5.py0layernorm that maintains fp16 precision in autocast mode. pytorch autocast runs layernorm in fp32, which has bad effectsSTRING
HIGHsrc/tabpfn/architectures/tabpfn_v2.py0layernorm that maintains fp16 precision in autocast mode. pytorch autocast runs layernorm in fp32, which has bad effectsSTRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_6.py0a block of one column-wise, one row-wise attention layer and an mlp layer.STRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_5.py0a block of one column-wise, one row-wise attention layer and an mlp layer.STRING
HIGHsrc/tabpfn/architectures/tabpfn_v2.py0a block of one column-wise, one row-wise attention layer and an mlp layer.STRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_6.py0tabpfnblock constructor. args: emsize: the input embedding size. nhead: the number of query attention heads to use. dim_STRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_5.py0tabpfnblock constructor. args: emsize: the input embedding size. nhead: the number of query attention heads to use. dim_STRING
HIGHsrc/tabpfn/architectures/tabpfn_v2.py0tabpfnblock constructor. args: emsize: the input embedding size. nhead: the number of query attention heads to use. dim_STRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_6.py0compute one column-wise, one row-wise attention, and an mlp layer. uses post-norm. b: batch size r: number of rows / iteSTRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_5.py0compute one column-wise, one row-wise attention, and an mlp layer. uses post-norm. b: batch size r: number of rows / iteSTRING
HIGHsrc/tabpfn/architectures/tabpfn_v2.py0compute one column-wise, one row-wise attention, and an mlp layer. uses post-norm. b: batch size r: number of rows / iteSTRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_6.py0move all cached tensors to the given device. returns a new cache.STRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_5.py0move all cached tensors to the given device. returns a new cache.STRING
HIGHsrc/tabpfn/architectures/tabpfn_v2.py0move all cached tensors to the given device. returns a new cache.STRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_6.py0perform a forward pass. see modelinterface.forward() for the full docstring of the shared arguments. in addition to thosSTRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_5.py0perform a forward pass. see modelinterface.forward() for the full docstring of the shared arguments. in addition to thosSTRING
HIGHsrc/tabpfn/architectures/tabpfn_v2.py0perform a forward pass. see modelinterface.forward() for the full docstring of the shared arguments. in addition to thosSTRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_6.py0parse the config dict into a tabpfnv2config, return unused keys. args: config: config dict to parse. this function shoulSTRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_5.py0parse the config dict into a tabpfnv2config, return unused keys. args: config: config dict to parse. this function shoulSTRING
HIGHsrc/tabpfn/architectures/tabpfn_v2.py0parse the config dict into a tabpfnv2config, return unused keys. args: config: config dict to parse. this function shoulSTRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_6.py0construct tabpfnv2 based on the given config. this factory method implements the interface defined in tabpfn.architecturSTRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_5.py0construct tabpfnv2 based on the given config. this factory method implements the interface defined in tabpfn.architecturSTRING
HIGHsrc/tabpfn/architectures/tabpfn_v2.py0construct tabpfnv2 based on the given config. this factory method implements the interface defined in tabpfn.architecturSTRING
HIGHsrc/tabpfn/finetuning/finetuned_regressor.py0fine-tune the tabpfn model on the provided training data. args: x: the training input samples of shape (n_samples, n_feaSTRING
HIGHsrc/tabpfn/finetuning/finetuned_base.py0fine-tune the tabpfn model on the provided training data. args: x: the training input samples of shape (n_samples, n_feaSTRING
HIGHsrc/tabpfn/finetuning/finetuned_classifier.py0fine-tune the tabpfn model on the provided training data. args: x: the training input samples of shape (n_samples, n_feaSTRING
Unused Imports283 hits · 253 pts
SeverityFileLineSnippetContext
LOWtests/test_debug_versions.py3CODE
LOWtests/test_inference.py5CODE
LOWtests/test_consistency.py26CODE
LOWtests/test_utils.py3CODE
LOWtests/test_estimators.py5CODE
LOWtests/conftest.py5CODE
LOWtests/test_notebook_installs.py16CODE
LOWtests/quick_test.py9CODE
LOWtests/test_save_load_fitted_model.py5CODE
LOWtests/test_inference_config.py5CODE
LOWtests/test_visualisation.py3CODE
LOWtests/test_parallel_execute.py5CODE
LOWtests/test_finetuning_regressor.py13CODE
LOWtests/test_finetuning_logging.py5CODE
LOWtests/test_ft_utils.py3CODE
LOWtests/utils.py3CODE
LOWtests/test_config.py3CODE
LOWtests/test_model_loading.py3CODE
LOWtests/test_browser_auth.py5CODE
LOWtests/test_regression_metrics.py3CODE
LOWtests/test_regressor_interface.py3CODE
LOWtests/test_model_cache.py5CODE
LOWtests/test_download_fallbacks.py3CODE
LOWtests/test_inference_tuning.py3CODE
LOWtests/test_finetuning_classifier.py12CODE
LOWtests/test_checkpoint.py3CODE
LOWtests/test_settings.py3CODE
LOWtests/test_classifier_interface.py3CODE
LOW…st_preprocessing/test_adaptive_quantile_transformer.py3CODE
LOW…preprocessing/test_encode_categorical_features_step.py5CODE
LOW…ocessing/test_nan_handling_polynomial_features_step.py5CODE
LOWtests/test_preprocessing/test_modality_detection.py5CODE
LOWtests/test_preprocessing/test_power_transformer.py3CODE
LOWtests/test_preprocessing/test_data_cleaning.py5CODE
LOW…reprocessing/test_reshape_feature_distribution_step.py5CODE
LOWtests/test_preprocessing/test_add_svd_features_step.py5CODE
LOWtests/test_preprocessing/test_kdi_transformer.py3CODE
LOW…sts/test_preprocessing/test_feature_name_uniqueness.py13CODE
LOWtests/test_preprocessing/test_preprocessing_steps.py3CODE
LOWtests/test_preprocessing/test_label_encoder.py5CODE
LOWtests/test_preprocessing/test_ops.py5CODE
LOWtests/test_preprocessing/test_inf_handling.py13CODE
LOW…st_preprocessing/test_add_fingerprint_features_step.py5CODE
LOW…t_preprocessing/test_numeric_parsing_below_pandas_3.py17CODE
LOW…s/test_preprocessing/test_differentiable_znorm_step.py3CODE
LOWtests/test_preprocessing/test_datamodel.py5CODE
LOWtests/test_preprocessing/test_ensemble.py3CODE
LOW…st_preprocessing/test_remove_constant_features_step.py5CODE
LOWtests/test_preprocessing/test_pipeline_consistency.py16CODE
LOW…ts/test_preprocessing/test_sklearn_estimator_checks.py5CODE
LOW…torch_preprocessing/test_torch_quantile_transformer.py5CODE
LOW…orch_preprocessing/test_torch_shuffle_features_step.py5CODE
LOW…ts/test_torch_preprocessing/test_pipeline_interface.py5CODE
LOW…t_torch_preprocessing/test_torch_soft_clip_outliers.py5CODE
LOW…est_torch_preprocessing/test_torch_squashing_scaler.py5CODE
LOW…ch_preprocessing/test_gpu_preprocessing_consistency.py11CODE
LOWtests/test_torch_preprocessing/test_torch_svd.py5CODE
LOW…test_torch_preprocessing/test_torch_standard_scaler.py5CODE
LOWtests/test_architectures/test_attention_dispatch.py8CODE
LOWtests/test_architectures/test_mlx_backend.py10CODE
223 more matches not shown…
Self-Referential Comments27 hits · 84 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_model_loading.py593 # Create a fake checkpoint to simulate a successful downloadCOMMENT
MEDIUMtests/test_regressor_interface.py459 # Create a simple preprocessing pipelineCOMMENT
MEDIUMtests/test_regressor_interface.py684 # Create a CPU modelCOMMENT
MEDIUMtests/test_regressor_interface.py725 # Create a CPU modelCOMMENT
MEDIUMtests/test_regressor_interface.py773 # Create a TabPFNRegressor with fixed random state for reproducibilityCOMMENT
MEDIUMtests/test_regressor_interface.py790 # Create a new dataset with added constant featuresCOMMENT
MEDIUMtests/test_finetuning_classifier.py1587 # Initialize two classifiers with the necessary modesCOMMENT
MEDIUMtests/test_finetuning_classifier.py1755 # Create a larger dataset where columns have distinct mean valuesCOMMENT
MEDIUMtests/test_classifier_interface.py919 # Create a TabPFNClassifier with fixed random state for reproducibilityCOMMENT
MEDIUMtests/test_classifier_interface.py927 # Create a new dataset with added constant featuresCOMMENT
MEDIUMtests/test_classifier_interface.py504 # Create a subset of X to match the length of y_imbalancedCOMMENT
MEDIUMtests/test_classifier_interface.py684 # Create an IMBALANCED datasetCOMMENT
MEDIUMtests/test_classifier_interface.py726 # Create a simple preprocessing pipelineCOMMENT
MEDIUMtests/test_classifier_interface.py963 # Create a DataFrame with text and NA valuesCOMMENT
MEDIUMtests/test_preprocessing/test_add_svd_features_step.py239 # Create an invalid enum value by bypassing the enumCOMMENT
MEDIUMexamples/tabpfn_classifier_with_tuning.py38# Initialize a classifier with tuning and fitCOMMENT
MEDIUMexamples/tabpfn_classifier_with_tuning.py46# Initialize a classifier with tuning and fitCOMMENT
MEDIUMexamples/tabpfn_for_binary_classification.py20# Initialize a classifierCOMMENT
MEDIUMexamples/tabpfn_for_multiclass_classification.py23# Initialize a classifierCOMMENT
MEDIUMsrc/tabpfn/regressor.py1313 # Create a dictionary of outputs with proper typing via TypedDictCOMMENT
MEDIUMsrc/tabpfn/misc/_sklearn_compat.py31# The following code does not depend on the sklearn versionCOMMENT
MEDIUMsrc/tabpfn/architectures/tabpfn_v2_6.py1246 # The following class imputation is performed for backwards compatibility.COMMENT
MEDIUMsrc/tabpfn/architectures/tabpfn_v2_5.py1368 # The following class imputation is performed for backwards compatibility.COMMENT
MEDIUM…tabpfn/preprocessing/torch/torch_soft_clip_outliers.py61 # Create a clean copy with outliers masked as NaNCOMMENT
MEDIUMsrc/tabpfn/preprocessing/torch/ops.py131 # Create a mask to zero out the padding positions.COMMENT
MEDIUM…reprocessing/steps/encode_categorical_features_step.py204 # Create a column transformerCOMMENT
MEDIUM…reprocessing/steps/encode_categorical_features_step.py262 # Create a column transformerCOMMENT
Docstring Block Structure12 hits · 60 pts
SeverityFileLineSnippetContext
HIGHexamples/sagemaker.py87Serialize TabPFN input data and parameters into a JSON request body. This utility converts NumPy arrays and configuSTRING
HIGHexamples/sagemaker.py173Invoke the TabPFN SageMaker endpoint with tabular data. This helper prepares the payload for a TabPFN 2.5 model, seSTRING
HIGHsrc/tabpfn/classifier.py967Predict probabilities for several independent datasets in one pass. Each ``(X_train, y_train, X_test)`` triple STRING
HIGHsrc/tabpfn/utils.py267Infer whether reduced-precision (autocast) inference should be enabled. On GPU this is fp16 autocast; on CPU ``torcSTRING
HIGHsrc/tabpfn/regressor.py1584Predict for several independent datasets in one pass. Each triple is preprocessed exactly as ``fit()`` + ``predSTRING
HIGHsrc/tabpfn/base.py456Extract embeddings from a fitted TabPFN model. Args: model : TabPFNClassifier | TabPFNRegressor STRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_6.py1057Parse the config dict into a TabPFNV2Config, return unused keys. Args: config: Config dict to parse. This fSTRING
HIGHsrc/tabpfn/architectures/interface.py126Parses the given config dict into ArchitectureConfig or a subclass. This config will then be passed to get_archSTRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_5.py1080Parse the config dict into a TabPFNV2Config, return unused keys. Args: config: Config dict to parse. This fSTRING
HIGHsrc/tabpfn/architectures/tabpfn_v2.py1096Parse the config dict into a TabPFNV2Config, return unused keys. Args: config: Config dict to parse. This fSTRING
HIGHsrc/tabpfn/finetuning/data_util.py340Retrieves, splits, and preprocesses the dataset config at the index. Performs train/test splitting and applies STRING
HIGHsrc/tabpfn/finetuning/train_util.py241Create and initialize AdamW optimizer, optionally loading from checkpoint. Args: model_parameters: IteratorSTRING
Modern Structural Boilerplate37 hits · 37 pts
SeverityFileLineSnippetContext
LOWtests/test_consistency.py48logger = logging.getLogger(__name__)CODE
LOWtests/conftest.py17def set_global_seed() -> None:CODE
LOWtests/test_preprocessing/test_pipeline_consistency.py35logger = logging.getLogger(__name__)CODE
LOWsrc/tabpfn/__init__.py58__all__ = [CODE
LOWsrc/tabpfn/browser_auth.py38logger = logging.getLogger(__name__)CODE
LOWsrc/tabpfn/model_loading.py51logger = logging.getLogger(__name__)CODE
LOWsrc/tabpfn/inference.py208 def _set_models(self, models: list[Architecture]) -> None:CODE
LOWsrc/tabpfn/inference.py274 def _set_models(self, models: list[Architecture]) -> None:CODE
LOWsrc/tabpfn/inference.py312 def _set_models(self, models: list[Architecture]) -> None:CODE
LOWsrc/tabpfn/inference.py1402 def set_dtype(self, dtype: torch.dtype) -> None:CODE
LOW…bpfn/architectures/shared/workaround_mps_linear_bug.py28logger = logging.getLogger(__name__)CODE
LOWsrc/tabpfn/finetuning/finetuned_regressor.py30logger = logging.getLogger(__name__)CODE
LOWsrc/tabpfn/finetuning/finetuned_regressor.py350 def _setup_estimator(self) -> None:CODE
LOWsrc/tabpfn/finetuning/finetuned_regressor.py359 def _setup_batch(self, batch: RegressorBatch) -> None: # type: ignore[override]CODE
LOWsrc/tabpfn/finetuning/_torch_compat.py53__all__ = [CODE
LOWsrc/tabpfn/finetuning/__init__.py15__all__ = [CODE
LOWsrc/tabpfn/finetuning/train_util.py25logger = logging.getLogger(__name__)CODE
LOWsrc/tabpfn/finetuning/finetuned_base.py57logger = logging.getLogger(__name__)CODE
LOWsrc/tabpfn/finetuning/finetuned_base.py567 def _setup_estimator(self) -> None:CODE
LOWsrc/tabpfn/finetuning/finetuned_base.py572 def _setup_batch(self, batch: ClassifierBatch | RegressorBatch) -> None:CODE
LOWsrc/tabpfn/finetuning/finetuned_classifier.py27logger = logging.getLogger(__name__)CODE
LOWsrc/tabpfn/finetuning/finetuned_classifier.py237 def _setup_estimator(self) -> None:CODE
LOWsrc/tabpfn/finetuning/finetuned_classifier.py244 def _setup_batch(self, batch: ClassifierBatch) -> None: # type: ignore[override]CODE
LOWsrc/tabpfn/visualisation/__init__.py7__all__ = ["plot_regression_distribution"]CODE
LOWsrc/tabpfn/preprocessing/configs.py184__all__ = [CODE
LOWsrc/tabpfn/preprocessing/presets.py85__all__ = [CODE
LOWsrc/tabpfn/preprocessing/__init__.py26__all__ = [CODE
LOWsrc/tabpfn/preprocessing/torch/__init__.py29__all__ = [CODE
LOW…bpfn/preprocessing/steps/differentiable_z_norm_step.py48__all__ = [CODE
LOW…eprocessing/steps/reshape_feature_distribution_step.py776__all__ = [CODE
LOW…reprocessing/steps/encode_categorical_features_step.py467__all__ = [CODE
LOW…c/tabpfn/preprocessing/steps/safe_power_transformer.py211__all__ = [CODE
LOW…n/preprocessing/steps/add_fingerprint_features_step.py158__all__ = [CODE
LOWsrc/tabpfn/preprocessing/steps/__init__.py36__all__ = [CODE
LOW…n/preprocessing/steps/adaptive_quantile_transformer.py185__all__ = [CODE
LOWsrc/tabpfn/preprocessing/steps/kdi_transformer.py165__all__ = [CODE
LOW…fn/preprocessing/steps/squashing_scaler_transformer.py371__all__ = ["SquashingScaler"]STRING
Deep Nesting28 hits · 24 pts
SeverityFileLineSnippetContext
LOWtests/test_estimators.py299CODE
LOW…reprocessing/test_reshape_feature_distribution_step.py335CODE
LOWtests/test_preprocessing/test_ensemble.py826CODE
LOWsrc/tabpfn/classifier.py543CODE
LOWsrc/tabpfn/classifier.py1654CODE
LOWsrc/tabpfn/model_loading.py199CODE
LOWsrc/tabpfn/model_loading.py226CODE
LOWsrc/tabpfn/model_loading.py319CODE
LOWsrc/tabpfn/model_loading.py374CODE
LOWsrc/tabpfn/model_loading.py618CODE
LOWsrc/tabpfn/utils.py321CODE
LOWsrc/tabpfn/regressor.py567CODE
LOWsrc/tabpfn/regressor.py1910CODE
LOWsrc/tabpfn/misc/debug_versions.py188CODE
LOWsrc/tabpfn/misc/debug_versions.py269CODE
LOWsrc/tabpfn/misc/debug_versions.py347CODE
LOWsrc/tabpfn/architectures/tabpfn_v2_6.py701CODE
LOWsrc/tabpfn/architectures/interface.py44CODE
LOWsrc/tabpfn/architectures/tabpfn_v3.py1817CODE
LOWsrc/tabpfn/architectures/tabpfn_v3.py2236CODE
LOWsrc/tabpfn/architectures/tabpfn_v2_5.py703CODE
LOWsrc/tabpfn/architectures/tabpfn_v2.py799CODE
LOWsrc/tabpfn/finetuning/finetuned_base.py735CODE
LOWsrc/tabpfn/preprocessing/clean.py186CODE
LOWsrc/tabpfn/preprocessing/torch/torch_svd.py76CODE
LOW…eprocessing/steps/reshape_feature_distribution_step.py191CODE
LOW…eprocessing/steps/reshape_feature_distribution_step.py274CODE
LOW…n/preprocessing/steps/add_fingerprint_features_step.py68CODE
Magic Placeholder Names4 hits · 20 pts
SeverityFileLineSnippetContext
HIGHsrc/tabpfn/browser_auth.py629 ' 4. Set the environment variable: export TABPFN_TOKEN="<your-api-key>"\n'CODE
HIGHsrc/tabpfn/browser_auth.py631 ' import os; os.environ["TABPFN_TOKEN"] = "<your-api-key>"'CODE
HIGHsrc/tabpfn/errors.py49 ' export TABPFN_TOKEN="<your-api-key>"\n'CODE
HIGHsrc/tabpfn/errors.py51 ' import os; os.environ["TABPFN_TOKEN"] = "<your-api-key>"'CODE
Excessive Try-Catch Wrapping16 hits · 17 pts
SeverityFileLineSnippetContext
LOWtests/test_preprocessing/test_pipeline_consistency.py425 except Exception as e:CODE
MEDIUMexamples/sagemaker.py348 print(f"Error parsing JSON response: {e}")CODE
LOWsrc/tabpfn/classifier.py796 except Exception as e: # noqa: BLE001CODE
LOWsrc/tabpfn/browser_auth.py137 except Exception:CODE
LOWsrc/tabpfn/browser_auth.py207 except Exception:CODE
LOWsrc/tabpfn/browser_auth.py166 except Exception as exc:CODE
LOWsrc/tabpfn/browser_auth.py331 except Exception: # noqa: BLE001CODE
LOWsrc/tabpfn/browser_auth.py507 except Exception:CODE
LOWsrc/tabpfn/model_loading.py302 except Exception as e: # noqa: BLE001CODE
LOWsrc/tabpfn/model_loading.py362 except Exception: # noqa: BLE001CODE
LOWsrc/tabpfn/model_loading.py367 except Exception as e: # noqa: BLE001CODE
LOWsrc/tabpfn/model_loading.py524 except Exception as e: # noqa: BLE001CODE
LOWsrc/tabpfn/model_loading.py535 except Exception as e: # noqa: BLE001CODE
LOWsrc/tabpfn/model_loading.py563 except Exception as e: # noqa: BLE001CODE
LOWsrc/tabpfn/regressor.py945 except Exception as e: # noqa: BLE001CODE
LOWsrc/tabpfn/preprocessing/steps/kdi_transformer.py161 except Exception: # noqa: BLE001CODE
AI Slop Vocabulary8 hits · 16 pts
SeverityFileLineSnippetContext
MEDIUMpyproject.toml151 # "DTZ", # One day I should know how to utilize timezones and dates...COMMENT
MEDIUMtests/test_finetuning_classifier.py1563 n_total = 50 # Increased slightly for more robust testingCODE
MEDIUM…t_torch_preprocessing/test_torch_soft_clip_outliers.py58 """Test that two-pass approach produces more robust bounds."""STRING
MEDIUMsrc/tabpfn/inference_tuning.py371 """Selects the robust optimal threshold for the given metric.STRING
LOWsrc/tabpfn/parallel_execute.py85 # If we only have one device then just use the current thread to avoid overhead.COMMENT
MEDIUMsrc/tabpfn/preprocessing/configs.py70 "robust", # a standard sklearn robust scalerCODE
MEDIUMsrc/tabpfn/preprocessing/steps/preprocessing_helpers.py559 # TODO: Could utilize the categorical dtype values directly instead of "auto"COMMENT
MEDIUM…fn/preprocessing/steps/squashing_scaler_transformer.py88 r"""Perform robust centering and scaling followed by soft clipping.CODE
Over-Commented Block11 hits · 11 pts
SeverityFileLineSnippetContext
LOWexamples/finetune_classifier.py41# =============================================================================COMMENT
LOWexamples/sagemaker.py61#COMMENT
LOWexamples/finetune_regressor.py41#COMMENT
LOW.github/workflows/claude-code-review.yml21COMMENT
LOW.github/workflows/assign-pr-reviewer.yml1# When a PR is opened from a fork or by dependabot, request a review from a randomlyCOMMENT
LOW.github/workflows/ci.yml121 path: ${{ github.workspace }}/model_cacheCOMMENT
LOW.github/workflows/ci.yml141 # while capping MKL (MKL_ENABLE_INSTRUCTIONS) or torch's own vectorizedCOMMENT
LOWsrc/tabpfn/classifier.py1081 # prior fit is preserved), and the batched executor is dropped with theCOMMENT
LOWsrc/tabpfn/misc/_sklearn_compat.py1001COMMENT
LOWsrc/tabpfn/preprocessing/clean.py121COMMENT
LOWsrc/tabpfn/preprocessing/clean.py241 # 4. Pandas will convert dtypes to Int64Dtype/Float64Dtype, which includeCOMMENT
AI Structural Patterns8 hits · 6 pts
SeverityFileLineSnippetContext
LOWsrc/tabpfn/classifier.py209CODE
LOWsrc/tabpfn/regressor.py241CODE
LOWsrc/tabpfn/misc/_sklearn_compat.py448CODE
LOWsrc/tabpfn/misc/_sklearn_compat.py502CODE
LOWsrc/tabpfn/finetuning/finetuned_regressor.py244CODE
LOWsrc/tabpfn/finetuning/finetuned_base.py421CODE
LOWsrc/tabpfn/finetuning/finetuned_classifier.py143CODE
LOWsrc/tabpfn/preprocessing/ensemble.py88CODE
Redundant / Tautological Comments2 hits · 3 pts
SeverityFileLineSnippetContext
LOWsrc/tabpfn/model_loading.py309 # Check if this is an authentication/gating errorCOMMENT
LOWsrc/tabpfn/utils.py214 # Check if the function is available in torchCOMMENT
Overly Generic Function Names2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtests/test_parallel_execute.py15 def test_function(device: torch.device) -> int: # noqa: ARG001CODE
LOWtests/test_parallel_execute.py42 def test_function(device: torch.device) -> int: # noqa: ARG001CODE
Verbosity Indicators1 hit · 2 pts
SeverityFileLineSnippetContext
LOWtests/test_finetuning_classifier.py1796 # Step 3: Validate that columns are in the same order across all batches.COMMENT
Structural Annotation Overuse1 hit · 2 pts
SeverityFileLineSnippetContext
LOWtests/test_finetuning_classifier.py1796 # Step 3: Validate that columns are in the same order across all batches.COMMENT