AI Slop Code RIsk Monitor

mlfoundations/open_clip

An open source implementation of CLIP.

26.6 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for mlfoundations/open_clip, a Python project with 14,189 GitHub stars. SynthScan examined 50,737 lines of code across 368 source files, recording 1005 pattern matches distributed across 16 syntactic categories. The legacy adjusted pattern signal is 26.6 (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.

26.6
Adjusted Signal
26.6
Raw Pattern Score
100%
Time Factor
2026-09-30
Last Push
14.2K
Stars
Python
Language
50.7K
Lines of Code
368
Files
1.0K
Pattern Hits
2026-10-12
Scan Date
0.04
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 54.2/100 · HIGH

Can maintainers explain intent, assumptions, and trade-offs? 740 finding(s).

Hallucinated Dependency & Supply Chain Risk 9.5/100 · LOW

Are imports declared and package/API names verified? 127 finding(s).

Agent Over-Engineering Ratio 66.8/100 · HIGH

Are wrappers, guards, and repeated structures necessary? 791 finding(s).

PR Review Velocity Impact 72.2/100 · HIGH

Which changes need focused human review? 1005 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

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.

Severity Breakdown

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.

CRITICAL 0HIGH 16MEDIUM 107LOW 882

Directory Score Breakdown

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.

Pattern Findings

The scanner identified 1005 distinct pattern matches across 16 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.

Hyper-Verbose Identifiers613 hits · 627 pts
SeverityFileLineSnippetContext
LOWtests/test_audio_zero_shot.py87def test_hf_audio_dataset_wrapper_and_classnames():CODE
LOWtests/test_audio_zero_shot.py101def test_hf_audio_dataset_wrapper_accepts_decoder_like_audio():CODE
LOWtests/test_audio_zero_shot.py116def test_build_hf_audio_zero_shot_dataset_defaults_to_no_workers(monkeypatch):CODE
LOWtests/test_audio_zero_shot.py152def test_build_hf_audio_zero_shot_dataset_sets_worker_context(monkeypatch):CODE
LOWtests/test_audio_zero_shot.py189def test_run_audio_zero_shot_classifier():CODE
LOWtests/test_audio_zero_shot.py219def test_audio_zero_shot_template_validation():CODE
LOWtests/test_audio_zero_shot.py229def test_run_audio_zero_shot_classifier_uses_bare_model_dummy_audio(monkeypatch):CODE
LOWtests/test_hf_model.py21def test_max_pooler_ignores_padding():CODE
LOWtests/test_hf_model.py29def test_modernbert_hf_text_encoder_supported():CODE
LOWtests/test_hf_model.py55def test_modernbert_does_not_request_hf_pooling_layer():CODE
LOWtests/test_hf_model.py63def test_hf_text_encoder_ignores_config_pinned_dtype():CODE
LOWtests/test_hf_model.py90def test_pretrained_text_encoder(model_id):CODE
LOW⚡tests/test_naflex_timm_conversion.py298def test_naflex_patch_interp_requires_naflex_timm_tower():CODE
LOW⚡tests/test_naflex_timm_conversion.py303def test_force_naflex_vision_rejects_non_vit_model():CODE
LOW⚡tests/test_naflex_timm_conversion.py312def test_parse_use_naflex_enables_timm_naflex_aug_cfg():CODE
LOW⚡tests/test_naflex_timm_conversion.py321def test_parse_naflex_patch_interp_auto_enables_for_multiple_patch_sizes():CODE
LOW⚡tests/test_naflex_timm_conversion.py328def test_parse_force_naflex_vision_does_not_enable_naflex_data_pipeline():CODE
LOW⚡tests/test_naflex_timm_conversion.py337def test_naflex_data_config_defaults_to_model_patch_size():CODE
LOWtests/test_naflex_timm_conversion.py53def _tiny_native_vit_clip_config():CODE
LOWtests/test_naflex_timm_conversion.py74def _tiny_native_vit_quickgelu_clip_config():CODE
LOWtests/test_naflex_timm_conversion.py119def _write_tiny_big_vision_npz(path):CODE
LOWtests/test_naflex_timm_conversion.py186def test_force_naflex_vision_passes_use_naflex_to_timm(monkeypatch):CODE
LOWtests/test_naflex_timm_conversion.py228def test_force_naflex_vision_accepts_timm_models_by_module_membership():CODE
LOWtests/test_naflex_timm_conversion.py235def test_force_naflex_vision_configures_pe_core_timm_tower():CODE
LOWtests/test_naflex_timm_conversion.py255def test_force_naflex_vision_converts_native_vit_config():CODE
LOWtests/test_naflex_timm_conversion.py278def test_naflex_vision_config_preserves_declared_patch_interpolator():CODE
LOWtests/test_naflex_timm_conversion.py358def test_naflex_model_patch_info_handles_adapter_and_interpolating_timm_tower():CODE
LOWtests/test_naflex_timm_conversion.py392def test_naflex_data_config_fails_fast_for_fixed_patch_adapter():CODE
LOWtests/test_naflex_timm_conversion.py482def test_naflex_non_base_eval_and_checkpoint_round_trip(monkeypatch, tmp_path):CODE
LOWtests/test_naflex_timm_conversion.py533def test_naflex_patch_interp_off_by_default(monkeypatch):CODE
LOWtests/test_naflex_timm_conversion.py565def test_prewarm_naflex_patch_interpolator(monkeypatch):CODE
LOWtests/test_naflex_timm_conversion.py643def test_convert_naflex_timm_state_dict_maps_patch_embed_weight():CODE
LOWtests/test_naflex_timm_conversion.py672def test_convert_naflex_native_vit_state_dict_folds_class_pos_embed():CODE
LOWtests/test_naflex_timm_conversion.py712def test_force_naflex_native_vit_dense_output_matches_native(monkeypatch, config_fn):CODE
LOW⚡tests/test_task_specific_unit.py84def test_clip_task_loss_aggregation():CODE
LOW⚡tests/test_task_specific_unit.py94def test_clip_task_logit_scale_in_report():CODE
LOW⚡tests/test_task_specific_unit.py108def test_coca_build_loss_inputs_autoregressive_shift():CODE
LOWtests/test_task_specific_unit.py132def test_coca_training_forward_produces_loss():CODE
LOWtests/test_task_specific_unit.py142def test_coca_compute_accum_loss_concatenates_batches():CODE
LOW⚡tests/test_task_specific_unit.py175def test_distill_teacher_frozen():CODE
LOW⚡tests/test_task_specific_unit.py184def test_distill_teacher_stays_eval():CODE
LOW⚡tests/test_task_specific_unit.py193def test_distill_training_forward_prefixes_teacher_outputs():CODE
LOWtests/test_task_specific_unit.py215def test_distill_teacher_no_grad():CODE
LOWtests/test_audio_model_configs.py10def test_clap_htsat_tiny_config_instantiates_with_audio_deps():CODE
LOWtests/test_context_masking.py26def test_mammut_decoder_context_padding_invariant(model_name):CODE
LOWtests/test_context_masking.py50def test_coca_decoder_context_padding_invariant(model_name):CODE
LOWtests/test_context_masking.py70def test_context_masking_all_invalid_row_no_nan():CODE
LOWtests/test_context_masking.py83def test_context_attn_mask_from_valid():CODE
LOW⚡tests/test_clap_task.py78def test_clap_task_training_forward_returns_loss():CODE
LOW⚡tests/test_clap_task.py87def test_clap_task_eval_forward_keeps_audio_features_key():CODE
LOW⚡tests/test_clap_task.py95def test_clap_task_eval_forward_accepts_text_kwargs():CODE
LOW⚡tests/test_clap_task.py103def test_clap_task_dummy_batch_and_batch_size():CODE
LOWtests/test_clap_task.py114def test_clap_task_accum_loss_maps_audio_features_to_clip_loss():CODE
LOWtests/test_clap_task.py125def test_create_task_dispatches_clap(monkeypatch):CODE
LOWtests/test_clap_task.py151def test_factory_dispatches_audio_config_to_clap(tmp_path, monkeypatch):CODE
LOWtests/test_clap_task.py191def test_evaluate_uses_task_primary_key_for_audio():CODE
LOWtests/test_clap_task.py221def test_audio_checkpoint_retries_only_weights_only_payload_errors(monkeypatch):CODE
LOWtests/test_clap_task.py237def test_audio_checkpoint_does_not_retry_unrelated_unpickle_errors(monkeypatch):CODE
LOWtests/test_naflex_audio.py45def test_mel_to_patches_pads_time_remainder_not_truncated():CODE
LOWtests/test_naflex_audio.py57def test_mel_to_patches_subpatch_clip_yields_one_valid_patch():CODE
553 more matches not shown…
Decorative Section Separators90 hits · 354 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_task_specific_unit.py14# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_task_specific_unit.py16# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_task_specific_unit.py79# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_task_specific_unit.py81# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_task_specific_unit.py103# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_task_specific_unit.py105# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_task_specific_unit.py170# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_task_specific_unit.py172# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_naflex_genlip.py35# ---------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_naflex_genlip.py37# ---------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_naflex_genlip.py90# ---------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_naflex_genlip.py92# ---------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_naflex_genlip.py130# ---------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_naflex_genlip.py132# ---------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_naflex_genlip.py175# ---------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_naflex_genlip.py177# ---------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_naflex_genlip.py186# ---------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_naflex_genlip.py188# ---------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_model_traits.py35# ---------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_model_traits.py37# ---------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_model_traits.py75# ---------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_model_traits.py77# ---------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_model_traits.py236# ---------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_model_traits.py238# ---------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_model_traits.py103# ---------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_model_traits.py105# ---------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_data_csv.py30# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_data_csv.py32# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_data_csv.py80# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_data_csv.py82# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_task_fsdp_unit.py18# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_task_fsdp_unit.py20# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_task_fsdp_unit.py51# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_task_fsdp_unit.py53# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_task_fsdp_unit.py78# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_task_fsdp_unit.py80# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_task_fsdp_unit.py90# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_task_fsdp_unit.py92# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_task_fsdp_unit.py163# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_task_fsdp_unit.py165# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_task_fsdp_unit.py187# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_task_fsdp_unit.py189# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_modern_text.py107# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_modern_text.py109# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_modern_text.py429# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_modern_text.py431# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_modern_text.py480# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_modern_text.py482# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_modern_text.py674# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_modern_text.py676# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_task_checkpoint.py222# ──────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/test_task_checkpoint.py224# ──────────────────────────────────────────────────────────────────────COMMENT
MEDIUM⚡tests/test_task_base_unit.py60# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_task_base_unit.py62# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_task_base_unit.py106# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_task_base_unit.py108# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_task_base_unit.py166# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_task_base_unit.py168# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_task_base_unit.py231# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_task_base_unit.py233# ---------------------------------------------------------------------------COMMENT
30 more matches not shown…
Unused Imports126 hits · 96 pts
SeverityFileLineSnippetContext
LOWtests/test_legacy_data.py6CODE
LOWtests/test_legacy_data.py8CODE
LOWtests/test_model_traits.py30CODE
LOWtests/test_audio_wds.py20CODE
LOWtests/test_optim_layer_decay.py8CODE
LOWtests/test_optim_layer_decay.py8CODE
LOWtests/test_task_checkpoint.py12CODE
LOWtests/test_naflex_mammut.py12CODE
LOWtests/test_naflex_mammut.py14CODE
LOWscripts/genlip_zeroshot.py29CODE
LOWsrc/open_clip/pretrained.py7CODE
LOWsrc/open_clip/pretrained.py13CODE
LOWsrc/open_clip/hf_model.py14CODE
LOWsrc/open_clip/__init__.py1CODE
LOWsrc/open_clip/__init__.py3CODE
LOWsrc/open_clip/__init__.py4CODE
LOWsrc/open_clip/__init__.py5CODE
LOWsrc/open_clip/__init__.py6CODE
LOWsrc/open_clip/__init__.py7CODE
LOWsrc/open_clip/__init__.py7CODE
LOWsrc/open_clip/__init__.py8CODE
LOWsrc/open_clip/__init__.py8CODE
LOWsrc/open_clip/__init__.py8CODE
LOWsrc/open_clip/__init__.py8CODE
LOWsrc/open_clip/__init__.py8CODE
LOWsrc/open_clip/__init__.py8CODE
LOWsrc/open_clip/__init__.py16CODE
LOWsrc/open_clip/__init__.py16CODE
LOWsrc/open_clip/__init__.py16CODE
LOWsrc/open_clip/__init__.py16CODE
LOWsrc/open_clip/__init__.py17CODE
LOWsrc/open_clip/__init__.py17CODE
LOWsrc/open_clip/__init__.py17CODE
LOWsrc/open_clip/__init__.py17CODE
LOWsrc/open_clip/__init__.py17CODE
LOWsrc/open_clip/__init__.py18CODE
LOWsrc/open_clip/__init__.py18CODE
LOWsrc/open_clip/__init__.py18CODE
LOWsrc/open_clip/__init__.py18CODE
LOWsrc/open_clip/__init__.py19CODE
LOWsrc/open_clip/__init__.py19CODE
LOWsrc/open_clip/__init__.py19CODE
LOWsrc/open_clip/__init__.py19CODE
LOWsrc/open_clip/__init__.py19CODE
LOWsrc/open_clip/__init__.py19CODE
LOWsrc/open_clip/__init__.py19CODE
LOWsrc/open_clip/__init__.py19CODE
LOWsrc/open_clip/__init__.py19CODE
LOWsrc/open_clip/__init__.py30CODE
LOWsrc/open_clip/__init__.py31CODE
LOWsrc/open_clip/__init__.py31CODE
LOWsrc/open_clip/__init__.py31CODE
LOWsrc/open_clip/__init__.py31CODE
LOWsrc/open_clip/__init__.py31CODE
LOWsrc/open_clip/__init__.py31CODE
LOWsrc/open_clip/__init__.py31CODE
LOWsrc/open_clip/__init__.py31CODE
LOWsrc/open_clip/__init__.py31CODE
LOWsrc/open_clip/__init__.py31CODE
LOWsrc/open_clip/__init__.py31CODE
66 more matches not shown…
Deep Nesting56 hits · 54 pts
SeverityFileLineSnippetContext
LOWtests/test_factory_loss.py25CODE
LOWscripts/linear_probe_data.py222CODE
LOWscripts/linear_probe_data.py113CODE
LOWscripts/multilabel_zeroshot.py470CODE
LOWscripts/linear_probe.py444CODE
LOWscripts/genlip_caption_stats.py51CODE
LOWscripts/genlip_caption_stats.py90CODE
LOWsrc/open_clip/zero_shot_classifier.py78CODE
LOWsrc/open_clip/pretrained.py818CODE
LOWsrc/open_clip/hf_model.py109CODE
LOWsrc/open_clip/hf_model.py263CODE
LOWsrc/open_clip/convert.py13CODE
LOWsrc/open_clip/convert.py21CODE
LOWsrc/open_clip/push_to_hf_hub.py258CODE
LOWsrc/open_clip/factory.py97CODE
LOWsrc/open_clip/factory.py326CODE
LOWsrc/open_clip/factory.py850CODE
LOWsrc/open_clip/factory.py1142CODE
LOWsrc/open_clip/model.py193CODE
LOWsrc/open_clip/model.py516CODE
LOWsrc/open_clip/tokenizer.py222CODE
LOWsrc/open_clip/tokenizer.py610CODE
LOWsrc/open_clip/tokenizer.py750CODE
LOWsrc/open_clip/tokenizer.py1236CODE
LOWsrc/open_clip/loss.py488CODE
LOWsrc/open_clip/utils.py93CODE
LOWsrc/open_clip/utils.py116CODE
LOWsrc/open_clip/transformer.py913CODE
LOWsrc/open_clip/transformer.py176CODE
LOWsrc/open_clip/transform.py373CODE
LOWsrc/open_clip/naflex_genlip_model.py605CODE
LOWsrc/open_clip/naflex_genlip_model.py607CODE
LOWsrc/open_clip/audio/convert.py76CODE
LOWsrc/open_clip/audio/whisper.py379CODE
LOWsrc/open_clip/audio/htsat.py1158CODE
LOWsrc/open_clip/audio/htsat.py104CODE
LOWsrc/open_clip/audio/htsat.py741CODE
LOWsrc/open_clip/audio/htsat.py1032CODE
LOWsrc/open_clip/audio/transform.py127CODE
LOWsrc/open_clip/task/base_task.py99CODE
LOWsrc/open_clip/task/base_task.py417CODE
LOWsrc/open_clip_train/legacy_train.py42CODE
LOWsrc/open_clip_train/legacy_train.py229CODE
LOWsrc/open_clip_train/legacy_main.py49CODE
LOWsrc/open_clip_train/distributed.py23CODE
LOWsrc/open_clip_train/naflex_data.py1013CODE
LOWsrc/open_clip_train/train.py180CODE
LOWsrc/open_clip_train/train.py296CODE
LOWsrc/open_clip_train/train.py499CODE
LOWsrc/open_clip_train/file_utils.py100CODE
LOWsrc/open_clip_train/main.py62CODE
LOWsrc/open_clip_train/profiler.py131CODE
LOWsrc/open_clip_train/eval_utils.py37CODE
LOWsrc/open_clip_train/optim.py78CODE
LOWsrc/open_clip_train/data.py760CODE
LOWsrc/open_clip_train/data.py1177CODE
Empty Error Handlers9 hits · 45 pts
SeverityFileLineSnippetContext
HIGHsrc/open_clip/pretrained.py906except Exception:CODE
HIGHsrc/open_clip/tokenizer.py97except ValueError:CODE
HIGHsrc/open_clip/tokenizer.py1213except KeyError:CODE
HIGHsrc/open_clip/task/base_task.py251except ImportError:CODE
HIGHsrc/open_clip_train/naflex_data.py465except queue.Empty:CODE
HIGHsrc/open_clip_train/profiler.py207except RuntimeError as e:CODE
HIGHsrc/open_clip_train/optim.py117except Exception: # a submodule's hook may assume context we don't have; skip it rather than failCODE
HIGHsrc/open_clip_train/optim.py124except Exception:CODE
HIGHsrc/open_clip_train/optim.py131except Exception:CODE
AI Structural Patterns40 hits · 38 pts
SeverityFileLineSnippetContext
LOWtests/util_test.py159CODE
LOWsrc/open_clip/coca_model.py72CODE
LOWsrc/open_clip/coca_model.py298CODE
LOWsrc/open_clip/coca_model.py380CODE
LOWsrc/open_clip/generation.py389CODE
LOWsrc/open_clip/push_to_hf_hub.py205CODE
LOWsrc/open_clip/modified_resnet.py56CODE
LOWsrc/open_clip/mammut_model.py202CODE
LOWsrc/open_clip/factory.py326CODE
LOWsrc/open_clip/factory.py1062CODE
LOWsrc/open_clip/factory.py1251CODE
LOWsrc/open_clip/factory.py1393CODE
LOWsrc/open_clip/model.py516CODE
LOWsrc/open_clip/model.py684CODE
LOWsrc/open_clip/loss.py145CODE
LOWsrc/open_clip/transformer.py81CODE
LOWsrc/open_clip/transformer.py295CODE
LOWsrc/open_clip/transformer.py361CODE
LOWsrc/open_clip/transformer.py413CODE
LOWsrc/open_clip/transformer.py552CODE
LOWsrc/open_clip/transformer.py1109CODE
LOWsrc/open_clip/transformer.py1190CODE
LOWsrc/open_clip/transformer.py1759CODE
LOWsrc/open_clip/transformer.py2268CODE
LOWsrc/open_clip/naflex_config.py31CODE
LOWsrc/open_clip/timm_model.py29CODE
LOWsrc/open_clip/audio/htsat.py38CODE
LOWsrc/open_clip/audio/htsat.py87CODE
LOWsrc/open_clip/audio/htsat.py104CODE
LOWsrc/open_clip/audio/htsat.py449CODE
LOWsrc/open_clip/audio/htsat.py641CODE
LOWsrc/open_clip/audio/htsat.py741CODE
LOWsrc/open_clip/task/coca_task.py21CODE
LOWsrc/open_clip/task/genlip_task.py29CODE
LOWsrc/open_clip/task/clip_task.py12CODE
LOWsrc/open_clip/task/clap_task.py18CODE
LOWsrc/open_clip/task/distill_task.py12CODE
LOWsrc/open_clip_train/naflex_data.py549CODE
LOWsrc/open_clip_train/naflex_data.py925CODE
LOWsrc/open_clip_train/naflex_data.py1060CODE
Excessive Try-Catch Wrapping33 hits · 38 pts
SeverityFileLineSnippetContext
LOW⚡tests/test_model_traits.py31except Exception: # pragma: no cover - environment dependentCODE
MEDIUMtests/test_optim_layer_decay.py451def _build_clap_htsat():CODE
LOWtests/test_optim_layer_decay.py146 except Exception as e: # offline / hub unavailableCODE
LOWtests/test_optim_layer_decay.py454 except Exception as e: # optional deps / config issuesCODE
LOWtests/test_optim_layer_decay.py518 except Exception as e: # nadamuon may be absent in older timmCODE
LOWsrc/open_clip/coca_model.py96 except Exception as e:CODE
MEDIUMsrc/open_clip/coca_model.py72def generate(CODE
LOWsrc/open_clip/pretrained.py906 except Exception:CODE
LOWsrc/open_clip/pretrained.py918 except Exception as e:CODE
LOWsrc/open_clip/push_to_hf_hub.py166 except Exception as e:CODE
LOWsrc/open_clip/factory.py442 except Exception as e:CODE
LOWsrc/open_clip/factory.py466 except Exception as e_weights:CODE
LOWsrc/open_clip/factory.py469 except Exception as e_config:CODE
LOWsrc/open_clip/factory.py497 except Exception as e:CODE
LOWsrc/open_clip/factory.py685 except Exception as e:CODE
LOWsrc/open_clip/factory.py713 except Exception as e:CODE
LOWsrc/open_clip/factory.py735 except Exception as e:CODE
LOWsrc/open_clip/factory.py890 except Exception as e:CODE
LOWsrc/open_clip/factory.py906 except Exception as e:CODE
LOWsrc/open_clip/tokenizer.py327 except Exception:CODE
LOWsrc/open_clip/timm_model.py181 except Exception as e:CODE
LOWsrc/open_clip/audio/whisper.py430 except Exception as e:CODE
LOWsrc/open_clip/audio/htsat.py1205 except Exception as exc:STRING
MEDIUMsrc/open_clip/audio/htsat.py1158def create_htsat_model(audio_cfg, enable_fusion=False, fusion_type="None"):CODE
LOWsrc/open_clip_train/naflex_data.py388 except Exception:CODE
LOWsrc/open_clip_train/naflex_data.py860 except Exception as ex:CODE
LOWsrc/open_clip_train/file_utils.py41 except Exception as e:CODE
LOWsrc/open_clip_train/profiler.py229 except Exception as e:CODE
MEDIUMsrc/open_clip_train/profiler.py230 print(f'Error profiling {m}: {e}')CODE
LOW⚡src/open_clip_train/optim.py117 except Exception: # a submodule's hook may assume context we don't have; skip it rather than failCODE
LOW⚡src/open_clip_train/optim.py124 except Exception:CODE
LOW⚡src/open_clip_train/optim.py131 except Exception:CODE
LOWsrc/open_clip_train/data.py84 except Exception as exn:CODE
Modern AI Meta-Vocabulary8 hits · 22 pts
SeverityFileLineSnippetContext
MEDIUMREADME.md78| Model | Training data | Resolution | # of samples seen | ImageNet zero-shot acc. |CODE
MEDIUMREADME.md539### Evaluating hosted pretrained checkpoint on ImageNet zero-shot prediction:COMMENT
MEDIUMREADME.md548### Evaluating CLAP audio models on zero-shot audio classification:COMMENT
MEDIUMtests/test_eval_task.py29 zeroshot_frequency=0, # disable zero-shot to keep test fastCODE
MEDIUMscripts/multilabel_zeroshot.py351 # OpenCLIP's zero-shot classifier. This is an ensemble heuristic, not calibration.COMMENT
MEDIUMsrc/open_clip/audio/config.py31 # Eval-time audio-token CAP for NaFlexClap zero-shot (mirror of vision_cfg.image_seq_len). Audio isCOMMENT
MEDIUMsrc/open_clip/task/checkpoint.py186 # Build empty DTensor scaffolding, then let DCP fill itCOMMENT
MEDIUMsrc/open_clip_train/zero_shot.py51 # tower (generative VLMs such as GenLIP): the text-classifier zero-shot path requires encode_text.COMMENT
Docstring Block Structure3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHsrc/open_clip/factory.py155 Parses a model name string to identify a schema and the remaining identifier. Args: model_name: The moSTRING
HIGHsrc/open_clip/factory.py1414 Creates a contrastive vision-language model from pretrained weights with optional preprocessing transform. ThiSTRING
HIGHsrc/open_clip_train/optim.py257Build optimizer param groups with layer-wise LR decay applied to the text / image / audio tower(s). Each decayed toSTRING
Cross-File Repetition3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHsrc/open_clip/modified_resnet.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if noneSTRING
HIGHsrc/open_clip/transformer.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if noneSTRING
HIGHsrc/open_clip/timm_model.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if noneSTRING
AI Slop Vocabulary4 hits · 14 pts
SeverityFileLineSnippetContext
MEDIUM⚡tests/test_optim_layer_decay.py374# ---- robust weight-decay exclusion filter ----COMMENT
MEDIUMsrc/open_clip/factory.py756 # Absolutely no weights were loaded from any sourceCOMMENT
MEDIUMsrc/open_clip/tokenizer.py759 # adding lower (for case-sensitive tokenizers) will make it more robust but less sensitive to nuanceCOMMENT
MEDIUMsrc/open_clip/tokenizer.py996 # adding lower (for case-sensitive tokenizers) will make it more robust but less sensitive to nuanceCOMMENT
Redundant / Tautological Comments8 hits · 12 pts
SeverityFileLineSnippetContext
LOWsrc/open_clip/push_to_hf_hub.py159 # Check if repo already exists and determine what needs updatingCOMMENT
LOWsrc/open_clip/factory.py239 # Check if safetensors or not and load weights accordinglyCOMMENT
LOWsrc/open_clip/factory.py427 # Check if the required 'model_cfg' key is presentCOMMENT
LOWsrc/open_clip/factory.py489 # Check if `pretrained` is a known tagCOMMENT
LOWsrc/open_clip/factory.py674 # Check if model has the 'visual' attributeCOMMENT
LOWsrc/open_clip/factory.py920 # Check if config determination failed completely (should only be possible if initial schema parsing failed badly)COMMENT
LOWsrc/open_clip/timm_model.py246 # Check if the underlying timm model has set_input_size methodCOMMENT
LOWsrc/open_clip_train/distributed.py134 # Check if init_process_group supports device_id (added in PyTorch ~2.4).COMMENT
Over-Commented Block7 hits · 7 pts
SeverityFileLineSnippetContext
LOWsrc/open_clip/pos_embed.py1# Copyright (c) Meta Platforms, Inc. and affiliates.COMMENT
LOWsrc/open_clip/tokenizer.py641 self.clean_fn = get_clean_fn(clean)COMMENT
LOWsrc/open_clip/tokenizer.py661 # repo_id = '/'.join(parts[:-1])COMMENT
LOWsrc/open_clip/transformer.py721 # Freeze the tower top-down via the shared ``layer_groups`` enumeration: ``unlocked_groups`` counts the topCOMMENT
LOWsrc/open_clip/audio/htsat.py1121 # output_dict = self.forward_features(x)COMMENT
LOWsrc/open_clip/audio/htsat.py1141 # framewise_output += d["framewise_output"]COMMENT
LOWsrc/open_clip_train/data.py41 # they survive pickling — required under forkserver multiprocessingCOMMENT
Cross-Language Confusion1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHscripts/genlip_zeroshot.py212 scores = scores - uncond # PMI: log P(cap|img) - log P(cap|null)CODE
Modern Structural Boilerplate3 hits · 3 pts
SeverityFileLineSnippetContext
LOWsrc/open_clip/model_traits.py39__all__ = [CODE
LOWsrc/open_clip/audio/__init__.py30__all__ = [CODE
LOWsrc/open_clip_train/naflex_data.py31__all__ = [CODE
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMsrc/open_clip_train/data.py196 # Create the shared counter in the SAME multiprocessing context as the DataLoader workers. A fork-contextCOMMENT