A Python implementation of global optimization with gaussian processes.
This report summarizes scanner evidence for bayesian-optimization/BayesianOptimization, a Python project with 8,720 GitHub stars. SynthScan examined 8,428 lines of code across 39 source files, recording 134 pattern matches distributed across 10 syntactic categories. The legacy adjusted pattern signal is 17.7 (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.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 90 finding(s).
Are imports declared and package/API names verified? 25 finding(s).
Are wrappers, guards, and repeated structures necessary? 100 finding(s).
Which changes need focused human review? 134 finding(s).
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.
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.
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.
The scanner identified 134 distinct pattern matches across 10 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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | bayes_opt/domain_reduction.py | 243 | def _window_bounds_compatibility(self, global_bounds: NDArray[Float]) -> None: | CODE |
| LOW | bayes_opt/acquisition.py | 1221 | def _sample_idx_from_softmax_gains(self, random_state: RandomState) -> int: | CODE |
| LOW | tests/test_parameter.py | 90 | def test_categorical_kernel_transform_preserves_batch_rows(): | CODE |
| LOW | tests/test_parameter.py | 144 | def test_cateogrical_valid_bounds(): | CODE |
| LOW | tests/test_parameter.py | 186 | def test_preconstructed_parameter(): | CODE |
| LOW | tests/test_parameter.py | 202 | def test_integration_mixed_optimization(): | CODE |
| LOW | tests/test_parameter.py | 219 | def test_integration_mixed_optimization_with_constraints(): | CODE |
| LOW | tests/test_parameter.py | 262 | def test_combined_wrapped_kernel_fit(): | CODE |
| LOW⚡ | tests/test_acquisition.py | 110 | def test_acquisition_optimization(gp, target_space): | CODE |
| LOW⚡ | tests/test_acquisition.py | 120 | def test_acquisition_optimization_only_random(gp, target_space, random_state): | CODE |
| LOW⚡ | tests/test_acquisition.py | 406 | def test_upper_confidence_bound_invalid_kappa_error(kappa: float): | CODE |
| LOW⚡ | tests/test_acquisition.py | 412 | def test_upper_confidence_bound_invalid_exploration_decay_error(exploration_decay: float): | CODE |
| LOW⚡ | tests/test_acquisition.py | 420 | def test_upper_confidence_bound_invalid_exploration_decay_delay_error(exploration_decay_delay): | CODE |
| LOW⚡ | tests/test_acquisition.py | 428 | def test_probability_of_improvement_invalid_xi_error(xi: float): | CODE |
| LOW⚡ | tests/test_acquisition.py | 434 | def test_probability_of_improvement_invalid_exploration_decay_error(exploration_decay: float): | CODE |
| LOW⚡ | tests/test_acquisition.py | 442 | def test_probability_of_improvement_invalid_exploration_decay_delay_error(exploration_decay_delay): | CODE |
| LOW⚡ | tests/test_acquisition.py | 450 | def test_expected_improvement_invalid_xi_error(xi: float): | CODE |
| LOW⚡ | tests/test_acquisition.py | 456 | def test_expected_improvement_invalid_exploration_decay_error(exploration_decay: float): | CODE |
| LOW⚡ | tests/test_acquisition.py | 464 | def test_expected_improvement_invalid_exploration_decay_delay_error(exploration_decay_delay): | CODE |
| LOW | tests/test_acquisition.py | 135 | def test_acquisition_optimization_only_l_bfgs_b(gp, target_space): | CODE |
| LOW | tests/test_acquisition.py | 142 | def test_upper_confidence_bound(gp, target_space, random_state): | CODE |
| LOW | tests/test_acquisition.py | 159 | def test_smart_minimize_fails(target_space, random_state): | CODE |
| LOW | tests/test_acquisition.py | 174 | def test_upper_confidence_bound_with_constraints(gp, constrained_target_space): | CODE |
| LOW | tests/test_acquisition.py | 182 | def test_probability_of_improvement(gp, target_space, random_state): | CODE |
| LOW | tests/test_acquisition.py | 203 | def test_probability_of_improvement_with_constraints(gp, constrained_target_space, random_state): | CODE |
| LOW | tests/test_acquisition.py | 220 | def test_expected_improvement(gp, target_space, random_state): | CODE |
| LOW | tests/test_acquisition.py | 241 | def test_expected_improvement_with_constraints(gp, constrained_target_space, random_state): | CODE |
| LOW | tests/test_acquisition.py | 289 | def test_constant_liar_invalid_strategy(): | CODE |
| LOW | tests/test_acquisition.py | 294 | def test_constant_liar_with_constraints(gp, constrained_target_space, random_state): | CODE |
| LOW | tests/test_acquisition.py | 328 | def test_gphedge_update_gains(random_state): | CODE |
| LOW | tests/test_acquisition.py | 352 | def test_gphedge_softmax_sampling(random_state): | CODE |
| LOW | tests/test_acquisition.py | 376 | def test_gphedge_skips_duplicate_candidate_when_unique_candidate_exists(gp, target_space, random_state): | CODE |
| LOW | tests/test_acquisition.py | 519 | def test_integration_acquisition_functions( | CODE |
| LOW | tests/test_acquisition.py | 549 | def test_integration_constrained(target_func_x_and_y, pbounds, constraint, tmp_path): | CODE |
| LOW | tests/test_acquisition.py | 579 | def test_custom_acquisition_without_get_params(): | CODE |
| LOW | tests/test_acquisition.py | 600 | def test_custom_acquisition_without_set_params(): | CODE |
| LOW⚡ | tests/test_bayesian_optimization.py | 190 | def test_prime_queue_all_empty(): | CODE |
| LOW⚡ | tests/test_bayesian_optimization.py | 200 | def test_prime_queue_empty_with_init(): | CODE |
| LOW⚡ | tests/test_bayesian_optimization.py | 210 | def test_prime_queue_with_register(): | CODE |
| LOW | tests/test_bayesian_optimization.py | 101 | def test_register_array_uses_pbounds_order_without_warning(): | CODE |
| LOW | tests/test_bayesian_optimization.py | 112 | def test_probe_array_uses_pbounds_order_without_warning(): | CODE |
| LOW | tests/test_bayesian_optimization.py | 172 | def test_suggest_with_one_observation(): | CODE |
| LOW | tests/test_bayesian_optimization.py | 221 | def test_prime_queue_with_register_and_init(): | CODE |
| LOW | tests/test_bayesian_optimization.py | 285 | def test_define_wrong_transformer(): | CODE |
| LOW | tests/test_bayesian_optimization.py | 292 | def test_single_value_objective(): | CODE |
| LOW | tests/test_bayesian_optimization.py | 371 | def test_save_load_w_categorical_params(tmp_path): | CODE |
| LOW | tests/test_bayesian_optimization.py | 402 | def test_suggest_point_returns_same_point(tmp_path): | CODE |
| LOW | tests/test_bayesian_optimization.py | 419 | def test_save_load_random_state(tmp_path): | CODE |
| LOW | tests/test_bayesian_optimization.py | 441 | def test_save_load_unused_optimizer(tmp_path): | CODE |
| LOW | tests/test_bayesian_optimization.py | 523 | def test_save_load_w_domain_reduction(tmp_path): | CODE |
| LOW | tests/test_bayesian_optimization.py | 560 | def test_save_load_w_custom_parameter(tmp_path): | CODE |
| LOW | tests/test_bayesian_optimization.py | 708 | def test_predict_integer_params(): | CODE |
| LOW | tests/test_bayesian_optimization.py | 745 | def test_predict_categorical_params(): | CODE |
| LOW | tests/test_bayesian_optimization.py | 775 | def test_predict_no_points_registered(): | CODE |
| LOW | tests/test_bayesian_optimization.py | 795 | def test_predict_custom_parameter(): | CODE |
| LOW | tests/test_bayesian_optimization.py | 829 | def test_predict_invalid_params_type(): | CODE |
| LOW | tests/test_bayesian_optimization.py | 849 | def test_predict_return_std_and_cov_mutually_exclusive(): | CODE |
| LOW | tests/test_bayesian_optimization.py | 864 | def test_predict_shape_semantics_dict_vs_list(): | CODE |
| LOW | tests/test_bayesian_optimization.py | 885 | def test_predict_shape_semantics_with_std(): | CODE |
| LOW | tests/test_bayesian_optimization.py | 913 | def test_predict_shape_semantics_with_cov(): | CODE |
| 21 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | bayes_opt/target_space.py | 3 | CODE | |
| LOW | bayes_opt/constraint.py | 3 | CODE | |
| LOW | bayes_opt/exception.py | 3 | CODE | |
| LOW | bayes_opt/domain_reduction.py | 8 | CODE | |
| LOW | bayes_opt/util.py | 3 | CODE | |
| LOW | bayes_opt/bayesian_optimization.py | 7 | CODE | |
| LOW | bayes_opt/__init__.py | 3 | CODE | |
| LOW | bayes_opt/__init__.py | 7 | CODE | |
| LOW | bayes_opt/__init__.py | 8 | CODE | |
| LOW | bayes_opt/__init__.py | 9 | CODE | |
| LOW | bayes_opt/__init__.py | 10 | CODE | |
| LOW | bayes_opt/__init__.py | 11 | CODE | |
| LOW | bayes_opt/__init__.py | 12 | CODE | |
| LOW | bayes_opt/logger.py | 3 | CODE | |
| LOW | bayes_opt/acquisition.py | 21 | CODE | |
| LOW | bayes_opt/parameter.py | 3 | CODE | |
| LOW | tests/test_notebooks_run.py | 5 | CODE | |
| LOW | tests/test_parameter.py | 1 | CODE | |
| LOW | tests/test_util.py | 1 | CODE | |
| LOW | tests/test_acquisition.py | 1 | CODE | |
| LOW | tests/test_bayesian_optimization.py | 1 | CODE | |
| LOW | tests/test_target_space.py | 1 | CODE | |
| LOW | tests/test_constraint.py | 1 | CODE | |
| LOW | tests/test_logger.py | 1 | CODE | |
| LOW | tests/test_seq_domain_red.py | 1 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | README.md | 0 | function with unknown internals we wish to maximize. this is just serving as an example, however, for all intents and pu | STRING |
| HIGH | tests/test_seq_domain_red.py | 0 | function with unknown internals we wish to maximize. this is just serving as an example, however, for all intents and pu | STRING |
| HIGH | examples/async_optimization.py | 0 | function with unknown internals we wish to maximize. this is just serving as an example, however, for all intents and pu | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | bayes_opt/target_space.py | 687 | def set_bounds(self, new_bounds: BoundsMapping) -> None: | CODE |
| LOW | bayes_opt/exception.py | 5 | __all__ = [ | CODE |
| LOW | bayes_opt/bayesian_optimization.py | 393 | def set_bounds(self, new_bounds: BoundsMapping) -> None: | STRING |
| LOW | bayes_opt/bayesian_optimization.py | 403 | def set_gp_params(self, **params: Any) -> None: | STRING |
| LOW | bayes_opt/__init__.py | 17 | __all__ = [ | CODE |
| LOW | bayes_opt/logger.py | 226 | def _update_tracker(self, current_max: dict[str, Any] | None) -> None: | CODE |
| LOW | bayes_opt/acquisition.py | 102 | def set_acquisition_params(self, params: dict[str, Any]) -> None: | CODE |
| LOW | bayes_opt/acquisition.py | 570 | def set_acquisition_params(self, params: dict[str, Any]) -> None: | STRING |
| LOW | bayes_opt/acquisition.py | 750 | def set_acquisition_params(self, params: dict[str, Any]) -> None: | STRING |
| LOW | bayes_opt/acquisition.py | 939 | def set_acquisition_params(self, params: dict[str, Any]) -> None: | STRING |
| LOW | bayes_opt/acquisition.py | 1166 | def set_acquisition_params(self, params: dict[str, Any]) -> None: | STRING |
| LOW | bayes_opt/acquisition.py | 1238 | def _update_gains(self, gp: GaussianProcessRegressor) -> None: | CODE |
| LOW | bayes_opt/acquisition.py | 1346 | def set_acquisition_params(self, params: dict[str, Any]) -> None: | CODE |
| LOW⚡ | tests/test_acquisition.py | 106 | def set_acquisition_params(self, params: dict) -> None: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | bayes_opt/acquisition.py | 390 | # Check if success | COMMENT |
| LOW | bayes_opt/acquisition.py | 1110 | # Check if any dummies have been evaluated and remove them | STRING |
| LOW | tests/test_logger.py | 179 | # Check if header contains expected column names | COMMENT |
| LOW | tests/test_logger.py | 185 | # Check if divider line is included | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | examples/async_optimization.py | 53 | except KeyError: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | bayes_opt/acquisition.py | 1113 | # Create a copy of the target space | STRING |
| MEDIUM | examples/typed_hyperparameter_tuning.py | 16 | # Define the hyperparameter space | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | bayes_opt/target_space.py | 237 | CODE | |
| LOW | bayes_opt/acquisition.py | 1058 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docsrc/conf.py | 1 | # Configuration file for the Sphinx documentation builder. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_bayesian_optimization.py | 335 | except Exception as e: | CODE |