AI Slop Code RIsk Monitor

dmlc/xgboost

Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT or GBM) Library, for Python, R, Java, Scala, C and more. Runs on single machine, Hadoop, Spark, Dask, Flink and DataFlow

7.1 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for dmlc/xgboost, a C++ project with 28,847 GitHub stars. SynthScan examined 144,722 lines of code across 757 source files, recording 862 pattern matches distributed across 19 syntactic categories. The legacy adjusted pattern signal is 7.1 (Moderate 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.

7.1
Adjusted Signal
7.1
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
28.8K
Stars
C++
Language
144.7K
Lines of Code
757
Files
862
Pattern Hits
2026-10-12
Scan Date
0.04
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 23.1/100 · LOW

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

Hallucinated Dependency & Supply Chain Risk 4.1/100 · LOW

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

Agent Over-Engineering Ratio 15.7/100 · LOW

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

PR Review Velocity Impact 30.3/100 · MEDIUM

Which changes need focused human review? 862 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 4HIGH 23MEDIUM 15LOW 820

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 862 distinct pattern matches across 19 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers308 hits · 328 pts
SeverityFileLineSnippetContext
LOWdemo/dask/gpu_training.py42def using_quantile_device_dmatrix(client: Client, X: da.Array, y: da.Array) -> da.Array:CODE
LOWdemo/dask/dask_callbacks.py18def probability_for_going_backward(epoch: int) -> float:CODE
LOWdemo/guide-python/continuation.py50def training_continuation_early_stop(tmpdir: str, use_pickle: bool) -> None:CODE
LOWdemo/guide-python/prediction_intervals.py139def plot_prediction_intervals(CODE
LOWtests/python/test_ordinal.py34def test_cat_container_model_slice() -> None:CODE
LOWtests/python/test_ordinal.py57def test_pd_cat_nullable_integer(CODE
LOWtests/python/test_ordinal.py78def test_pd_cat_nullable_float() -> None:CODE
LOWtests/python/test_ordinal.py131def test_training_continuation() -> None:CODE
LOWtests/python/test_ordinal.py139def test_recode_dmatrix_predict() -> None:CODE
LOWtests/python/test_training_continuation.py38 def run_training_continuation(CODE
LOWtests/python/test_training_continuation.py135 def test_training_continuation_json(self, tmp_path: Path) -> None:CODE
LOWtests/python/test_training_continuation.py140 def test_training_continuation_updaters_json(self, tmp_path: Path) -> None:CODE
LOWtests/python/test_training_continuation.py175def test_continuation_determinism(kwargs: Any) -> None:CODE
LOWtests/python/test_basic.py201 def test_dmatrix_numpy_init_omp(self):CODE
LOWtests/python/test_basic.py237 def test_cv_explicit_fold_indices(self):CODE
LOWtests/python/test_basic.py251 def test_cv_explicit_fold_indices_labels(self):CODE
LOWtests/python/test_basic.py333def test_parse_eval_str_nonfinite() -> None:CODE
LOWtests/python/test_early_stopping.py15 def test_early_stopping_nonparallel(self):CODE
LOWtests/python/test_early_stopping.py122 def test_cv_early_stopping_with_multiple_eval_sets_and_metrics(self):CODE
LOWtests/python/test_with_arrow.py39 def test_arrow_table_with_custom_feature_names(self, DMatrixT):CODE
LOWtests/python/test_with_arrow.py48 def test_arrow_table_with_label(self):CODE
LOWtests/python/test_with_arrow.py100 def test_arrow_unsupported_dtype(self, DMatrixT):CODE
LOWtests/python/test_plotting.py105 def test_importance_plot_show_values(self) -> None:CODE
LOWtests/python/test_data_iterator.py338def test_categorical_extmem_qdm(CODE
LOW⚡tests/python/test_interaction_constraints.py11 def test_exact_interaction_constraints(self) -> None:CODE
LOW⚡tests/python/test_interaction_constraints.py14 def test_hist_interaction_constraints(self) -> None:CODE
LOW⚡tests/python/test_interaction_constraints.py17 def test_approx_interaction_constraints(self) -> None:CODE
LOW⚡tests/python/test_interaction_constraints.py20 def test_hist_multi_interaction_constraints(self) -> None:CODE
LOW⚡tests/python/test_interaction_constraints.py23 def test_interaction_constraints_feature_names(self) -> None:CODE
LOWtests/python/test_interaction_constraints.py60 def test_hist_training_accuracy(self, tree_method: str) -> None:CODE
LOWtests/python/test_model_io.py105 def test_categorical_model_io(self, tmp_path: Path) -> None:CODE
LOWtests/python/test_model_io.py342def test_with_sklearn_obj_metric(tmp_path: Path) -> None:CODE
LOWtests/python/test_tree_regularization.py70 def test_absolute_error_lambda(self):CODE
LOWtests/python/test_tree_regularization.py94 def test_quantile_error_lambda(self):CODE
LOWtests/python/generate_models.py38def generate_regression_model() -> None:CODE
LOWtests/python/generate_models.py108def generate_classification_model() -> None:CODE
LOWtests/python/generate_models.py179def generate_aft_survival_models() -> None:CODE
LOWtests/python/test_callback.py127 def test_early_stopping_custom_eval(self, breast_cancer: BreastCancer) -> None:CODE
LOWtests/python/test_callback.py147 def test_early_stopping_customize(self, breast_cancer: BreastCancer) -> None:CODE
LOWtests/python/test_callback.py209 def test_early_stopping_custom_eval_skl(self, breast_cancer: BreastCancer) -> None:CODE
LOWtests/python/test_callback.py221 def test_early_stopping_save_best_model(self, breast_cancer: BreastCancer) -> None:CODE
LOWtests/python/test_callback.py261 def test_early_stopping_continuation(CODE
LOWtests/python/test_callback.py295 def test_early_stopping_multiple_metrics(self):CODE
LOWtests/python/test_callback.py317 def test_eta_decay_leaf_output(self, tree_method: str, objective: str) -> None:CODE
LOWtests/python/test_basic_models.py105 def test_boost_from_prediction(self):CODE
LOWtests/python/test_basic_models.py120 def test_boost_from_existing_model(self) -> None:CODE
LOWtests/python/test_basic_models.py239 def test_feature_names_validation(self):CODE
LOWtests/python/test_basic_models.py255 def test_special_model_dump_characters(self) -> None:CODE
LOWtests/python/test_survival.py58def test_aft_survival_toy_data(CODE
LOWtests/python/test_survival.py137def test_aft_survival_demo_data():CODE
LOWtests/python/test_dmatrix.py67 def test_dmatrix_numpy_masked_array(self, dtype):CODE
LOWtests/python/test_dmatrix.py86 def test_dmatrix_numpy_non_native_byte_order(self):CODE
LOWtests/python/test_predict.py17def test_inplace_predict_masked_array() -> None:CODE
LOWtests/python/test_predict.py90def test_base_margin_vs_base_score() -> None:CODE
LOWtests/python/test_ranking.py94def test_ranking_with_unweighted_data():CODE
LOWtests/python/test_ranking.py128def test_ranking_with_weighted_data():CODE
LOWtests/python/test_ranking.py185def test_lambdarank_parameters(params):CODE
LOWtests/python/test_multi_target.py54def test_shap_multi_output_tree() -> None:CODE
LOWtests/python/test_multi_target.py140def test_normal_distribution_constant_label(multi_strategy: str) -> None:CODE
LOWtests/python/test_multi_target.py175def test_normal_extreme_initial_variance(CODE
248 more matches not shown…
Over-Commented Block327 hits · 306 pts
SeverityFileLineSnippetContext
LOWdemo/kaggle-higgs/speedtest.R41 nrounds <- 120COMMENT
LOWdemo/kaggle-higgs/speedtest.R61# 111.682 0.777 35.963COMMENT
LOWdemo/guide-python/generalized_linear_model.py21# change booster to gblinear, so that we are fitting a linear modelCOMMENT
LOWR-package/R/xgb.DMatrix.save.R1#' Save xgb.DMatrix object to binary fileCOMMENT
LOWR-package/R/xgb.plot.multi.trees.R1#' Project all trees on one treeCOMMENT
LOWR-package/R/xgb.plot.multi.trees.R21#'COMMENT
LOWR-package/R/xgb.plot.multi.trees.R41#' nrounds = 30,COMMENT
LOWR-package/R/xgb.plot.deepness.R1#' Plot model tree depthCOMMENT
LOWR-package/R/xgb.plot.deepness.R21#' Those could be helpful in determining sensible ranges of the `max_depth`COMMENT
LOWR-package/R/xgb.plot.deepness.R41#'COMMENT
LOWR-package/R/xgb.plot.deepness.R61#' xgb.plot.deepness(model)COMMENT
LOWR-package/R/utils.R381COMMENT
LOWR-package/R/utils.R421#' for objects produced by [xgboost()]), outside of its core components, might also keep:COMMENT
LOWR-package/R/utils.R441#' not used for prediction / importance / plotting / etc.COMMENT
LOWR-package/R/utils.R461#' preferred for long-term storage.COMMENT
LOWR-package/R/utils.R481#'COMMENT
LOWR-package/R/utils.R501#' xgb.save(bst, fname)COMMENT
LOWR-package/R/utils.R521#' obj2 <- readRDS(fname)COMMENT
LOWR-package/R/utils.R541#' that code calling xgboost will still work once those are removed in future releases.COMMENT
LOWR-package/R/xgb.plot.importance.R1#' Plot feature importanceCOMMENT
LOWR-package/R/xgb.plot.importance.R21#'COMMENT
LOWR-package/R/xgb.plot.importance.R41#' - `xgb.ggplot.importance()`: A customizable "ggplot" object.COMMENT
LOWR-package/R/xgb.plot.importance.R61#' xgb.plot.importance(COMMENT
LOWR-package/R/xgb.plot.importance.R141# Avoid error messages during CRAN check.COMMENT
LOWR-package/R/xgb.save.raw.R1#' Save XGBoost model to R's raw vectorCOMMENT
LOWR-package/R/xgb.save.raw.R21#' train <- agaricus.trainCOMMENT
LOWR-package/R/xgb.plot.shap.R1#' SHAP dependence plotsCOMMENT
LOWR-package/R/xgb.plot.shap.R21#' The default (`NULL`) will use up to 100k data points.COMMENT
LOWR-package/R/xgb.plot.shap.R41#' If `FALSE`, only a list of matrices is returned.COMMENT
LOWR-package/R/xgb.plot.shap.R61#' a meaningful thing to do.COMMENT
LOWR-package/R/xgb.plot.shap.R81#' data.table::setDTthreads(nthread)COMMENT
LOWR-package/R/xgb.plot.shap.R101#'COMMENT
LOWR-package/R/xgb.plot.shap.R121#' model = model_multiclass,COMMENT
LOWR-package/R/xgb.plot.shap.R141#' )COMMENT
LOWR-package/R/xgb.plot.shap.R241#' Visualizes SHAP contributions of different features.COMMENT
LOWR-package/R/xgb.plot.shap.R261#' and the Python library <https://github.com/shap/shap>.COMMENT
LOWR-package/R/xgboost.R821 if (is.na(early_stopping_rounds) || early_stopping_rounds <= 0L) {COMMENT
LOWR-package/R/xgboost.R841#'COMMENT
LOWR-package/R/xgboost.R861#' For package authors using 'xgboost' as a dependency, it is highly recommended to useCOMMENT
LOWR-package/R/xgboost.R881#' Note that categorical features are only supported for `data.frame` inputs, and are automaticallyCOMMENT
LOWR-package/R/xgboost.R901#' set as the last level.COMMENT
LOWR-package/R/xgboost.R921#' prediction type (e.g. `multi:softmax` vs. `multi:softprob`) are not allowed, and neither areCOMMENT
LOWR-package/R/xgboost.R941#' - `"reg:tweedie"`: Tweedie regression with log-link. It might be useful, e.g., for modeling total loss in insurance, COMMENT
LOWR-package/R/xgboost.R961#' @param monitor_training Whether to monitor objective optimization progress on the input data.COMMENT
LOWR-package/R/xgboost.R981#' if there is no improvement in performance (as measured by the last metric passed underCOMMENT
LOWR-package/R/xgboost.R1001#' a monotonically increasing function of that feature (that is, as the value of the featureCOMMENT
LOWR-package/R/xgboost.R1021#' @param feature_weights Feature weights for column sampling.COMMENT
LOWR-package/R/xgboost.R1041#' the corresponding `y` - `base_margin` should have the same column order that the model will useCOMMENT
LOWR-package/R/xgboost.R1061#' - L2 regularization term on weights. Increasing this value will make model more conservative. Normalised to number COMMENT
LOWR-package/R/xgboost.R1081#' data(mtcars)COMMENT
LOWR-package/R/xgboost.R1101#' # Can calculate evaluation metrics during boosting roundsCOMMENT
LOWR-package/R/xgboost.R1241#' @title Compute predictions from XGBoost model on new dataCOMMENT
LOWR-package/R/xgboost.R1261#' matched by name by default (see `validate_features`).COMMENT
LOWR-package/R/xgboost.R1281#' untransformed margin (e.g., for binary classification, the values are log-odds deviations fromCOMMENT
LOWR-package/R/xgboost.R1301#' (for objectives which produces a single score per observation), or a matrix with number ofCOMMENT
LOWR-package/R/xgboost.R1321#' and come in the same order as in the training data.COMMENT
LOWR-package/R/xgboost.R1541 "\n",COMMENT
LOWR-package/R/xgboost.R1561#'COMMENT
LOWR-package/R/xgboost.R1581#' - `data`: A sparse Matrix of 'dgCMatrix' class with 126 columns.COMMENT
LOWR-package/R/xgboost.R1601#' @importFrom data.table data.tableCOMMENT
267 more matches not shown…
Empty Error Handlers17 hits · 85 pts
SeverityFileLineSnippetContext
HIGHtests/python/test_plotting.py14except ImportError:CODE
HIGHtests/python/test_with_pandas.py14except ImportError:CODE
HIGHtests/python/test_with_modin.py12except ImportError:CODE
HIGHtests/test_distributed/test_with_dask/test_with_dask.py1275except (ValueError, KilledWorker):CODE
HIGHpython-package/xgboost/collective.py254except TypeError: # float128 doesn't exist on the systemCODE
HIGHpython-package/xgboost/collective.py368except ImportError:CODE
HIGHpython-package/xgboost/__init__.py34except ImportError:CODE
HIGHpython-package/xgboost/sklearn.py1301except TypeError: # `QuantileDMatrix` supports lesser types than DMatrixCODE
HIGHpython-package/xgboost/sklearn.py1491except TypeError:CODE
HIGHpython-package/xgboost/training.py618except ImportError:CODE
HIGHpython-package/xgboost/data.py121except ImportError:CODE
HIGHpython-package/xgboost/data.py127except ImportError:CODE
HIGHpython-package/xgboost/data.py193except ImportError:CODE
HIGHpython-package/xgboost/data.py199except ImportError:CODE
HIGHpython-package/xgboost/data.py239except ImportError:CODE
HIGHpython-package/xgboost/data.py245except ImportError:CODE
HIGHpython-package/xgboost/testing/__init__.py90except OSError:CODE
Unused Imports69 hits · 65 pts
SeverityFileLineSnippetContext
LOWdemo/multiclass_classification/train.py3CODE
LOWdemo/dask/dask_learning_to_rank.py16CODE
LOWdemo/guide-python/cat_in_the_dat.py24CODE
LOWdemo/guide-python/learning_to_rank.py19CODE
LOWtests/test_distributed/test_with_spark/test_spark.py6CODE
LOWtests/test_distributed/test_gpu_with_dask/conftest.py21CODE
LOWtests/test_distributed/test_with_dask/conftest.py3CODE
LOWtests/test_distributed/test_with_dask/test_with_dask.py2048CODE
LOWtests/test_distributed/test_with_dask/test_with_dask.py2139CODE
LOWtests/python-gpu/test_gpu_multi_target.py4CODE
LOWtests/python-sycl/test_sycl_with_sklearn.py1CODE
LOWtests/python-sycl/test_sycl_prediction.py1CODE
LOWtests/python-sycl/test_sycl_prediction.py6CODE
LOWtests/python-sycl/test_sycl_updaters.py1CODE
LOWtests/python-sycl/test_sycl_updaters.py3CODE
LOWtests/python-sycl/test_sycl_updaters.py5CODE
LOWtests/python-sycl/test_sycl_updaters.py6CODE
LOWtests/python-sycl/test_sycl_updaters.py7CODE
LOWpython-package/xgboost/objective.py28CODE
LOWpython-package/xgboost/compat.py4CODE
LOWpython-package/xgboost/compat.py41CODE
LOWpython-package/xgboost/compat.py42CODE
LOWpython-package/xgboost/compat.py43CODE
LOWpython-package/xgboost/_typing.py33CODE
LOWpython-package/xgboost/__init__.py6CODE
LOWpython-package/xgboost/__init__.py6CODE
LOWpython-package/xgboost/__init__.py6CODE
LOWpython-package/xgboost/__init__.py12CODE
LOWpython-package/xgboost/__init__.py12CODE
LOWpython-package/xgboost/__init__.py12CODE
LOWpython-package/xgboost/__init__.py12CODE
LOWpython-package/xgboost/__init__.py12CODE
LOWpython-package/xgboost/__init__.py12CODE
LOWpython-package/xgboost/__init__.py20CODE
LOWpython-package/xgboost/__init__.py21CODE
LOWpython-package/xgboost/__init__.py21CODE
LOWpython-package/xgboost/__init__.py24CODE
LOWpython-package/xgboost/__init__.py24CODE
LOWpython-package/xgboost/__init__.py24CODE
LOWpython-package/xgboost/__init__.py25CODE
LOWpython-package/xgboost/__init__.py25CODE
LOWpython-package/xgboost/__init__.py25CODE
LOWpython-package/xgboost/__init__.py26CODE
LOWpython-package/xgboost/__init__.py26CODE
LOWpython-package/xgboost/__init__.py26CODE
LOWpython-package/xgboost/__init__.py26CODE
LOWpython-package/xgboost/__init__.py26CODE
LOWpython-package/xgboost/__init__.py26CODE
LOWpython-package/xgboost/core.py5CODE
LOWpython-package/xgboost/training.py42CODE
LOWpython-package/xgboost/data.py83CODE
LOWpython-package/xgboost/data.py84CODE
LOWpython-package/xgboost/data.py85CODE
LOWpython-package/xgboost/data.py87CODE
LOWpython-package/xgboost/data.py87CODE
LOWpython-package/xgboost/_data_utils.py41CODE
LOWpython-package/xgboost/dask/utils.py8CODE
LOWpython-package/xgboost/testing/__init__.py52CODE
LOWpython-package/xgboost/testing/__init__.py52CODE
LOWpython-package/xgboost/testing/dask.py3CODE
9 more matches not shown…
Hallucination Indicators4 hits · 45 pts
SeverityFileLineSnippetContext
CRITICALR-package/tests/testthat/test_dmatrix.R674 expect_equal(xgb.get.DMatrix.num.non.missing(dm1), 10)CODE
CRITICALR-package/tests/testthat/test_dmatrix.R679 expect_equal(xgb.get.DMatrix.num.non.missing(dm2), 8)CODE
CRITICALpython-package/xgboost/data.py497 # pandas.core.internals.managers.SingleBlockManager.array_values()COMMENT
CRITICAL…rc/main/java/ml/dmlc/xgboost4j/java/flink/XGBoost.java170 return new XGBoostModel(ml.dmlc.xgboost4j.java.XGBoost.loadModel(opened));CODE
Deep Nesting40 hits · 38 pts
SeverityFileLineSnippetContext
LOWdemo/guide-python/model_parser.py146CODE
LOWtests/python/test_model_compatibility.py30CODE
LOWtests/python/test_model_compatibility.py77CODE
LOWtests/python/test_shap.py12CODE
LOWtests/python/test_shap.py81CODE
LOWtests/python/test_tracker.py224CODE
LOWtests/python/test_tracker.py258CODE
LOWtests/python/test_tracker.py229CODE
LOWtests/python/test_tracker.py270CODE
LOWtests/test_distributed/test_with_dask/test_with_dask.py1810CODE
LOWtests/python-sycl/test_sycl_updaters.py64CODE
LOWtests/python-sycl/test_sycl_training_continuation.py11CODE
LOWtests/python-sycl/test_sycl_training_continuation.py31CODE
LOWpython-package/xgboost/callback.py558CODE
LOWpython-package/xgboost/callback.py637CODE
LOWpython-package/xgboost/core.py2371CODE
LOWpython-package/xgboost/core.py3134CODE
LOWpython-package/xgboost/libpath.py19CODE
LOWpython-package/xgboost/sklearn.py1238CODE
LOWpython-package/xgboost/sklearn.py1434CODE
LOWpython-package/xgboost/sklearn.py1856CODE
LOWpython-package/xgboost/data.py366CODE
LOWpython-package/xgboost/data.py530CODE
LOWpython-package/xgboost/data.py1058CODE
LOWpython-package/xgboost/dask/__init__.py1008CODE
LOWpython-package/xgboost/dask/__init__.py1536CODE
LOWpython-package/xgboost/dask/__init__.py1966CODE
LOWpython-package/xgboost/testing/ordinal.py125CODE
LOWpython-package/xgboost/testing/ordinal.py136CODE
LOWpython-package/xgboost/testing/continuation.py17CODE
LOWpython-package/xgboost/testing/continuation.py41CODE
LOWpython-package/xgboost/testing/shared.py55CODE
LOWpython-package/xgboost/spark/core.py1393CODE
LOWpython-package/xgboost/spark/core.py1419CODE
LOWpython-package/xgboost/spark/data.py190CODE
LOWpython-package/xgboost/spark/data.py229CODE
LOWdoc/conf.py65CODE
LOWops/script/lint_cpp.py13CODE
LOWops/script/lint_cpp.py135CODE
LOWops/script/change_scala_version.py7CODE
AI Structural Patterns33 hits · 30 pts
SeverityFileLineSnippetContext
LOWtests/python/test_parse_tree.py35CODE
LOWtests/python-sycl/test_sycl_simple_dask.py17CODE
LOWpython-package/xgboost/callback.py270CODE
LOWpython-package/xgboost/collective.py135CODE
LOWpython-package/xgboost/collective.py147CODE
LOWpython-package/xgboost/plotting.py21CODE
LOWpython-package/xgboost/plotting.py154CODE
LOWpython-package/xgboost/core.py691CODE
LOWpython-package/xgboost/core.py897CODE
LOWpython-package/xgboost/core.py946CODE
LOWpython-package/xgboost/core.py1139CODE
LOWpython-package/xgboost/core.py1511CODE
LOWpython-package/xgboost/core.py2022CODE
LOWpython-package/xgboost/core.py2456CODE
LOWpython-package/xgboost/core.py3049CODE
LOWpython-package/xgboost/sklearn.py871CODE
LOWpython-package/xgboost/sklearn.py2193CODE
LOWpython-package/xgboost/training.py53CODE
LOWpython-package/xgboost/training.py435CODE
LOWpython-package/xgboost/training.py253CODE
LOWpython-package/xgboost/data.py1214CODE
LOWpython-package/xgboost/dask/__init__.py245CODE
LOWpython-package/xgboost/dask/__init__.py570CODE
LOWpython-package/xgboost/dask/__init__.py810CODE
LOWpython-package/xgboost/dask/__init__.py1187CODE
LOWpython-package/xgboost/dask/__init__.py285CODE
LOWpython-package/xgboost/dask/__init__.py580CODE
LOWpython-package/xgboost/dask/__init__.py1966CODE
LOWpython-package/xgboost/dask/data.py206CODE
LOWpython-package/xgboost/testing/data.py884CODE
LOWpython-package/xgboost/spark/estimator.py195CODE
LOWpython-package/xgboost/spark/estimator.py372CODE
LOWpython-package/xgboost/spark/estimator.py561CODE
AI Slop Vocabulary11 hits · 24 pts
SeverityFileLineSnippetContext
LOWdemo/rmm_plugin/rmm_mgpu_with_dask.py44 # To use RMM pool allocator with a GPU Dask cluster, just add rmm_pool_size optionCOMMENT
MEDIUMdemo/guide-python/custom_softmax.py72 # suitable for demo. Also the one in native XGBoost core is more robust toCOMMENT
MEDIUMpython-package/xgboost/config.py58 # Show all messages, including ones pertaining to debuggingCOMMENT
LOWpython-package/xgboost/sklearn.py1874 # If output_margin is active, simply return the scoresSTRING
MEDIUMpython-package/xgboost/dask/__init__.py672# dask paradigm. But as a side effect, the `evals_result` in single-node APICOMMENT
MEDIUMpython-package/xgboost/testing/__init__.py646 """Reassign stdout temporarily in order to test printed statementsSTRING
MEDIUMpython-package/xgboost/spark/core.py962 # Spark-rapids is a project to leverage GPUs to accelerate spark SQL.COMMENT
LOWpython-package/xgboost/spark/core.py696 # For now, since we cannot call rdd.getNumPartitions(), we just returnCOMMENT
LOWpython-package/xgboost/spark/core.py1382 # User don't set gpu configurations, just use cpuCOMMENT
MEDIUM…main/scala/ml/dmlc/xgboost4j/scala/spark/XGBoost.scala144 // that utilize GPUs alongside training tasks in order to avoid GPU out-of-memory errors.COMMENT
MEDIUMsrc/common/cuda_pinned_allocator.h72// This is actually a pinned memory allocator in disguise. We utilize HMM or ATS forCOMMENT
Modern Structural Boilerplate21 hits · 21 pts
SeverityFileLineSnippetContext
LOWpython-package/xgboost/callback.py37__all__ = [CODE
LOWpython-package/xgboost/interpret.py127__all__ = ["shap_values"]CODE
LOWpython-package/xgboost/config.py127def set_config(**new_config: Any) -> None:STRING
LOWpython-package/xgboost/__init__.py41__all__ = [CODE
LOWpython-package/xgboost/core.py970 def set_float_info(self, field: str, data: ArrayLike) -> None:CODE
LOWpython-package/xgboost/core.py985 def set_float_info_npy2d(self, field: str, data: ArrayLike) -> None:CODE
LOWpython-package/xgboost/core.py1001 def set_uint_info(self, field: str, data: ArrayLike) -> None:CODE
LOWpython-package/xgboost/core.py1032 def set_label(self, label: ArrayLike) -> None:CODE
LOWpython-package/xgboost/core.py1044 def set_weight(self, weight: ArrayLike) -> None:CODE
LOWpython-package/xgboost/core.py1064 def set_base_margin(self, margin: ArrayLike) -> None:CODE
LOWpython-package/xgboost/core.py1082 def set_group(self, group: ArrayLike) -> None:CODE
LOWpython-package/xgboost/core.py1850 def _set_params(self, params: List[Tuple[str, str]]) -> None:CODE
LOWpython-package/xgboost/core.py2102 def set_attr(self, **kwargs: Optional[Any]) -> None:CODE
LOWpython-package/xgboost/core.py2132 def _set_feature_info(self, features: Optional[FeatureInfo], field: str) -> None:CODE
LOWpython-package/xgboost/sklearn.py1305 def _set_evaluation_result(self, evals_result: EvalsLog) -> None:CODE
LOWpython-package/xgboost/dask/__init__.py127__all__ = [CODE
LOWpython-package/xgboost/spark/__init__.py17__all__ = [CODE
LOW⚡python-package/xgboost/spark/core.py372 def _set_predict_params_default(self) -> None:CODE
LOWpython-package/xgboost/spark/core.py312 def _set_xgb_params_default(self) -> None:CODE
LOWpython-package/xgboost/spark/core.py348 def _set_fit_params_default(self) -> None:CODE
LOWpython-package/xgboost/spark/estimator.py41 def set_param_attrs(attr_name: str, param: Param) -> None:CODE
Self-Referential Comments5 hits · 15 pts
SeverityFileLineSnippetContext
MEDIUMdemo/guide-python/cat_pipeline.py66 # Create an encoder based on training data.COMMENT
MEDIUMR-package/R/utils.R2# This file is for the low level reusable utility functionsCOMMENT
MEDIUMtests/python-gpu/test_gpu_prediction.py267 # Create a wide datasetCOMMENT
MEDIUMpython-package/xgboost/dask/data.py434 # Create the training DMatrixCOMMENT
MEDIUMpython-package/xgboost/testing/data.py180 # Create a dictionary-backed dataframe, enable this when the roundtrip isCOMMENT
Cross-File Repetition3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHdemo/guide-python/quantile_data_iterator.py0utility function for obtaining current batch of data.STRING
HIGHtests/python-gpu/test_from_cudf.py0utility function for obtaining current batch of data.STRING
HIGHpython-package/xgboost/dask/data.py0utility function for obtaining current batch of data.STRING
Cross-Language Confusion2 hits · 12 pts
SeverityFileLineSnippetContext
HIGHtests/python/test_with_pandas.py400 assert df.equals(copy)CODE
HIGHpython-package/xgboost/testing/data.py200 # assert pd_catcodes.equals(pa_catcodes)COMMENT
Excessive Try-Catch Wrapping10 hits · 10 pts
SeverityFileLineSnippetContext
LOWdemo/guide-python/distributed_extmem_basic.py188 except Exception as e:CODE
LOWtests/python/test_with_shap.py9except Exception:CODE
LOWtests/python/test_openmp.py48 except Exception as e:CODE
LOWpython-package/xgboost/core.py409 except Exception as e: # pylint: disable=broad-exceptCODE
LOWpython-package/xgboost/data.py1306 except Exception: # pylint: disable=broad-exceptCODE
LOWpython-package/xgboost/dask/__init__.py659 except Exception: # pylint: disable=broad-exceptCODE
LOWpython-package/xgboost/testing/__init__.py186 except Exception: # pylint: disable=broad-exceptCODE
LOWpython-package/xgboost/testing/__init__.py741 except Exception as e: # pylint: disable=broad-exceptCODE
LOWpython-package/xgboost/spark/core.py1695 except Exception as e: # pylint: disable=W0703CODE
LOWops/script/change_version.py146 except Exception as e:STRING
AI Response Leakage1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHR-package/R/xgb.DMatrix.R666#' # In this example, batches are obtained by subsetting the 'x' variable.COMMENT
Decorative Section Separators2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMpython-package/CMakeLists.txt21# ---------------------------------------------------------------------------COMMENT
MEDIUMpython-package/CMakeLists.txt23# ---------------------------------------------------------------------------COMMENT
Redundant / Tautological Comments4 hits · 6 pts
SeverityFileLineSnippetContext
LOWR-package/tests/testthat/test_ranking.R25 # Check if the metric is monotone increasingCOMMENT
LOWR-package/tests/testthat/test_ranking.R53 # Check if the metric is monotone increasingCOMMENT
LOWR-package/tests/testthat/test_ranking.R63 all(diff(z) <= 0) # Check if z is monotone decreasingCODE
LOWjvm-packages/create_jni.py80 # Set GPU_ARCH_FLAG to override the CUDA architectures.COMMENT
Slop Phrases1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMdemo/guide-python/sklearn_evals_result.py25# Or you can use: clf = xgb.XGBClassifier(**param_dist)COMMENT
Verbosity Indicators2 hits · 3 pts
SeverityFileLineSnippetContext
LOWR-package/R/xgb.train.R420#' The purpose of this function is to enable IDE autocompletions and to provide in-packageCOMMENT
LOWpython-package/xgboost/spark/core.py1283 # all the columns specified by features_cols, so we need to check ifCOMMENT
Example Usage Blocks2 hits · 3 pts
SeverityFileLineSnippetContext
LOWops/pipeline/build-cuda.sh5## Usage:COMMENT
LOWops/pipeline/test-python-wheel.sh4## Usage:COMMENT