AI Slop Code RIsk Monitor

ludwig-ai/ludwig

Low-code framework for building custom LLMs, neural networks, and other AI models

26.3 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for ludwig-ai/ludwig, a Python project with 11,772 GitHub stars. SynthScan examined 231,196 lines of code across 1632 source files, recording 3663 pattern matches distributed across 22 syntactic categories. The legacy adjusted pattern signal is 26.3 (Elevated pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

26.3
Adjusted Signal
26.3
Raw Pattern Score
100%
Time Factor
2026-10-05
Last Push
11.8K
Stars
Python
Language
231.2K
Lines of Code
1.6K
Files
3.7K
Pattern Hits
2026-10-12
Scan Date
0.07
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 40.1/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 9.3/100 · LOW

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

Agent Over-Engineering Ratio 65.5/100 · HIGH

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

PR Review Velocity Impact 72.2/100 · HIGH

Which changes need focused human review? 3663 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 120MEDIUM 824LOW 2719

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 3663 distinct pattern matches across 22 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.

Decorative Section Separators767 hits · 2580 pts
SeverityFileLineSnippetContext
MEDIUMludwig/experiment_utils.py14# ==============================================================================COMMENT
MEDIUMludwig/api_types.py14# ==============================================================================COMMENT
MEDIUM⚡ludwig/collect.py269 # ----------------COMMENT
MEDIUM⚡ludwig/collect.py271 # ----------------COMMENT
MEDIUM⚡ludwig/collect.py275 # -------------------------COMMENT
MEDIUM⚡ludwig/collect.py277 # -------------------------COMMENT
MEDIUM⚡ludwig/collect.py282 # ------------------COMMENT
MEDIUM⚡ludwig/collect.py284 # ------------------COMMENT
MEDIUM⚡ludwig/collect.py287 # ------------------COMMENT
MEDIUM⚡ludwig/collect.py289 # ------------------COMMENT
MEDIUM⚡ludwig/collect.py351 # ----------------COMMENT
MEDIUM⚡ludwig/collect.py353 # ----------------COMMENT
MEDIUM⚡ludwig/collect.py357 # -------------------------COMMENT
MEDIUM⚡ludwig/collect.py359 # -------------------------COMMENT
MEDIUM⚡ludwig/collect.py364 # ------------------COMMENT
MEDIUM⚡ludwig/collect.py366 # ------------------COMMENT
MEDIUM⚡ludwig/collect.py407 # ----------------COMMENT
MEDIUM⚡ludwig/collect.py409 # ----------------COMMENT
MEDIUM⚡ludwig/collect.py415 # ------------------COMMENT
MEDIUM⚡ludwig/collect.py417 # ------------------COMMENT
MEDIUMludwig/collect.py15# ==============================================================================COMMENT
MEDIUMludwig/collect.py235 # ---------------COMMENT
MEDIUMludwig/collect.py237 # ---------------COMMENT
MEDIUMludwig/contrib.py14# ==============================================================================COMMENT
MEDIUMludwig/forecast.py68 # ---------------COMMENT
MEDIUMludwig/forecast.py70 # ---------------COMMENT
MEDIUM⚡ludwig/forecast.py96 # ----------------COMMENT
MEDIUM⚡ludwig/forecast.py98 # ----------------COMMENT
MEDIUM⚡ludwig/forecast.py101 # -------------------------COMMENT
MEDIUM⚡ludwig/forecast.py103 # -------------------------COMMENT
MEDIUMludwig/hyperopt_cli.py15# ==============================================================================COMMENT
MEDIUM⚡ludwig/hyperopt_cli.py150 # -------------------COMMENT
MEDIUM⚡ludwig/hyperopt_cli.py152 # -------------------COMMENT
MEDIUM⚡ludwig/hyperopt_cli.py161 # ----------------------------COMMENT
MEDIUM⚡ludwig/hyperopt_cli.py163 # ----------------------------COMMENT
MEDIUM⚡ludwig/hyperopt_cli.py173 # ---------------COMMENT
MEDIUM⚡ludwig/hyperopt_cli.py175 # ---------------COMMENT
MEDIUMludwig/hyperopt_cli.py226 # ----------------COMMENT
MEDIUMludwig/hyperopt_cli.py228 # ----------------COMMENT
MEDIUMludwig/hyperopt_cli.py300 # ------------------COMMENT
MEDIUMludwig/hyperopt_cli.py302 # ------------------COMMENT
MEDIUMludwig/error.py14# ==============================================================================COMMENT
MEDIUMludwig/upload.py92 # ---------------COMMENT
MEDIUMludwig/upload.py94 # ---------------COMMENT
MEDIUMludwig/upload.py111 # ---------------COMMENT
MEDIUMludwig/upload.py113 # ---------------COMMENT
MEDIUMludwig/preprocess.py15# ==============================================================================COMMENT
MEDIUMludwig/preprocess.py96 # ---------------COMMENT
MEDIUMludwig/preprocess.py98 # ---------------COMMENT
MEDIUMludwig/preprocess.py141 # ----------------COMMENT
MEDIUMludwig/preprocess.py143 # ----------------COMMENT
MEDIUMludwig/preprocess.py166 # ------------------COMMENT
MEDIUMludwig/preprocess.py168 # ------------------COMMENT
MEDIUMludwig/globals.py15# ==============================================================================COMMENT
MEDIUMludwig/constants.py15# ==============================================================================COMMENT
MEDIUMludwig/predict.py15# ==============================================================================COMMENT
MEDIUMludwig/predict.py110 # ---------------COMMENT
MEDIUMludwig/predict.py112 # ---------------COMMENT
MEDIUM⚡ludwig/predict.py141 # ----------------COMMENT
MEDIUM⚡ludwig/predict.py143 # ----------------COMMENT
707 more matches not shown…
Hyper-Verbose Identifiers1518 hits · 1578 pts
SeverityFileLineSnippetContext
LOWludwig/experiment_utils.py61def get_experiment_description(CODE
LOWludwig/contrib.py32def add_contrib_callback_args(parser: argparse.ArgumentParser):CODE
LOWludwig/api.py224 def _initialize_llm_for_zero_shot(self, random_seed: int = default_random_seed):CODE
LOWludwig/api.py710 def _tune_batch_size_and_grad_accum(self, trainer, dataset, random_seed: int = default_random_seed):CODE
LOWludwig/api.py768 def save_dequantized_base_model(self, save_path: str) -> None:CODE
LOWludwig/api.py867 def _generate_streaming_outputs(CODE
LOWludwig/api.py903 def _generate_non_streaming_outputs(CODE
LOWludwig/api.py1772 def _preprocess_for_prediction(CODE
LOWludwig/serve_ray_serve.py43def make_ludwig_deployment_class(num_replicas: int = 1, ray_actor_options: dict | None = None):CODE
LOW⚡ludwig/config_generation.py22def get_ludwig_schema_context() -> str:CODE
LOWludwig/config_sampling/explore_schema.py173def generate_possible_configs(config_options: dict[str, Any]):CODE
LOWludwig/config_sampling/explore_schema.py260def combine_configs_for_comparator_combiner(CODE
LOWludwig/config_sampling/explore_schema.py291def combine_configs_for_sequence_combiner(CODE
LOWludwig/explain/util.py53def get_absolute_module_key_from_submodule(module: torch.nn.Module, submodule: torch.nn.Module):CODE
LOW⚡ludwig/explain/captum.py59def retry_with_halved_batch_size(run_config: ExplanationRunConfig):CODE
LOW⚡ludwig/explain/captum.py69 def retry_with_halved_batch_size_fn(fn):CODE
LOW⚡ludwig/explain/captum.py70 def retry_with_halved_batch_size_wrapper(*args, **kwargs):CODE
LOWludwig/explain/captum_ray.py177def get_total_attribution_task(CODE
LOW⚡ludwig/config_validation/checks.py178def check_class_balance_preprocessing(config: "ModelConfig") -> None:CODE
LOW⚡ludwig/config_validation/checks.py188def check_sampling_exclusivity(config: "ModelConfig") -> None:CODE
LOW⚡ludwig/config_validation/checks.py197def check_validation_metric_exists(config: "ModelConfig") -> None:CODE
LOW⚡ludwig/config_validation/checks.py466def check_llm_finetuning_trainer_config(config: "ModelConfig"):CODE
LOW⚡ludwig/config_validation/checks.py484def check_llm_finetuning_backend_config(config: "ModelConfig"):CODE
LOWludwig/config_validation/checks.py53def get_config_check_registry():CODE
LOWludwig/config_validation/checks.py75def check_feature_names_unique(config: "ModelConfig") -> None:CODE
LOWludwig/config_validation/checks.py88def check_tied_features_valid(config: "ModelConfig") -> None:CODE
LOWludwig/config_validation/checks.py114def check_ray_backend_in_memory_preprocessing(config: "ModelConfig") -> None:CODE
LOWludwig/config_validation/checks.py136def check_sequence_concat_combiner_requirements(config: "ModelConfig") -> None:CODE
LOWludwig/config_validation/checks.py154def check_comparator_combiner_requirements(config: "ModelConfig") -> None:CODE
LOWludwig/config_validation/checks.py224def check_hf_tokenizer_requirements(config: "ModelConfig") -> None:CODE
LOWludwig/config_validation/checks.py237def check_hf_encoder_requirements(config: "ModelConfig") -> None:CODE
LOWludwig/config_validation/checks.py250def check_stacked_transformer_requirements(config: "ModelConfig") -> None:CODE
LOWludwig/config_validation/checks.py274def check_hyperopt_search_algorithm_dependencies_installed(config: "ModelConfig") -> None:CODE
LOWludwig/config_validation/checks.py286def check_hyperopt_scheduler_dependencies_installed(config: "ModelConfig") -> None:CODE
LOWludwig/config_validation/checks.py298def check_tagger_decoder_requirements(config: "ModelConfig") -> None:CODE
LOWludwig/config_validation/checks.py329def check_hyperopt_parameter_dicts(config: "ModelConfig") -> None:CODE
LOWludwig/config_validation/checks.py372def check_concat_combiner_requirements(config: "ModelConfig") -> None:CODE
LOWludwig/config_validation/checks.py403def check_hyperopt_nested_parameter_dicts(config: "ModelConfig") -> None:CODE
LOWludwig/config_validation/checks.py439def check_llm_exactly_one_input_text_feature(config: "ModelConfig"):CODE
LOWludwig/config_validation/checks.py450def check_llm_finetuning_output_feature_config(config: "ModelConfig"):CODE
LOWludwig/config_validation/checks.py511def check_llm_finetuning_adalora_config(config: "ModelConfig"):CODE
LOWludwig/config_validation/checks.py539def check_llm_finetuning_adaption_prompt_parameters(config: "ModelConfig"):CODE
LOWludwig/config_validation/checks.py571def check_llm_quantization_backend_incompatibility(config: "ModelConfig") -> None:CODE
LOWludwig/config_validation/checks.py604def check_llm_text_encoder_is_not_used_with_ecd(config: "ModelConfig") -> None:CODE
LOWludwig/config_validation/checks.py633def check_qlora_merge_and_unload_compatibility(config: "ModelConfig") -> None:CODE
LOWludwig/config_validation/checks.py658def check_prompt_requirements(config: "ModelConfig") -> None:CODE
LOWludwig/config_validation/checks.py720def check_sample_ratio_and_size_compatible(config: "ModelConfig") -> None:CODE
LOWludwig/config_validation/checks.py728def check_grpo_requires_text_output(config: "ModelConfig") -> None:CODE
LOWludwig/config_validation/preprocessing.py1def check_global_max_sequence_length_fits_prompt_template(metadata, global_preprocessing_parameters):CODE
LOWludwig/distributed/__init__.py40def get_current_dist_strategy() -> DistributedStrategy:CODE
LOWludwig/distributed/__init__.py53def get_default_strategy_name() -> str:CODE
LOWludwig/distributed/accelerate.py211 def allow_gradient_accumulation(self) -> bool:CODE
LOWludwig/distributed/accelerate.py234 def extract_model_for_serialization(cls, model):CODE
LOWludwig/distributed/accelerate.py244 def replace_model_from_serialization(cls, state):CODE
LOWludwig/distributed/base.py162 def allow_gradient_accumulation(self) -> bool:CODE
LOWludwig/distributed/base.py191 def extract_model_for_serialization(cls, model: nn.Module) -> nn.Module | tuple[nn.Module, list[dict]]:CODE
LOWludwig/distributed/base.py195 def replace_model_from_serialization(cls, state: nn.Module | tuple[nn.Module, list[dict]]) -> nn.Module:CODE
LOWludwig/callbacks/__init__.py99 def on_hyperopt_preprocessing_start(self, experiment_name: str, **kwargs):CODE
LOWludwig/callbacks/__init__.py106 def on_hyperopt_preprocessing_end(self, experiment_name: str, **kwargs):CODE
LOWludwig/callbacks/__init__.py212 def on_trainer_train_teardown(self, trainer, progress_tracker, save_path: str, is_coordinator: bool, **kwargs):CODE
1458 more matches not shown…
Unused Imports321 hits · 281 pts
SeverityFileLineSnippetContext
LOWludwig/__init__.py18CODE
LOWludwig/types.py9CODE
LOWludwig/serve_ray_serve.py24CODE
LOWludwig/serve_kserve.py18CODE
LOWludwig/config_validation/validation.py13CODE
LOWludwig/config_validation/validation.py14CODE
LOWludwig/config_validation/validation.py14CODE
LOWludwig/config_validation/validation.py15CODE
LOWludwig/config_validation/validation.py16CODE
LOWludwig/config_validation/validation.py16CODE
LOWludwig/config_validation/validation.py26CODE
LOWludwig/distributed/accelerate.py170CODE
LOWludwig/distributed/base.py1CODE
LOWludwig/datasets/__init__.py21CODE
LOWludwig/datasets/__init__.py22CODE
LOWludwig/datasets/loaders/misc_loaders.py3CODE
LOWludwig/datasets/loaders/multilabel_loader.py6CODE
LOWludwig/datasets/loaders/qa_loader.py8CODE
LOWludwig/datasets/loaders/hugging_face.py15CODE
LOWludwig/datasets/loaders/multiple_choice_loader.py9CODE
LOWludwig/datasets/loaders/ner_loader.py8CODE
LOWludwig/datasets/loaders/openml_loader.py15CODE
LOWludwig/datasets/loaders/dataset_loader.py15CODE
LOWludwig/datasets/loaders/vqa_loader.py8CODE
LOWludwig/datasets/loaders/code_loader.py3CODE
LOWludwig/datasets/loaders/translation_loader.py8CODE
LOWludwig/features/transforms.py7CODE
LOWludwig/features/feature_registries.py58CODE
LOWludwig/features/feature_registries.py59CODE
LOWludwig/features/text_feature.py16CODE
LOWludwig/features/timeseries_feature.py37CODE
LOWludwig/contribs/__init__.py49CODE
LOWludwig/contribs/__init__.py59CODE
LOWludwig/contribs/__init__.py69CODE
LOWludwig/combiners/combiners.py27CODE
LOWludwig/combiners/__init__.py2CODE
LOWludwig/combiners/tabpfn_v2_combiner.py20CODE
LOWludwig/combiners/tabpfn_v2_combiner.py64CODE
LOWludwig/utils/dataset_quality.py33CODE
LOWludwig/utils/trainer_utils.py23CODE
LOWludwig/utils/trainer_utils.py24CODE
LOWludwig/utils/hf_utils.py1CODE
LOWludwig/utils/misc_utils.py36CODE
LOWludwig/utils/llm_utils.py1CODE
LOWludwig/utils/checkpoint_utils.py27CODE
LOWludwig/utils/checkpoint_utils.py28CODE
LOWludwig/utils/upload_utils.py1CODE
LOWludwig/utils/entmax/__init__.py3CODE
LOWludwig/utils/entmax/__init__.py3CODE
LOWludwig/utils/entmax/__init__.py3CODE
LOWludwig/utils/entmax/__init__.py3CODE
LOWludwig/utils/entmax/__init__.py4CODE
LOWludwig/utils/entmax/__init__.py4CODE
LOWludwig/utils/entmax/__init__.py4CODE
LOWludwig/utils/entmax/__init__.py4CODE
LOWludwig/utils/entmax/__init__.py4CODE
LOWludwig/utils/entmax/__init__.py4CODE
LOWludwig/utils/entmax/__init__.py4CODE
LOWludwig/utils/entmax/__init__.py4CODE
LOWludwig/utils/entmax/__init__.py14CODE
261 more matches not shown…
Modern Structural Boilerplate215 hits · 222 pts
SeverityFileLineSnippetContext
LOWludwig/serve_vllm.py24logger = logging.getLogger(__name__)CODE
LOWludwig/collect.py35logger = logging.getLogger(__name__)CODE
LOWludwig/forecast.py14logger = logging.getLogger(__name__)CODE
LOWludwig/hyperopt_cli.py29logger = logging.getLogger(__name__)CODE
LOWludwig/upload.py10logger = logging.getLogger(__name__)CODE
LOWludwig/preprocess.py32logger = logging.getLogger(__name__)CODE
LOWludwig/presets.py10logger = logging.getLogger(__name__)CODE
LOWludwig/predict.py31logger = logging.getLogger(__name__)CODE
LOWludwig/serve.py39logger = logging.getLogger(__name__)CODE
LOWludwig/inspect_model.py9logger = logging.getLogger(__name__)CODE
LOWludwig/export.py25logger = logging.getLogger(__name__)CODE
LOWludwig/api.py115logger = logging.getLogger(__name__)CODE
LOWludwig/api.py1832 def set_logging_level(logging_level: int) -> None:CODE
LOWludwig/serve_ray_serve.py29logger = logging.getLogger(__name__)CODE
LOWludwig/experiment.py33logger = logging.getLogger(__name__)CODE
LOWludwig/serve_kserve.py23logger = logging.getLogger(__name__)CODE
LOWludwig/train.py32logger = logging.getLogger(__name__)CODE
LOWludwig/evaluate.py30logger = logging.getLogger(__name__)CODE
LOWludwig/progress_bar.py38 def set_postfix(self, ordered_dict: dict | None = None, **kwargs) -> None:CODE
LOW⚡ludwig/config_generation.py19logger = logging.getLogger(__name__)CODE
LOW⚡ludwig/serve_v2.py27logger = logging.getLogger(__name__)CODE
LOWludwig/model_inspector.py15logger = logging.getLogger(__name__)CODE
LOWludwig/explain/captum.py41logger = logging.getLogger(__name__)CODE
LOWludwig/distributed/accelerate.py38logger = logging.getLogger(__name__)CODE
LOWludwig/vector_index/__init__.py6logger = logging.getLogger(__name__)CODE
LOWludwig/datasets/archives.py27logger = logging.getLogger(__name__)CODE
LOWludwig/datasets/loaders/hugging_face.py26logger = logging.getLogger(__name__)CODE
LOWludwig/datasets/loaders/openml_loader.py27logger = logging.getLogger(__name__)CODE
LOWludwig/datasets/loaders/dataset_loader.py38logger = logging.getLogger(__name__)CODE
LOWludwig/datasets/loaders/mnist.py28logger = logging.getLogger(__name__)CODE
LOWludwig/features/vector_feature.py40logger = logging.getLogger(__name__)CODE
LOWludwig/features/category_feature.py65logger = logging.getLogger(__name__)CODE
LOWludwig/features/binary_feature.py50logger = logging.getLogger(__name__)CODE
LOWludwig/features/text_feature.py64logger = logging.getLogger(__name__)CODE
LOWludwig/features/set_feature.py45logger = logging.getLogger(__name__)CODE
LOWludwig/features/bag_feature.py30logger = logging.getLogger(__name__)CODE
LOWludwig/features/number_feature.py47logger = logging.getLogger(__name__)CODE
LOWludwig/features/date_feature.py35logger = logging.getLogger(__name__)CODE
LOWludwig/features/passthrough_feature.py78 def update_config_with_metadata(self, feature_config, feature_metadata, *args, **kwargs) -> None:CODE
LOWludwig/features/image_feature.py109logger = logging.getLogger(__name__)CODE
LOWludwig/features/anomaly_feature.py72logger = logging.getLogger(__name__)CODE
LOWludwig/features/anomaly_feature.py281 def update_metrics(self, targets: torch.Tensor, predictions: dict[str, torch.Tensor]) -> None:CODE
LOWludwig/features/timeseries_feature.py39logger = logging.getLogger(__name__)CODE
LOWludwig/features/sequence_feature.py64logger = logging.getLogger(__name__)CODE
LOWludwig/features/base_feature.py53logger = logging.getLogger(__name__)CODE
LOW⚡ludwig/features/base_feature.py214 def update_config_with_metadata(feature_config, feature_metadata, *args, **kwargs) -> None:CODE
LOW⚡ludwig/features/base_feature.py217 def update_config_after_module_init(self, feature_config) -> None:CODE
LOWludwig/features/base_feature.py411 def _setup_loss(self) -> None:CODE
LOWludwig/features/base_feature.py415 def _setup_metrics(self) -> None:CODE
LOWludwig/features/base_feature.py485 def update_metrics(self, targets: Tensor, predictions: dict[str, Tensor]) -> None:CODE
LOW⚡ludwig/features/base_feature.py601 def update_config_with_metadata(feature_config, feature_metadata, *args, **kwargs) -> None:CODE
LOWludwig/features/h3_feature.py27logger = logging.getLogger(__name__)CODE
LOWludwig/features/audio_feature.py52logger = logging.getLogger(__name__)CODE
LOWludwig/contribs/comet.py25logger = logging.getLogger(__name__)CODE
LOWludwig/contribs/wandb.py24logger = logging.getLogger(__name__)CODE
LOWludwig/contribs/aim.py11logger = logging.getLogger(__name__)CODE
LOWludwig/contribs/mlflow/mlflow3.py24logger = logging.getLogger(__name__)CODE
LOWludwig/contribs/mlflow/__init__.py16logger = logging.getLogger(__name__)CODE
LOWludwig/combiners/combiners.py52logger = logging.getLogger(__name__)CODE
LOWludwig/combiners/tabpfn_v2_combiner.py30logger = logging.getLogger(__name__)CODE
155 more matches not shown…
Over-Commented Block224 hits · 219 pts
SeverityFileLineSnippetContext
LOW.protolint.yaml1# Adapted fromCOMMENT
LOWludwig/experiment_utils.py1# Copyright (c) 2023 Predibase, Inc., 2019 Uber Technologies, Inc.COMMENT
LOWludwig/api_types.py1# Copyright (c) 2023 Predibase, Inc., 2019 Uber Technologies, Inc.COMMENT
LOWludwig/collect.py1#! /usr/bin/env pythonCOMMENT
LOWludwig/contrib.py1# Copyright (c) 2023 Predibase, Inc., 2019 Uber Technologies, Inc.COMMENT
LOWludwig/hyperopt_cli.py1#! /usr/bin/env pythonCOMMENT
LOWludwig/error.py1# Copyright (c) 2022 Predibase, Inc.COMMENT
LOWludwig/preprocess.py1#! /usr/bin/env pythonCOMMENT
LOWludwig/globals.py1#! /usr/bin/env pythonCOMMENT
LOWludwig/constants.py1#! /usr/bin/env pythonCOMMENT
LOWludwig/predict.py1#! /usr/bin/env pythonCOMMENT
LOWludwig/__init__.py1# Copyright (c) 2023 Predibase, Inc., 2019 Uber Technologies, Inc.COMMENT
LOWludwig/serve.py1#! /usr/bin/env pythonCOMMENT
LOWludwig/export.py1#! /usr/bin/env pythonCOMMENT
LOWludwig/api.py1# !/usr/bin/env pythonCOMMENT
LOWludwig/experiment.py1#! /usr/bin/env pythonCOMMENT
LOWludwig/cli.py1#! /usr/bin/env pythonCOMMENT
LOWludwig/train.py1#! /usr/bin/env pythonCOMMENT
LOWludwig/evaluate.py1#! /usr/bin/env pythonCOMMENT
LOWludwig/callbacks/__init__.py1# !/usr/bin/env pythonCOMMENT
LOWludwig/datasets/dataset_config.py1# Copyright (c) 2022 Predibase, Inc.COMMENT
LOWludwig/datasets/archives.py1#! /usr/bin/env pythonCOMMENT
LOWludwig/datasets/loaders/ieee_fraud.py1# Copyright (c) 2022 Predibase, Inc.COMMENT
LOWludwig/datasets/loaders/adult_census_income.py1# Copyright (c) 2022 Predibase, Inc.COMMENT
LOWludwig/datasets/loaders/kdd_loader.py1# Copyright (c) 2022 Predibase, Inc.COMMENT
LOWludwig/datasets/loaders/hugging_face.py1# Copyright (c) 2022 Predibase, Inc.COMMENT
LOWludwig/datasets/loaders/goemotions.py1# Copyright (c) 2022 Predibase, Inc.COMMENT
LOWludwig/datasets/loaders/higgs.py1# Copyright (c) 2022 Predibase, Inc.COMMENT
LOWludwig/datasets/loaders/split_loaders.py1# Copyright (c) 2022 Predibase, Inc.COMMENT
LOWludwig/datasets/loaders/ethos_binary.py1# Copyright (c) 2022 Predibase, Inc.COMMENT
LOWludwig/datasets/loaders/consumer_complaints_loader.py1# Copyright (c) 2022 Predibase, Inc.COMMENT
LOWludwig/datasets/loaders/creditcard_fraud.py1# Copyright (c) 2022 Predibase, Inc.COMMENT
LOWludwig/datasets/loaders/sarcastic_headlines.py1# Copyright (c) 2022 Predibase, Inc.COMMENT
LOWludwig/datasets/loaders/openml_loader.py1# Copyright (c) 2022 Predibase, Inc.COMMENT
LOWludwig/datasets/loaders/naval.py1# Copyright (c) 2022 Predibase, Inc.COMMENT
LOWludwig/datasets/loaders/dataset_loader.py1# Copyright (c) 2022 Predibase, Inc.COMMENT
LOWludwig/datasets/loaders/agnews.py1# Copyright (c) 2022 Predibase, Inc.COMMENT
LOWludwig/datasets/loaders/sarcos.py1# Copyright (c) 2022 Predibase, Inc.COMMENT
LOWludwig/datasets/loaders/insurance_lite.py1# Copyright (c) 2022 Predibase, Inc.COMMENT
LOWludwig/datasets/loaders/rossman_store_sales.py1# Copyright (c) 2022 Predibase, Inc.COMMENT
LOWludwig/datasets/loaders/allstate_claims_severity.py1# Copyright (c) 2022 Predibase, Inc.COMMENT
LOWludwig/datasets/loaders/forest_cover.py1# Copyright (c) 2022 Predibase, Inc.COMMENT
LOWludwig/datasets/loaders/forest_cover.py61 # Elevation quantitative meters Elevation in metersCOMMENT
LOWludwig/datasets/loaders/code_alpaca_loader.py1# Copyright (c) 2022 Predibase, Inc.COMMENT
LOWludwig/datasets/loaders/sst.py1# Copyright (c) 2022 Predibase, Inc.COMMENT
LOWludwig/datasets/loaders/santander_value_prediction.py1# Copyright (c) 2022 Predibase, Inc.COMMENT
LOWludwig/datasets/loaders/flickr8k.py1# Copyright (c) 2022 Predibase, Inc.COMMENT
LOWludwig/datasets/loaders/camseq.py1# Copyright (c) 2023 Aizen Corp.COMMENT
LOWludwig/datasets/loaders/mnist.py1# Copyright (c) 2022 Predibase, Inc.COMMENT
LOWludwig/features/feature_registries.py1# Copyright (c) 2023 Predibase, Inc., 2019 Uber Technologies, Inc.COMMENT
LOWludwig/features/vector_feature.py1#! /usr/bin/env pythonCOMMENT
LOWludwig/features/category_feature.py1#! /usr/bin/env pythonCOMMENT
LOWludwig/features/binary_feature.py1#! /usr/bin/env pythonCOMMENT
LOWludwig/features/text_feature.py1#! /usr/bin/env pythonCOMMENT
LOWludwig/features/text_feature.py481 #COMMENT
LOWludwig/features/set_feature.py1#! /usr/bin/env pythonCOMMENT
LOWludwig/features/bag_feature.py1#! /usr/bin/env pythonCOMMENT
LOWludwig/features/number_feature.py1#! /usr/bin/env pythonCOMMENT
LOWludwig/features/feature_utils.py1#! /usr/bin/env pythonCOMMENT
LOWludwig/features/date_feature.py1#! /usr/bin/env pythonCOMMENT
164 more matches not shown…
Empty Error Handlers43 hits · 215 pts
SeverityFileLineSnippetContext
HIGHludwig/__init__.py37except ImportError:CODE
HIGHludwig/config_sampling/explore_schema.py255except pydantic.ValidationError:CODE
HIGHludwig/config_sampling/explore_schema.py286except pydantic.ValidationError:CODE
HIGHludwig/config_sampling/explore_schema.py313except pydantic.ValidationError:CODE
HIGHludwig/config_validation/checks.py599except ImportError:CODE
HIGHludwig/datasets/loaders/multiple_choice_loader.py40except ValueError:CODE
HIGHludwig/datasets/loaders/sst.py86except ValueError:CODE
HIGHludwig/utils/training_report.py52except ImportError:CODE
HIGHludwig/utils/training_report.py62except ImportError:CODE
HIGHludwig/utils/misc_utils.py210except (subprocess.CalledProcessError, FileNotFoundError, OSError):CODE
HIGHludwig/utils/data_utils.py194except csv.Error:CODE
HIGHludwig/utils/model_card.py146except ImportError:CODE
HIGHludwig/utils/model_card.py154except ImportError:CODE
HIGHludwig/automl/base_config.py279except TypeError:CODE
HIGHludwig/visualize/performance.py379except (TypeError, KeyError):CODE
HIGHludwig/trainers/__init__.py8except ImportError:CODE
HIGHludwig/schema/utils.py801except (AttributeError, TypeError):CODE
HIGHludwig/schema/utils.py287except (AttributeError, TypeError):CODE
HIGHludwig/schema/utils.py304except TypeError:CODE
HIGHludwig/schema/utils.py297except TypeError:CODE
HIGHludwig/benchmarking/profiler.py81except (AttributeError, NotImplementedError):CODE
HIGHludwig/benchmarking/profiler.py96except EmptyQueueException:CODE
HIGHludwig/data/preprocessing_progress.py147except Exception:CODE
HIGHludwig/data/preprocessing_progress.py188except Exception:CODE
HIGHludwig/data/batcher/random_access.py159except queue.Full:CODE
HIGHludwig/hyperopt/execution.py151except ImportError:CODE
HIGHtests/ludwig/utils/test_dataframe_utils.py10except ImportError:CODE
HIGHtests/ludwig/automl/test_data_source.py12except ImportError:CODE
HIGHtests/ludwig/automl/test_tune_config.py5except ImportError:CODE
HIGH…ts/regression_tests/automl/test_auto_type_inference.py9except ImportError:CODE
HIGHexamples/mnist/advanced_model_training.py30except FileNotFoundError:CODE
HIGHexamples/image_encoders/compare_encoders.py32except ImportError:CODE
HIGHexamples/image_encoders/compare_encoders.py43except ImportError:CODE
HIGHexamples/alignment/train_grpo.py337except ImportError:CODE
HIGHexamples/multi_task/train_multi_task.py230except Exception:CODE
HIGHexamples/semantic_segmentation/unet_depth_sweep.py99except (KeyError, TypeError):CODE
HIGHscripts/dataset_smoke_test.py419except ImportError:CODE
HIGHscripts/dataset_smoke_test.py550except Exception:CODE
HIGHscripts/dataset_smoke_test.py564except Exception:CODE
HIGHscripts/dataset_smoke_test.py142except Exception:CODE
HIGHscripts/dataset_smoke_test.py474except Exception:CODE
HIGHscripts/dataset_smoke_test.py498except Exception:CODE
HIGHscripts/probe_hf_datasets.py285except Exception:CODE
Deep Nesting185 hits · 164 pts
SeverityFileLineSnippetContext
LOWludwig/serve_vllm.py27CODE
LOWludwig/serve_vllm.py116CODE
LOWludwig/serve.py132CODE
LOWludwig/serve.py421CODE
LOWludwig/inspect_model.py12CODE
LOWludwig/api.py1865CODE
LOWludwig/api.py232CODE
LOWludwig/api.py1161CODE
LOWludwig/serve_v2.py96CODE
LOWludwig/config_sampling/explore_schema.py22CODE
LOWludwig/config_sampling/explore_schema.py173CODE
LOWludwig/config_sampling/explore_schema.py291CODE
LOWludwig/config_sampling/parameter_sampling.py10CODE
LOWludwig/explain/captum.py351CODE
LOWludwig/explain/captum.py379CODE
LOWludwig/explain/captum_ray.py32CODE
LOWludwig/config_validation/checks.py224CODE
LOWludwig/config_validation/checks.py237CODE
LOWludwig/config_validation/checks.py329CODE
LOWludwig/callbacks/studio.py183CODE
LOWludwig/datasets/archives.py42CODE
LOWludwig/datasets/archives.py68CODE
LOWludwig/datasets/archives.py184CODE
LOWludwig/datasets/loaders/newyorker_caption_contest.py19CODE
LOWludwig/datasets/loaders/dataset_loader.py256CODE
LOWludwig/datasets/loaders/dataset_loader.py333CODE
LOWludwig/datasets/loaders/dataset_loader.py363CODE
LOWludwig/datasets/loaders/dataset_loader.py406CODE
LOWludwig/datasets/loaders/dataset_loader.py425CODE
LOWludwig/datasets/loaders/sst.py54CODE
LOWludwig/datasets/loaders/sst.py278CODE
LOWludwig/datasets/loaders/vqa_loader.py25CODE
LOWludwig/datasets/loaders/vqa_loader.py51CODE
LOWludwig/datasets/loaders/flickr8k.py23CODE
LOWludwig/datasets/loaders/mnist.py109CODE
LOWludwig/features/vector_feature.py44CODE
LOWludwig/features/category_feature.py400CODE
LOWludwig/features/text_feature.py324CODE
LOWludwig/features/number_feature.py329CODE
LOWludwig/features/date_feature.py72CODE
LOWludwig/features/image_feature.py146CODE
LOWludwig/features/image_feature.py499CODE
LOWludwig/features/image_feature.py905CODE
LOWludwig/features/sequence_feature.py380CODE
LOWludwig/features/audio_feature.py81CODE
LOWludwig/features/audio_feature.py242CODE
LOWludwig/features/audio_feature.py438CODE
LOWludwig/contribs/mlflow/mlflow3.py170CODE
LOWludwig/combiners/combiners.py254CODE
LOWludwig/combiners/combiners.py589CODE
LOWludwig/utils/visualization_utils.py1398CODE
LOWludwig/utils/sequence_packing.py27CODE
LOWludwig/utils/image_utils.py127CODE
LOWludwig/utils/dataset_quality.py268CODE
LOWludwig/utils/batch_size_tuner.py19CODE
LOWludwig/utils/trainer_utils.py291CODE
LOWludwig/utils/training_report.py16CODE
LOWludwig/utils/model_export.py172CODE
LOWludwig/utils/algorithms_utils.py19CODE
LOWludwig/utils/misc_utils.py69CODE
125 more matches not shown…
Cross-Language Confusion30 hits · 161 pts
SeverityFileLineSnippetContext
HIGH⚡ludwig/config_validation/checks.py692 # TODO: retrieval by default should be set to null, not a default dict:COMMENT
HIGHludwig/config_validation/checks.py663 # TODO: `prompt` by default should be set to null, not a default dict:COMMENT
HIGHludwig/utils/output_feature_utils.py118 "features, or disabling the bucketing setting bucketing_field to None / null, "CODE
HIGHludwig/schema/trainer.py498 "are inversely proportional to this vector. When null, a uniform preference is used."CODE
HIGHludwig/schema/features/loss/loss.py87 return "[undefined]"CODE
HIGHludwig/schema/features/preprocessing/date.py38 description="This parameter can either be a datetime format string, or null, in which case the datetime "CODE
HIGHludwig/schema/combiners/common_transformer_options.py60 description="The number of stacked fully connected layers (only applies if `reduce_output` is not null).",CODE
HIGHludwig/schema/combiners/tabnet.py80 description="Size of the virtual batch size used by ghost batch norm. If null, regular batch norm is used "CODE
HIGHludwig/schema/encoders/sequence_encoders.py23`[{filter_size: 7, pool_size: 3}, {filter_size: 7, pool_size: 3}, {filter_size: 3, pool_size: null},CODE
HIGHludwig/schema/encoders/sequence_encoders.py24{filter_size: 3, pool_size: null}, {filter_size: 3, pool_size: null}, {filter_size: 3, pool_size: 3}]`.CODE
HIGHludwig/schema/encoders/sequence_encoders.py408 description="If stacked_layers is null, this is the number of elements in the stack of parallel convolutional "CODE
HIGHludwig/schema/encoders/image/base.py216 "each layer. It indicates the normalization applied to the activations and can be null, "CODE
HIGHludwig/schema/encoders/image/base.py279 "each layer. It indicates the norm of the output and can be null, batch or layer.",CODE
HIGHludwig/schema/llms/peft.py1456 "Per-source weights; must have the same length as `sources`. If null, all weights default to 1.0."CODE
HIGHludwig/schema/llms/peft.py1513 "If null, the first entry in `adapters` is used. Set this to a merged adapter "CODE
HIGHludwig/modules/preference_losses.py135 + beta * KL(policy || reference)STRING
HIGHtests/ludwig/utils/test_dataframe_utils.py85 assert scalar_df.equals(expected_df)CODE
HIGHtests/ludwig/utils/test_data_utils.py51 assert df.equals(CODE
HIGHtests/ludwig/utils/test_data_utils.py65 assert df.equals(CODE
HIGHtests/ludwig/utils/test_data_utils.py81 assert df.equals(pd.DataFrame([1, 2, 3, 4, 5], columns=["x"]))CODE
HIGHtests/ludwig/utils/test_dataset_utils.py34 assert split_df.equals(CODE
HIGHtests/ludwig/utils/test_dataset_utils.py89 assert split_df.equals(CODE
HIGHtests/ludwig/utils/test_dataset_utils.py144 assert split_df.equals(CODE
HIGHtests/ludwig/utils/test_dataset_utils.py199 assert split_df.equals(CODE
HIGH⚡tests/ludwig/data/test_split.py81 assert not s1.equals(s2)CODE
HIGH⚡tests/ludwig/data/test_split.py85 assert s1.equals(s3)CODE
HIGHtests/ludwig/data/test_split.py228 assert not s1.equals(s2)CODE
HIGHtests/ludwig/data/test_split.py235 assert s1.equals(s3)CODE
HIGHtests/integration_tests/test_visualization.py1605 assert ground_truth_train_split.equals(pd.Series([0]))CODE
HIGHtests/integration_tests/test_mlflow.py81 assert pred_df.equals(expected_df)CODE
Cross-File Repetition27 hits · 135 pts
SeverityFileLineSnippetContext
HIGHludwig/contribs/comet.py0class that defines the methods necessary to hook into process.STRING
HIGHludwig/contribs/wandb.py0class that defines the methods necessary to hook into process.STRING
HIGHludwig/contribs/aim.py0class that defines the methods necessary to hook into process.STRING
HIGHludwig/benchmarking/profiler_callbacks.py0class that defines the methods necessary to hook into process.STRING
HIGHtests/integration_tests/test_experiment.py0class that defines the methods necessary to hook into process.STRING
HIGHludwig/utils/torch_utils.py0returns the size of the input tensor without the batch dimension.STRING
HIGHludwig/modules/reduction_modules.py0returns the size of the input tensor without the batch dimension.STRING
HIGHludwig/modules/convolutional_modules.py0returns the size of the input tensor without the batch dimension.STRING
HIGHludwig/models/llm.py0forward pass of the model. args: inputs: inputs to the model. can be a dictionary of input names to input tensors or a tSTRING
HIGHludwig/models/ecd.py0forward pass of the model. args: inputs: inputs to the model. can be a dictionary of input names to input tensors or a tSTRING
HIGHludwig/models/base.py0forward pass of the model. args: inputs: inputs to the model. can be a dictionary of input names to input tensors or a tSTRING
HIGHludwig/models/llm.py0returns init arguments for constructing this model.STRING
HIGHludwig/models/ecd.py0returns init arguments for constructing this model.STRING
HIGHludwig/models/base.py0returns init arguments for constructing this model.STRING
HIGHludwig/visualize/threshold.py0load model data from files to be shown by compare_predictions_distribution. args: predictions: list of prediction resultSTRING
HIGHludwig/visualize/curves.py0load model data from files to be shown by compare_predictions_distribution. args: predictions: list of prediction resultSTRING
HIGHludwig/visualize/performance.py0load model data from files to be shown by compare_predictions_distribution. args: predictions: list of prediction resultSTRING
HIGHludwig/schema/split.py0custom dataclass field that when used inside a dataclass will allow the user to specify a decoder config. returns: initiSTRING
HIGHludwig/schema/features/preprocessing/utils.py0custom dataclass field that when used inside a dataclass will allow the user to specify a decoder config. returns: initiSTRING
HIGHludwig/schema/encoders/utils.py0custom dataclass field that when used inside a dataclass will allow the user to specify a decoder config. returns: initiSTRING
HIGHludwig/schema/decoders/utils.py0custom dataclass field that when used inside a dataclass will allow the user to specify a decoder config. returns: initiSTRING
HIGHludwig/schema/features/loss/utils.py0returns a json schema of conditionals to validate against decoder types for specific feature types.STRING
HIGHludwig/schema/encoders/utils.py0returns a json schema of conditionals to validate against decoder types for specific feature types.STRING
HIGHludwig/schema/decoders/utils.py0returns a json schema of conditionals to validate against decoder types for specific feature types.STRING
HIGHtests/integration_tests/utils.py0helper method to avoid code repetition in running an experiment. :param input_features: input schema :param output_featuSTRING
HIGHtests/integration_tests/test_api.py0helper method to avoid code repetition in running an experiment. :param input_features: input schema :param output_featuSTRING
HIGHtests/integration_tests/test_visualization_api.py0helper method to avoid code repetition in running an experiment. :param input_features: input schema :param output_featuSTRING
Excessive Try-Catch Wrapping114 hits · 117 pts
SeverityFileLineSnippetContext
LOWludwig/check.py32 except Exception:CODE
LOWludwig/serve.py264 except Exception:CODE
LOWludwig/serve.py308 except Exception as exc:CODE
LOWludwig/serve.py331 except Exception:CODE
LOWludwig/serve.py372 except Exception:CODE
LOWludwig/api.py601 except Exception:CODE
LOWludwig/api.py617 except Exception:CODE
LOWludwig/api.py1551 except Exception:CODE
LOWludwig/config_generation.py101 except Exception as exc:CODE
LOWludwig/config_generation.py196 except Exception as e:CODE
LOWludwig/serve_v2.py324 except Exception as exc:CODE
LOWludwig/serve_v2.py344 except Exception as exc:CODE
LOWludwig/serve_v2.py370 except Exception as exc:CODE
LOWludwig/datasets/__init__.py320 except Exception as e:CODE
LOWludwig/datasets/loaders/openml_loader.py150 except Exception as exc:CODE
LOWludwig/datasets/loaders/dataset_loader.py264 except Exception as e:CODE
LOWludwig/datasets/loaders/dataset_loader.py274 except Exception as fallback_e:CODE
LOWludwig/datasets/loaders/dataset_loader.py285 except Exception:CODE
LOWludwig/datasets/loaders/dataset_loader.py291 except Exception:CODE
LOWludwig/datasets/loaders/dataset_loader.py345 except Exception:CODE
LOWludwig/features/binary_feature.py174 except Exception as e:CODE
LOWludwig/features/text_feature.py365 except Exception:CODE
LOWludwig/features/date_feature.py85 except Exception as e:CODE
MEDIUMludwig/features/date_feature.py72def date_to_list(date_value, datetime_format, preprocessing_parameters):CODE
LOWludwig/features/anomaly_feature.py358 except Exception as e:CODE
LOWludwig/features/anomaly_feature.py367 except Exception as e:CODE
LOWludwig/features/anomaly_feature.py384 except Exception as e:CODE
LOWludwig/features/base_feature.py296 except Exception:CODE
LOWludwig/features/base_feature.py514 except Exception as e:CODE
LOWludwig/contribs/comet.py50 except Exception:CODE
LOWludwig/contribs/comet.py105 except Exception:CODE
LOWludwig/contribs/comet.py112 except Exception:CODE
LOWludwig/contribs/aim.py42 except Exception:CODE
LOWludwig/contribs/mlflow/mlflow3.py73 except Exception:CODE
LOWludwig/contribs/mlflow/mlflow3.py90 except Exception as e:CODE
LOWludwig/contribs/mlflow/mlflow3.py97 except Exception as e:CODE
LOWludwig/contribs/mlflow/mlflow3.py139 except Exception as e:CODE
LOWludwig/contribs/mlflow/mlflow3.py166 except Exception:CODE
LOWludwig/contribs/mlflow/mlflow3.py189 except Exception:CODE
LOWludwig/contribs/mlflow/mlflow3.py205 except Exception as e:CODE
LOWludwig/utils/image_utils.py116 except Exception as e:CODE
LOWludwig/utils/image_utils.py197 except Exception:CODE
LOWludwig/utils/image_utils.py209 except Exception:CODE
LOWludwig/utils/image_utils.py228 except Exception:CODE
LOWludwig/utils/hf_utils.py108 except Exception:CODE
LOWludwig/utils/hf_utils.py185 except Exception as e:CODE
LOWludwig/utils/model_export.py68 except Exception as e:CODE
LOWludwig/utils/model_export.py111 except Exception as e:CODE
LOWludwig/utils/model_export.py122 except Exception as e2:CODE
LOW⚡ludwig/utils/audio_utils.py73 except Exception:CODE
LOW⚡ludwig/utils/audio_utils.py84 except Exception:CODE
LOWludwig/utils/output_feature_utils.py110 except Exception as e:CODE
LOWludwig/utils/checkpoint_utils.py174 except Exception as e:CODE
LOWludwig/utils/checkpoint_utils.py394 except Exception:CODE
LOWludwig/utils/fs_utils.py97 except Exception:CODE
LOWludwig/backend/datasource.py50 except Exception as e:CODE
LOWludwig/visualize/_utils.py286 except Exception:CODE
LOWludwig/schema/utils.py404 except Exception as e:CODE
LOWludwig/schema/features/augmentation/utils.py141 except Exception as e:CODE
LOWludwig/schema/features/preprocessing/utils.py80 except Exception as e:CODE
54 more matches not shown…
Self-Referential Comments33 hits · 97 pts
SeverityFileLineSnippetContext
MEDIUMludwig/api.py177 # Initialize the config objectCOMMENT
MEDIUMludwig/api.py804 # Create the LLM model class instance with the loaded LLM if it hasn't been initialized yet.COMMENT
MEDIUM⚡ludwig/datasets/loaders/dataset_loader.py490 ) # This function is defined in the Hugging Face dataloaderCODE
MEDIUMludwig/features/timeseries_feature.py89 # Create the list of shifts we want to perform over the series.COMMENT
MEDIUMludwig/combiners/combiners.py57 """This class provides an opaque handle to the input features, preventing them from being registered as state.STRING
MEDIUMludwig/utils/hf_utils.py168 # Create the repo if it doesn't exist. This is a no-op if the repo already existsCOMMENT
MEDIUMludwig/utils/audio_utils.py177# The following code for FBank is adapted from jameslyons/python_speech_featuresCOMMENT
MEDIUMludwig/utils/llm_quantization_utils.py25 # Create a new Linear layer with the same shapeCOMMENT
MEDIUMludwig/utils/fs_utils.py65 # Create a windows compatible path from url pathCOMMENT
MEDIUMludwig/backend/datasource.py55 # Create a dataset from the paths and indices, then map to read filesCOMMENT
MEDIUMludwig/modules/optimization_modules.py50 # Create a dict of parameters to be passed to torch (i.e. everything except `type`):COMMENT
MEDIUMludwig/modules/convolutional_modules.py1273# The following code for ResNet is adapted from the TensorFlow implementationCOMMENT
MEDIUMludwig/data/dataset_synthesizer.py400 # Create a Random ImageCOMMENT
MEDIUMludwig/hyperopt/run.py171 # Initialize config objectCOMMENT
MEDIUMtests/ludwig/utils/test_upload_utils.py29 # Create a temporary folder designating training output directory.COMMENT
MEDIUMtests/ludwig/utils/test_upload_utils.py48 # Create a temporary folder designating training output directory.COMMENT
MEDIUMtests/ludwig/utils/test_hf_utils.py55 # Create a temporary folderCOMMENT
MEDIUMtests/ludwig/utils/test_hf_utils.py58 # Create a file within the temporary folderCOMMENT
MEDIUMtests/ludwig/utils/test_model_utils.py21 # Create a sample modelCOMMENT
MEDIUMtests/ludwig/utils/test_model_utils.py46 # Create a sample modelCOMMENT
MEDIUMtests/ludwig/utils/test_model_utils.py52 # Create a new device for testingCOMMENT
MEDIUMtests/ludwig/automl/test_base_config.py130 # Create a temporary directory to store the parquet fileCOMMENT
MEDIUMtests/ludwig/automl/test_base_config.py133 # Create a dataframe with all the typesCOMMENT
MEDIUMtests/ludwig/decoders/test_llm_decoders.py54 # Create a Boolean mask for elements equal to 0 or 2 (padding or output)COMMENT
MEDIUMexamples/mnist/advanced_model_training.py15# ## Import required librariesCOMMENT
MEDIUMexamples/mnist/assess_model_performance.py9# ## Import required librariesCOMMENT
MEDIUMexamples/llm_text_generation/simple_model_training.py9# Import required librariesCOMMENT
MEDIUMexamples/llm_few_shot_learning/simple_model_training.py9# Import required librariesCOMMENT
MEDIUMexamples/class_imbalance/model_training.py10# Import required librariesCOMMENT
MEDIUMexamples/titanic/simple_model_training.py8# Import required librariesCOMMENT
MEDIUMexamples/titanic/multiple_model_training.py10# ## Import required librariesCOMMENT
MEDIUMexamples/insurance_lite/train.py5# Import required librariesCOMMENT
MEDIUM…amples/llm_zero_shot_learning/simple_model_training.py9# Import required librariesCOMMENT
Docstring Block Structure17 hits · 85 pts
SeverityFileLineSnippetContext
HIGHludwig/api.py769Upscales quantized weights of a model to fp16 and saves the result in a specified folder. Args: savSTRING
HIGHludwig/api.py1497Preprocess a dataset and return it split into training / validation / test sets. Args: dataset: SouSTRING
HIGHludwig/config_generation.py112Generate a Ludwig config from a natural language task description. Uses an LLM to translate the description into a STRING
HIGHludwig/datasets/archives.py138Extract a tar archive, refusing any member that would write outside path. Checking member names alone is not enoughSTRING
HIGHludwig/features/image_feature.py440Returns a torchvision transform that is compatible with the model variant. Note that the raw torchvision transform STRING
HIGHludwig/utils/date_utils.py67Convert a numeric timestamp to a datetime object. `datetime` objects can be created from POSIX timestamps like thosSTRING
HIGHludwig/utils/trainer_utils.py544Freezes layers in a model whose names match a specified regular expression pattern. This function iterates over allSTRING
HIGHludwig/utils/hf_utils.py128Uploads a local folder to the Hugging Face Model Hub. Args: repo_id (str): The ID of the target repository STRING
HIGHludwig/schema/utils.py76Deserialize a value into a config instance. Handles the common pattern of checking if a value is a raw dict STRING
HIGHludwig/modules/training_hooks.py25Abstract method to be implemented by subclasses. This is the method that defines the custom behavior of the traiSTRING
HIGHludwig/modules/convolutional_modules.py1293Retrieve the size of each block_layer in the ResNet model. The number of block layers used for the Resnet model varSTRING
HIGHludwig/data/preprocessing.py525Builds a dataset from a dataframe and a list of features. Args: config: A dictionary containing the Ludwig STRING
HIGHludwig/data/preprocessing.py1038The purpose of this function is to balance the training dataset using either over-sampling or under- sampling. STRING
HIGHtests/ludwig/encoders/test_llm_encoders.py66Get the PEFT paramter name prefix for a given adapter type. Args: adapter: A valid config value forSTRING
HIGHtests/integration_tests/utils.py212Helper method to generate synthetic data based on input, output feature specs. Args: input_features: schemaSTRING
HIGHtests/integration_tests/utils.py1074Asserts that the preprocessed dataset has the correct shape and dtype for a given feature type. Args: featuSTRING
HIGHtests/integration_tests/parameter_update_utils.py24 Reports on the number of parameters in a Ludwig component and their update status. Args: module: (LudwiSTRING
AI Structural Patterns94 hits · 76 pts
SeverityFileLineSnippetContext
LOWludwig/experiment_utils.py61CODE
LOWludwig/collect.py38CODE
LOWludwig/forecast.py17CODE
LOWludwig/hyperopt_cli.py32CODE
LOWludwig/preprocess.py35CODE
LOWludwig/predict.py34CODE
LOWludwig/api.py1865CODE
LOWludwig/api.py232CODE
LOWludwig/api.py930CODE
LOWludwig/api.py1021CODE
LOWludwig/api.py1287CODE
LOWludwig/api.py1485CODE
LOWludwig/experiment.py36CODE
LOWludwig/train.py35CODE
LOWludwig/evaluate.py33CODE
LOWludwig/utils/strings_utils.py322CODE
LOWludwig/utils/trainer_utils.py99CODE
LOWludwig/utils/torch_utils.py352CODE
LOWludwig/trainers/trainer_llm.py47CODE
LOWludwig/trainers/trainer_llm.py414CODE
LOWludwig/trainers/trainer.py111CODE
LOWludwig/encoders/set_encoders.py37CODE
LOWludwig/encoders/h3_encoders.py54CODE
LOWludwig/encoders/h3_encoders.py228CODE
LOWludwig/encoders/h3_encoders.py336CODE
LOWludwig/encoders/generic_encoders.py65CODE
LOWludwig/encoders/sequence_encoders.py157CODE
LOWludwig/encoders/sequence_encoders.py282CODE
LOWludwig/encoders/sequence_encoders.py519CODE
LOWludwig/encoders/sequence_encoders.py791CODE
LOWludwig/encoders/sequence_encoders.py1032CODE
LOWludwig/encoders/sequence_encoders.py1241CODE
LOWludwig/encoders/sequence_encoders.py1500CODE
LOWludwig/encoders/sequence_encoders.py1776CODE
LOWludwig/encoders/date_encoders.py67CODE
LOWludwig/encoders/date_encoders.py208CODE
LOWludwig/encoders/date_encoders.py295CODE
LOWludwig/encoders/text_encoders.py263CODE
LOWludwig/encoders/text_encoders.py404CODE
LOWludwig/encoders/text_encoders.py540CODE
LOWludwig/encoders/text_encoders.py656CODE
LOWludwig/encoders/text_encoders.py792CODE
LOWludwig/encoders/text_encoders.py944CODE
LOWludwig/encoders/text_encoders.py1062CODE
LOWludwig/encoders/text_encoders.py1209CODE
LOWludwig/encoders/text_encoders.py1316CODE
LOWludwig/encoders/text_encoders.py1462CODE
LOWludwig/encoders/text_encoders.py1588CODE
LOWludwig/encoders/text_encoders.py1725CODE
LOWludwig/encoders/text_encoders.py1849CODE
LOWludwig/encoders/text_encoders.py1978CODE
LOWludwig/encoders/text_encoders.py2092CODE
LOWludwig/encoders/mamba_hybrid.py139CODE
LOWludwig/encoders/mamba_hybrid.py236CODE
LOWludwig/encoders/timeseries_encoders.py22CODE
LOWludwig/encoders/bag_encoders.py37CODE
LOWludwig/encoders/image/base.py47CODE
LOWludwig/encoders/image/base.py173CODE
LOWludwig/decoders/sequence_decoders.py378CODE
LOWludwig/decoders/sequence_decoders.py599CODE
34 more matches not shown…
Modern AI Meta-Vocabulary12 hits · 40 pts
SeverityFileLineSnippetContext
MEDIUM⚡ludwig/config_generation.py28 # Extract just the key parts to fit in context windowCOMMENT
MEDIUM⚡ludwig/serve_v2.py159# Model manager (dependency injection)COMMENT
MEDIUM⚡ludwig/config_validation/checks.py476 # If performing zero-shot, we must specify pretrained adapter weightsCOMMENT
MEDIUM⚡ludwig/config_validation/checks.py676 # If template is NOT provided, then task is required for zero/few shot learning:COMMENT
MEDIUM⚡ludwig/config_validation/checks.py682 # If a template IS provided (i.e. we are not doing a built-in zero/few-shot learning), then...COMMENT
MEDIUMludwig/encoders/text_encoders.py2441 # by the scaling factor so we can use the extended context window.COMMENT
MEDIUMludwig/data/prompt.py165 # determine if this is a few-shot or zero-shot promptSTRING
MEDIUMludwig/data/prompt.py166 # few-shot prompts require a search function that returns samples from some datasetSTRING
MEDIUMtests/integration_tests/test_sequence_features.py70 # setup model scaffolding to for testingCOMMENT
MEDIUMexamples/image_encoders/README.md9### Why pretrained encoders matter for few-shot learningCOMMENT
MEDIUMexamples/llm_few_shot_learning/simple_model_training.py6# a zero shot classification model. It uses the facebook/opt-350m modelCOMMENT
MEDIUM…amples/llm_zero_shot_learning/simple_model_training.py6# a zero shot classification model. It uses the facebook/opt-350m modelCOMMENT
AI Slop Vocabulary18 hits · 34 pts
SeverityFileLineSnippetContext
MEDIUMludwig/presets.py43 # robust (interquartile) scaling on number features, mild-but-not-trivial FC stack, AdamWCOMMENT
MEDIUMludwig/api.py1940 # use Ludwig's utility to facilitate creating a dataframeCOMMENT
MEDIUMludwig/explain/captum.py372 # For a robust baseline, we take the mean of all samples from the training data.COMMENT
MEDIUMludwig/config_validation/checks.py65 """Checks instances of comprehensive (all parameters and defaults filled in) schema-validated config."""STRING
LOWludwig/datasets/loaders/misc_loaders.py50 # mc1_targets / mc2_targets are dicts; just use best_answer as textCOMMENT
LOWludwig/features/vector_feature.py240 # no overall stats, just return empty dictionaryCOMMENT
LOWludwig/features/category_feature.py223 # If no unknown is defined, just use the most popular token's index as the fallback indexSTRING
LOWludwig/features/set_feature.py327 # no overall stats, just return empty dictionaryCOMMENT
LOWludwig/features/number_feature.py514 # no overall stats, just return empty dictionaryCOMMENT
LOWludwig/features/image_feature.py1355 # no overall stats, just return empty dictionaryCOMMENT
LOWludwig/features/timeseries_feature.py362 # no overall stats, just return empty dictionaryCOMMENT
LOWludwig/combiners/combiners.py674 # todo: can we just use projector_size? # hidden_size,COMMENT
LOWludwig/utils/visualization_utils.py1497 # just use stripplots since they are categorical scatter plots.COMMENT
LOWludwig/utils/llm_utils.py573 # and just set it to a tensor of IGNORE_INDEX_TOKEN_ID so that we don't compute loss on this target tensor.COMMENT
MEDIUMludwig/modules/loss_modules.py150 # robust lambdaCOMMENT
MEDIUM…wig/config_validation/test_validate_config_combiner.py10 # Essentially verifies that the combiner registry is not empty at import time:COMMENT
LOWtests/ludwig/modules/test_metric_modules.py558 # Correct pattern: just call compute() — sync happens automatically inside.COMMENT
MEDIUMtests/integration_tests/test_input_feature_tied.py26# note: vocab parameter, below, is made up to facilitate creating input encodersCOMMENT
Redundant / Tautological Comments20 hits · 30 pts
SeverityFileLineSnippetContext
LOW⚡ludwig/collect.py276 # Output results parametersCOMMENT
LOW⚡ludwig/collect.py358 # Output results parametersCOMMENT
LOW⚡ludwig/forecast.py102 # Output results parametersCOMMENT
LOW⚡ludwig/predict.py148 # Output results parametersCOMMENT
LOW⚡ludwig/evaluate.py151 # Output results parametersCOMMENT
LOWludwig/config_validation/checks.py301 # Check if there is a text or sequence output feature using a tagger decoderCOMMENT
LOWludwig/features/category_feature.py176 # Check if the fallback label is in the vocab, if not add it.COMMENT
LOWludwig/utils/visualization_utils.py335 # Set ticks to the number of properties (in radians)COMMENT
LOW⚡ludwig/utils/fs_utils.py54 # Check if the cache path exists, if not create itCOMMENT
LOWludwig/utils/tokenizers.py802 # Set it to eos_token to avoid NoneType errors in preprocessing.COMMENT
LOWludwig/models/llm.py756 # Check if the saved weights are merged (no adapter_config.json) or adapter-onlyCOMMENT
LOWludwig/automl/base_config.py314 # Check if it is a nullboolean field. We do this since if you read a csv withSTRING
LOWludwig/schema/utils.py152 # Check if the subclass overrides _jsonschema_type_mappingCOMMENT
LOWludwig/schema/utils.py478 # Check if THIS class (or a parent) defines __post_init__COMMENT
LOWludwig/schema/utils.py1507 # Check if subclass overrides _jsonschema_type_mapping - if so, useCOMMENT
LOWludwig/data/batcher/test_batcher.py42 # Check if string loading works as wellSTRING
LOWludwig/data/batcher/test_batcher.py93 # Check if string loading works as wellSTRING
LOWludwig/hyperopt/run.py189 # Check if all features are grid type parameters and log UserWarning if neededCOMMENT
LOW⚡ludwig/hyperopt/execution.py65 # Check if ConfigSpace 1.x (no 'q' parameter)COMMENT
LOWexamples/kfold_cv/k-fold_cv_classification.sh19# Display results from K-fold cvCOMMENT
Synthetic Comment Markers3 hits · 18 pts
SeverityFileLineSnippetContext
HIGHludwig/datasets/configs/hc3.yaml10 answer is human-written (0) or generated by ChatGPT (1). Each source row isCODE
HIGHludwig/datasets/configs/hc3_chinese.yaml10 of whether an answer is human-written (0) or generated by ChatGPT (1).CODE
HIGHludwig/schema/metadata/configs/features.yaml339 # TODO: review metadata generated by CopilotCOMMENT
Verbosity Indicators9 hits · 14 pts
SeverityFileLineSnippetContext
LOWludwig/api.py1199 # Step 1: Preprocess the initial lookback window onceCOMMENT
LOWludwig/api.py1230 # Step 2: Incremental prediction loop — O(horizon) steps, each O(1) preprocessingCOMMENT
LOWludwig/api.py1259 # Step 3: Update embeddings incrementally for the next step.COMMENT
LOWludwig/config_validation/checks.py587 # If the backend is not explicitly set, then we need to check if a Ray process is runningCOMMENT
LOWludwig/distributed/base.py153 The purpose of this function is to reduce network overhead.STRING
LOW⚡ludwig/encoders/text_encoders.py2531 # Step 1: Prepare quantized base model for training (freeze + cast).COMMENT
LOW⚡ludwig/encoders/text_encoders.py2536 # Step 2: Initialize adapter on quantized base if not already doneCOMMENT
LOW⚡ludwig/encoders/text_encoders.py2540 # Step 3: Load adapter weights from checkpointCOMMENT
LOWludwig/data/preprocessing.py1038 """The purpose of this function is to balance the training dataset using either over-sampling or under-STRING
Structural Annotation Overuse6 hits · 11 pts
SeverityFileLineSnippetContext
LOWludwig/api.py1199 # Step 1: Preprocess the initial lookback window onceCOMMENT
LOWludwig/api.py1230 # Step 2: Incremental prediction loop — O(horizon) steps, each O(1) preprocessingCOMMENT
LOWludwig/api.py1259 # Step 3: Update embeddings incrementally for the next step.COMMENT
LOW⚡ludwig/encoders/text_encoders.py2531 # Step 1: Prepare quantized base model for training (freeze + cast).COMMENT
LOW⚡ludwig/encoders/text_encoders.py2536 # Step 2: Initialize adapter on quantized base if not already doneCOMMENT
LOW⚡ludwig/encoders/text_encoders.py2540 # Step 3: Load adapter weights from checkpointCOMMENT
Fake / Example Data5 hits · 7 pts
SeverityFileLineSnippetContext
LOWtests/ludwig/schema_fields/test_fields_misc.py155 schema_utils.StringOptions(options=["placeholder"], default="placeholder", allow_none=False),CODE
LOW⚡tests/ludwig/schema_fields/test_fields_misc.py166 default="placeholder",CODE
LOW⚡tests/ludwig/schema_fields/test_fields_misc.py170 schema_utils.StringOptions(options=["placeholder"], default="placeholder", allow_none=False),CODE
LOW⚡tests/ludwig/schema_fields/test_fields_misc.py176 assert CustomTestSchema2.model_validate({}).foo == "placeholder"CODE
LOW⚡tests/ludwig/schema_fields/test_fields_misc.py178 assert CustomTestSchema2().foo == "placeholder"CODE
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippetContext
LOWludwig/benchmarking/examples/process_config.py94 # make sure to return the ludwig_configCOMMENT
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOWdocker/build_and_push.sh4# Usage:COMMENT