Repository Analysis

ludwig-ai/ludwig

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

25.4 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of ludwig-ai/ludwig, a Python project with 11,738 GitHub stars. SynthScan v2.0 examined 230,795 lines of code across 1630 source files, recording 3606 pattern matches distributed across 21 syntactic categories. The overall adjusted score of 25.4 places this repository in the Moderate AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

25.4
Adjusted Score
25.4
Raw Score
100%
Time Factor
2026-07-13
Last Push
11.7K
Stars
Python
Language
230.8K
Lines of Code
1.6K
Files
3.6K
Pattern Hits
2026-07-14
Scan Date
0.05
HC Hit Rate

What These Metrics Mean

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

Score History

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

Severity Breakdown

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

CRITICAL 0HIGH 76MEDIUM 824LOW 2706

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 3606 distinct pattern matches across 21 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Decorative Section Separators767 hits · 2580 pts
SeverityFileLineSnippetContext
MEDIUMludwig/experiment_utils.py14# ==============================================================================COMMENT
MEDIUMludwig/api_types.py14# ==============================================================================COMMENT
MEDIUMludwig/collect.py269 # ----------------COMMENT
MEDIUMludwig/collect.py271 # ----------------COMMENT
MEDIUMludwig/collect.py275 # -------------------------COMMENT
MEDIUMludwig/collect.py277 # -------------------------COMMENT
MEDIUMludwig/collect.py282 # ------------------COMMENT
MEDIUMludwig/collect.py284 # ------------------COMMENT
MEDIUMludwig/collect.py287 # ------------------COMMENT
MEDIUMludwig/collect.py289 # ------------------COMMENT
MEDIUMludwig/collect.py351 # ----------------COMMENT
MEDIUMludwig/collect.py353 # ----------------COMMENT
MEDIUMludwig/collect.py357 # -------------------------COMMENT
MEDIUMludwig/collect.py359 # -------------------------COMMENT
MEDIUMludwig/collect.py364 # ------------------COMMENT
MEDIUMludwig/collect.py366 # ------------------COMMENT
MEDIUMludwig/collect.py407 # ----------------COMMENT
MEDIUMludwig/collect.py409 # ----------------COMMENT
MEDIUMludwig/collect.py415 # ------------------COMMENT
MEDIUMludwig/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
MEDIUMludwig/forecast.py96 # ----------------COMMENT
MEDIUMludwig/forecast.py98 # ----------------COMMENT
MEDIUMludwig/forecast.py101 # -------------------------COMMENT
MEDIUMludwig/forecast.py103 # -------------------------COMMENT
MEDIUMludwig/hyperopt_cli.py15# ==============================================================================COMMENT
MEDIUMludwig/hyperopt_cli.py150 # -------------------COMMENT
MEDIUMludwig/hyperopt_cli.py152 # -------------------COMMENT
MEDIUMludwig/hyperopt_cli.py161 # ----------------------------COMMENT
MEDIUMludwig/hyperopt_cli.py163 # ----------------------------COMMENT
MEDIUMludwig/hyperopt_cli.py173 # ---------------COMMENT
MEDIUMludwig/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
MEDIUMludwig/predict.py141 # ----------------COMMENT
MEDIUMludwig/predict.py143 # ----------------COMMENT
707 more matches not shown…
Hyper-Verbose Identifiers1505 hits · 1565 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
LOWludwig/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
LOWludwig/explain/captum.py59def retry_with_halved_batch_size(run_config: ExplanationRunConfig):CODE
LOWludwig/explain/captum.py69 def retry_with_halved_batch_size_fn(fn):CODE
LOWludwig/explain/captum.py70 def retry_with_halved_batch_size_wrapper(*args, **kwargs):CODE
LOWludwig/explain/captum_ray.py177def get_total_attribution_task(CODE
LOWludwig/config_validation/checks.py178def check_class_balance_preprocessing(config: "ModelConfig") -> None:CODE
LOWludwig/config_validation/checks.py188def check_sampling_exclusivity(config: "ModelConfig") -> None:CODE
LOWludwig/config_validation/checks.py197def check_validation_metric_exists(config: "ModelConfig") -> None:CODE
LOWludwig/config_validation/checks.py466def check_llm_finetuning_trainer_config(config: "ModelConfig"):CODE
LOWludwig/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
1445 more matches not shown…
Unused Imports321 hits · 282 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
LOWludwig/config_generation.py19logger = logging.getLogger(__name__)CODE
LOWludwig/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.py26logger = 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
LOWludwig/features/base_feature.py214 def update_config_with_metadata(feature_config, feature_metadata, *args, **kwargs) -> None:CODE
LOWludwig/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
LOWludwig/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…
Deep Nesting185 hits · 166 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.py41CODE
LOWludwig/datasets/archives.py67CODE
LOWludwig/datasets/archives.py90CODE
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
HIGHludwig/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
HIGHtests/ludwig/data/test_split.py81 assert not s1.equals(s2)CODE
HIGHtests/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
LOWludwig/utils/audio_utils.py73 except Exception:CODE
LOWludwig/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
MEDIUMludwig/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 Structure16 hits · 80 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/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.py523Builds a dataset from a dataframe and a list of features. Args: config: A dictionary containing the Ludwig STRING
HIGHludwig/data/preprocessing.py1036The 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.py1071Asserts 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
MEDIUMludwig/config_generation.py28 # Extract just the key parts to fit in context windowCOMMENT
MEDIUMludwig/serve_v2.py159# Model manager (dependency injection)COMMENT
MEDIUMludwig/config_validation/checks.py476 # If performing zero-shot, we must specify pretrained adapter weightsCOMMENT
MEDIUMludwig/config_validation/checks.py676 # If template is NOT provided, then task is required for zero/few shot learning:COMMENT
MEDIUMludwig/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
LOWludwig/collect.py276 # Output results parametersCOMMENT
LOWludwig/collect.py358 # Output results parametersCOMMENT
LOWludwig/forecast.py102 # Output results parametersCOMMENT
LOWludwig/predict.py148 # Output results parametersCOMMENT
LOWludwig/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
LOWludwig/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
LOWludwig/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
LOWludwig/encoders/text_encoders.py2531 # Step 1: Prepare quantized base model for training (freeze + cast).COMMENT
LOWludwig/encoders/text_encoders.py2536 # Step 2: Initialize adapter on quantized base if not already doneCOMMENT
LOWludwig/encoders/text_encoders.py2540 # Step 3: Load adapter weights from checkpointCOMMENT
LOWludwig/data/preprocessing.py1036 """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
LOWludwig/encoders/text_encoders.py2531 # Step 1: Prepare quantized base model for training (freeze + cast).COMMENT
LOWludwig/encoders/text_encoders.py2536 # Step 2: Initialize adapter on quantized base if not already doneCOMMENT
LOWludwig/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
LOWtests/ludwig/schema_fields/test_fields_misc.py166 default="placeholder",CODE
LOWtests/ludwig/schema_fields/test_fields_misc.py170 schema_utils.StringOptions(options=["placeholder"], default="placeholder", allow_none=False),CODE
LOWtests/ludwig/schema_fields/test_fields_misc.py176 assert CustomTestSchema2.model_validate({}).foo == "placeholder"CODE
LOWtests/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