Repository Analysis

PriorLabs/TabPFN

⚡ TabPFN: Foundation Model for Tabular Data ⚡

25.0 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of PriorLabs/TabPFN, a Python project with 7,600 GitHub stars. SynthScan v2.0 examined 80,459 lines of code across 241 source files, recording 1457 pattern matches distributed across 17 syntactic categories. The overall adjusted score of 25.0 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).

25.0
Adjusted Score
25.0
Raw Score
100%
Time Factor
2026-07-14
Last Push
7.6K
Stars
Python
Language
80.5K
Lines of Code
241
Files
1.5K
Pattern Hits
2026-07-14
Scan Date
0.31
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 74MEDIUM 137LOW 1246

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 1457 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 Identifiers872 hits · 842 pts
SeverityFileLineSnippetContext
LOWtests/test_inference.py103 def reset_save_peak_mem_factor(self, factor: int | None = None) -> None:CODE
LOWtests/test_inference.py146 def reset_save_peak_mem_factor(self, factor: int | None = None) -> None:CODE
LOWtests/test_inference.py225 def reset_save_peak_mem_factor(self, factor: int | None = None) -> None:CODE
LOWtests/test_inference.py229def test__cache_preprocessing__result_equal_in_serial_and_in_parallel() -> None:CODE
LOWtests/test_inference.py282def test__cache_preprocessing__with_outlier_removal() -> None:CODE
LOWtests/test_inference.py336def test__on_demand__result_equal_in_serial_and_in_parallel() -> None:CODE
LOWtests/test_inference.py399def test__iter_outputs__task_type_forwarded(CODE
LOWtests/test_inference.py443def _create_test_ensemble_configs(CODE
LOWtests/test_inference.py492def test__explicit_kv_cache__produces_outputs() -> None:CODE
LOWtests/test_inference.py541def test__explicit_kv_cache__keep_on_device_reuses_tensors(device: str) -> None:CODE
LOWtests/test_inference.py614def test__public_keep_cache_on_device__controls_cache_placement(CODE
LOWtests/test_inference.py676def test__init__mps_target_device__applies_mps_linear_bug_workaround(CODE
LOWtests/test_inference.py732def test__to__mps_target_device__applies_mps_linear_bug_workaround(CODE
LOWtests/test_inference.py784def test__kv_cache_chunking__matches_unchunked(CODE
LOWtests/test_inference.py854def test__kv_cache_chunking__train_embeddings_not_duplicated(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.py21def test__infer_devices__auto__cuda_and_mps_not_available__selects_cpu(CODE
LOWtests/test_utils.py30def test__infer_devices__auto__single_cuda_gpu_available__selects_it(CODE
LOWtests/test_utils.py41def test__infer_devices__auto__multiple_cuda_gpus_available__selects_all(CODE
LOWtests/test_utils.py57def test__infer_devices__auto__cuda_and_mps_available_but_excluded__selects_cpu(CODE
LOWtests/test_utils.py68def test__infer_devices__auto__mps_available_but_torch_too_old__selects_cpu(CODE
LOWtests/test_utils.py77def test__infer_devices__device_specified__selects_it(CODE
LOWtests/test_utils.py88def test__infer_devices__multiple_devices_specified___selects_them(CODE
LOWtests/test_utils.py101def test__infer_devices__device_specified_twice__raises() -> None:CODE
LOWtests/test_utils.py109def test__infer_devices__mps_specified_but_torch_too_old__raises(CODE
LOWtests/test_utils.py199def test_balance_probas_by_class_counts():CODE
LOWtests/test_utils.py215def test__translate_probs_across_borders__matches_unchunked(batch: int) -> None:CODE
LOWtests/test_utils.py232def test__translate_probs_across_borders__forces_chunking(CODE
LOWtests/test_estimators.py32def test__to__before_fit__does_not_crash(CODE
LOWtests/test_estimators.py50def test__to__between_fit_and_predict__does_not_crash(CODE
LOWtests/test_estimators.py68def test__to__between_fits__outputs_equal(CODE
LOWtests/test_estimators.py105def test__to__after_fit__no_tensors_left_on_old_device(CODE
LOWtests/test_estimators.py128def test__to__after_fit_and_predict__no_tensors_left_on_old_device(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
LOWtests/test_save_load_fitted_model.py263def test_saving_and_loading_multiple_models_with_weights(CODE
LOWtests/test_save_load_fitted_model.py310def test_saving_and_loading_with_tuning_config(CODE
LOWtests/test_save_load_fitted_model.py358def test__save_and_load_fit_with_cache__predictions_equal(CODE
LOWtests/test_save_load_fitted_model.py408def test__save_and_load_fit_with_cache_twice__predictions_equal(CODE
LOWtests/test_inference_config.py21def test__save_and_load__loaded_value_equal_to_saved() -> None:CODE
LOWtests/test_inference_config.py34def test__override_with_user_input__dict_of_overrides__sets_values_correctly() -> None:CODE
LOWtests/test_inference_config.py57def test__override_with_user_input__config_override__replaces_entire_config() -> None:CODE
LOWtests/test_inference_config.py127def test__classifier_get_inference_config__before_fit__returns_config() -> None:CODE
LOWtests/test_inference_config.py136def test__classifier_get_inference_config__returns_deepcopy() -> None:CODE
LOWtests/test_inference_config.py145def test__classifier_get_inference_config__with_override__applies_override() -> None:CODE
812 more matches not shown…
Decorative Section Separators102 hits · 357 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_finetuning_classifier.py391# =============================================================================COMMENT
MEDIUMtests/test_finetuning_classifier.py393# =============================================================================COMMENT
MEDIUMtests/test_finetuning_classifier.py570# =============================================================================COMMENT
MEDIUMtests/test_finetuning_classifier.py572# =============================================================================COMMENT
MEDIUMtests/test_finetuning_classifier.py932# =============================================================================COMMENT
MEDIUMtests/test_finetuning_classifier.py934# =============================================================================COMMENT
MEDIUMtests/test_finetuning_classifier.py99# =============================================================================COMMENT
MEDIUMtests/test_finetuning_classifier.py101# =============================================================================COMMENT
MEDIUMtests/test_classifier_interface.py1387# =============================================================================COMMENT
MEDIUMtests/test_classifier_interface.py1389# =============================================================================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.py175# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_architectures/test_mlx_backend.py177# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_architectures/test_mlx_backend.py248# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_architectures/test_mlx_backend.py250# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_architectures/test_attention_backends.py61# ---------------------------------------------------------------------COMMENT
MEDIUMtests/test_architectures/test_attention_backends.py63# ---------------------------------------------------------------------COMMENT
MEDIUMtests/test_architectures/test_attention_backends.py128# ---------------------------------------------------------------------COMMENT
MEDIUMtests/test_architectures/test_attention_backends.py130# ---------------------------------------------------------------------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
MEDIUMexamples/finetune_regressor.py38# =============================================================================COMMENT
MEDIUMexamples/finetune_regressor.py44# =============================================================================COMMENT
MEDIUM.github/workflows/ci.yml162 # -------------------------------------------------------------------COMMENT
MEDIUM.github/workflows/ci.yml164 # -------------------------------------------------------------------COMMENT
MEDIUM.github/workflows/ci.yml209 # -------------------------------------------------------------------COMMENT
MEDIUM.github/workflows/ci.yml211 # -------------------------------------------------------------------COMMENT
42 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 Imports272 hits · 244 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_regressor_interface.py3CODE
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…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_mlx_backend.py10CODE
LOWtests/test_architectures/test_tabpfn_v2.py4CODE
LOWtests/test_architectures/test_tabpfn_v2_6.py5CODE
LOWtests/test_architectures/test_tabpfn_v3.py5CODE
LOWtests/test_architectures/test_bar_distribution.py3CODE
212 more matches not shown…
Self-Referential Comments27 hits · 84 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_model_loading.py528 # 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.py1211 # Initialize two classifiers with the necessary modesCOMMENT
MEDIUMtests/test_finetuning_classifier.py1379 # Create a larger dataset where columns have distinct mean valuesCOMMENT
MEDIUMtests/test_classifier_interface.py933 # Create a TabPFNClassifier with fixed random state for reproducibilityCOMMENT
MEDIUMtests/test_classifier_interface.py941 # Create a new dataset with added constant featuresCOMMENT
MEDIUMtests/test_classifier_interface.py505 # Create a subset of X to match the length of y_imbalancedCOMMENT
MEDIUMtests/test_classifier_interface.py698 # Create an IMBALANCED datasetCOMMENT
MEDIUMtests/test_classifier_interface.py740 # Create a simple preprocessing pipelineCOMMENT
MEDIUMtests/test_classifier_interface.py977 # 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_with_tuning.py38# Initialize a classifier with tuning and fitCOMMENT
MEDIUMexamples/tabpfn_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.py1262 # 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.py1239 # The following class imputation is performed for backwards compatibility.COMMENT
MEDIUMsrc/tabpfn/architectures/tabpfn_v2_5.py1361 # 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.py201 # Create a column transformerCOMMENT
MEDIUM…reprocessing/steps/encode_categorical_features_step.py250 # Create a column transformerCOMMENT
Docstring Block Structure10 hits · 50 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.py942Predict probabilities for several independent datasets in one pass. Each ``(X_train, y_train, X_test)`` triple STRING
HIGHsrc/tabpfn/utils.py228Infer whether fp16 inference should be enabled. Args: devices: The devices to validate against. enaSTRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_6.py1050Parse the config dict into a TabPFNV2Config, return unused keys. Args: config: Config dict to parse. This fSTRING
HIGHsrc/tabpfn/architectures/interface.py117Parses the given config dict into ArchitectureConfig or a subclass. This config will then be passed to get_archSTRING
HIGHsrc/tabpfn/architectures/tabpfn_v2_5.py1073Parse the config dict into a TabPFNV2Config, return unused keys. Args: config: Config dict to parse. This fSTRING
HIGHsrc/tabpfn/architectures/tabpfn_v2.py1088Parse 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.py34logger = logging.getLogger(__name__)CODE
LOWsrc/tabpfn/__init__.py58__all__ = [CODE
LOWsrc/tabpfn/browser_auth.py38logger = logging.getLogger(__name__)CODE
LOWsrc/tabpfn/model_loading.py50logger = logging.getLogger(__name__)CODE
LOWsrc/tabpfn/inference.py193 def _set_models(self, models: list[Architecture]) -> None:CODE
LOWsrc/tabpfn/inference.py259 def _set_models(self, models: list[Architecture]) -> None:CODE
LOWsrc/tabpfn/inference.py297 def _set_models(self, models: list[Architecture]) -> None:CODE
LOWsrc/tabpfn/inference.py1296 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.py27logger = logging.getLogger(__name__)CODE
LOWsrc/tabpfn/finetuning/finetuned_regressor.py415 def _setup_estimator(self) -> None:CODE
LOWsrc/tabpfn/finetuning/finetuned_regressor.py424 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.py439 def _setup_estimator(self) -> None:CODE
LOWsrc/tabpfn/finetuning/finetuned_base.py444 def _setup_batch(self, batch: ClassifierBatch | RegressorBatch) -> None:CODE
LOWsrc/tabpfn/finetuning/finetuned_classifier.py27logger = logging.getLogger(__name__)CODE
LOWsrc/tabpfn/finetuning/finetuned_classifier.py221 def _setup_estimator(self) -> None:CODE
LOWsrc/tabpfn/finetuning/finetuned_classifier.py228 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.py725__all__ = [CODE
LOW…reprocessing/steps/encode_categorical_features_step.py455__all__ = [CODE
LOW…c/tabpfn/preprocessing/steps/safe_power_transformer.py207__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 Nesting25 hits · 23 pts
SeverityFileLineSnippetContext
LOW…reprocessing/test_reshape_feature_distribution_step.py335CODE
LOWtests/test_preprocessing/test_ensemble.py824CODE
LOWsrc/tabpfn/classifier.py523CODE
LOWsrc/tabpfn/classifier.py1618CODE
LOWsrc/tabpfn/model_loading.py198CODE
LOWsrc/tabpfn/model_loading.py225CODE
LOWsrc/tabpfn/model_loading.py318CODE
LOWsrc/tabpfn/model_loading.py607CODE
LOWsrc/tabpfn/utils.py271CODE
LOWsrc/tabpfn/regressor.py510CODE
LOWsrc/tabpfn/regressor.py1294CODE
LOWsrc/tabpfn/misc/debug_versions.py188CODE
LOWsrc/tabpfn/misc/debug_versions.py269CODE
LOWsrc/tabpfn/misc/debug_versions.py347CODE
LOWsrc/tabpfn/architectures/tabpfn_v2_6.py696CODE
LOWsrc/tabpfn/architectures/interface.py43CODE
LOWsrc/tabpfn/architectures/tabpfn_v3.py1732CODE
LOWsrc/tabpfn/architectures/tabpfn_v3.py2121CODE
LOWsrc/tabpfn/architectures/tabpfn_v2_5.py698CODE
LOWsrc/tabpfn/architectures/tabpfn_v2.py794CODE
LOWsrc/tabpfn/finetuning/finetuned_base.py607CODE
LOWsrc/tabpfn/preprocessing/clean.py104CODE
LOW…eprocessing/steps/reshape_feature_distribution_step.py188CODE
LOW…eprocessing/steps/reshape_feature_distribution_step.py265CODE
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
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.py1187 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.py263 """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.py116 # 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
Excessive Try-Catch Wrapping15 hits · 16 pts
SeverityFileLineSnippetContext
LOWtests/test_preprocessing/test_pipeline_consistency.py413 except Exception as e:CODE
MEDIUMexamples/sagemaker.py348 print(f"Error parsing JSON response: {e}")CODE
LOWsrc/tabpfn/classifier.py773 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.py301 except Exception as e: # noqa: BLE001CODE
LOWsrc/tabpfn/model_loading.py361 except Exception: # noqa: BLE001CODE
LOWsrc/tabpfn/model_loading.py366 except Exception as e: # noqa: BLE001CODE
LOWsrc/tabpfn/model_loading.py513 except Exception as e: # noqa: BLE001CODE
LOWsrc/tabpfn/model_loading.py524 except Exception as e: # noqa: BLE001CODE
LOWsrc/tabpfn/model_loading.py552 except Exception as e: # noqa: BLE001CODE
LOWsrc/tabpfn/preprocessing/steps/kdi_transformer.py161 except Exception: # noqa: BLE001CODE
Over-Commented Block9 hits · 9 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/claude-code-review.yml81 # "Enable debug logging" ticked. We normally keep this off to avoid writingCOMMENT
LOW.github/workflows/assign-pr-reviewer.yml1# When a PR is opened from a fork or by dependabot, request a review from a randomlyCOMMENT
LOWsrc/tabpfn/classifier.py1041 f"not supported); got train shapes {sorted(train_shapes)} and test "COMMENT
LOWsrc/tabpfn/misc/_sklearn_compat.py1001COMMENT
LOWsrc/tabpfn/preprocessing/clean.py141 isinstance(col, (int, np.integer)) for col in X.columns.tolist()COMMENT
AI Structural Patterns9 hits · 7 pts
SeverityFileLineSnippetContext
LOWsrc/tabpfn/classifier.py209CODE
LOWsrc/tabpfn/regressor.py220CODE
LOWsrc/tabpfn/misc/_sklearn_compat.py448CODE
LOWsrc/tabpfn/misc/_sklearn_compat.py502CODE
LOWsrc/tabpfn/architectures/tabpfn_v3.py1732CODE
LOWsrc/tabpfn/finetuning/finetuned_regressor.py313CODE
LOWsrc/tabpfn/finetuning/finetuned_base.py299CODE
LOWsrc/tabpfn/finetuning/finetuned_classifier.py131CODE
LOWsrc/tabpfn/preprocessing/ensemble.py88CODE
Redundant / Tautological Comments3 hits · 4 pts
SeverityFileLineSnippetContext
LOWsrc/tabpfn/model_loading.py308 # Check if this is an authentication/gating errorCOMMENT
LOWsrc/tabpfn/utils.py203 # Check if the function is available in torchCOMMENT
LOWsrc/tabpfn/preprocessing/steps/preprocessing_helpers.py56 # Check if there is a single transformer, of subtype OneToOneFeatureMixinCOMMENT
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.py1420 # 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.py1420 # Step 3: Validate that columns are in the same order across all batches.COMMENT