AI Slop Code RIsk Monitor

optuna/optuna

A hyperparameter optimization framework

30.5 High pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for optuna/optuna, a Python project with 14,905 GitHub stars. SynthScan examined 72,855 lines of code across 414 source files, recording 1856 pattern matches distributed across 19 syntactic categories. The legacy adjusted pattern signal is 30.5 (High 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.

30.5
Adjusted Signal
30.5
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
14.9K
Stars
Python
Language
72.9K
Lines of Code
414
Files
1.9K
Pattern Hits
2026-10-12
Scan Date
0.09
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 60.0/100 · HIGH

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

Hallucinated Dependency & Supply Chain Risk 29.8/100 · MEDIUM

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

Agent Over-Engineering Ratio 60.1/100 · HIGH

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

PR Review Velocity Impact 78.4/100 · CRITICAL

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

What These Metrics Mean

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

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 39MEDIUM 90LOW 1727

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 1856 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 Identifiers962 hits · 944 pts
SeverityFileLineSnippetContext
LOWtutorial/20_recipes/005_user_defined_sampler.py96 def infer_relative_search_space(self, study, trial):CODE
LOWtests/test_transform.py28def test_search_space_transform_shapes_dtypes(param: Any, distribution: BaseDistribution) -> None:CODE
LOWtests/test_transform.py44def test_search_space_transform_encoding() -> None:CODE
LOWtests/test_transform.py92def test_search_space_transform_numerical(CODE
LOWtests/test_transform.py146def test_search_space_transform_values_categorical(CODE
LOWtests/test_transform.py161def test_search_space_transform_untransform_params() -> None:CODE
LOWtests/test_transform.py208def test_transform_untransform_params_at_bounds(CODE
LOWtests/test_transform.py230def test_untransform_numerical_param_int_uses_equal_width_bins() -> None:CODE
LOW⚡tests/test_imports.py6def test_try_import_is_successful() -> None:CODE
LOW⚡tests/test_imports.py13def test_try_import_is_successful_other_error() -> None:CODE
LOW⚡tests/test_imports.py21def test_try_import_not_successful() -> None:CODE
LOWtests/test_convert_positional_args.py24def test_convert_positional_args_decorator() -> None:CODE
LOWtests/test_convert_positional_args.py36def test_convert_positional_args_future_warning_for_methods() -> None:CODE
LOWtests/test_convert_positional_args.py49def test_convert_positional_args_future_warning() -> None:CODE
LOWtests/test_convert_positional_args.py70def test_convert_positional_args_mypy_type_inference() -> None:CODE
LOWtests/test_convert_positional_args.py104def test_convert_positional_args_invalid_previous_positional_arg_names(CODE
LOWtests/test_convert_positional_args.py125def test_convert_positional_args_invalid_positional_args() -> None:CODE
LOWtests/test_deprecated.py36def test_deprecation_raises_error_for_invalid_version(CODE
LOWtests/test_deprecated.py46def test_deprecation_decorator() -> None:CODE
LOWtests/test_deprecated.py65def test_deprecation_instance_method_decorator() -> None:CODE
LOWtests/test_deprecated.py79def test_deprecation_class_decorator() -> None:CODE
LOWtests/test_deprecated.py96def test_deprecation_class_decorator_name() -> None:CODE
LOWtests/test_deprecated.py108def test_deprecation_decorator_name() -> None:CODE
LOWtests/test_deprecated.py124def test_deprecation_text_specified(text: str | None) -> None:CODE
LOWtests/test_deprecated.py152def test_deprecation_class_text_specified(text: str | None) -> None:CODE
LOWtests/test_deprecated.py182def test_deprecation_decorator_default_removed_version() -> None:CODE
LOW⚡tests/test_distributions.py74def test_json_to_distribution() -> None:CODE
LOW⚡tests/test_distributions.py83def test_abbreviated_json_to_distribution() -> None:CODE
LOW⚡tests/test_distributions.py525def test_categorical_init_error() -> None:CODE
LOW⚡tests/test_distributions.py530def test_categorical_distribution_different_sequence_types() -> None:CODE
LOW⚡tests/test_distributions.py538def test_convert_old_distribution_to_new_distribution() -> None:CODE
LOWtests/test_distributions.py108def test_distribution_to_json() -> None:CODE
LOWtests/test_distributions.py119def test_check_distribution_compatibility() -> None:CODE
LOWtests/test_distributions.py200def test_int_internal_representation(value: Any) -> None:CODE
LOWtests/test_distributions.py224def test_int_internal_representation_error(value: Any, kwargs: dict[str, Any]) -> None:CODE
LOWtests/test_distributions.py234def test_float_internal_representation(value: Any) -> None:CODE
LOWtests/test_distributions.py258def test_float_internal_representation_error(value: Any, kwargs: dict[str, Any]) -> None:CODE
LOWtests/test_distributions.py264def test_categorical_internal_representation() -> None:CODE
LOWtests/test_distributions.py330def test_categorical_contains() -> None:CODE
LOWtests/test_distributions.py339def test_empty_range_contains() -> None:CODE
LOWtests/test_distributions.py419def test_invalid_distribution() -> None:CODE
LOWtests/test_distributions.py459def test_int_distribution_asdict(key: str, low: int, high: int, log: bool, step: int) -> None:CODE
LOWtests/test_distributions.py472def test_float_distribution_asdict(CODE
LOWtests/test_distributions.py570def test_convert_old_distribution_to_new_distribution_noop() -> None:CODE
LOWtests/test_multi_objective.py25def assert_is_output_equal_to_ans(CODE
LOWtests/test_multi_objective.py47def test_get_pareto_front_trials(CODE
LOWtests/test_multi_objective.py76def test_get_pareto_front_trials_with_constraint(CODE
LOW⚡tests/test_cli.py139def test_create_study_command_with_study_name() -> None:CODE
LOW⚡tests/test_cli.py154def test_create_study_command_without_storage_url() -> None:CODE
LOW⚡tests/test_cli.py164def test_create_study_command_with_storage_env() -> None:CODE
LOWtests/test_cli.py48def objective_func_branched_search_space(trial: Trial) -> float:CODE
LOWtests/test_cli.py59def objective_func_multi_objective(trial: Trial) -> tuple[float, float]:CODE
LOWtests/test_cli.py121def test_create_study_command() -> None:CODE
LOWtests/test_cli.py183def test_create_study_command_with_direction() -> None:CODE
LOWtests/test_cli.py205def test_create_study_command_with_multiple_directions() -> None:CODE
LOWtests/test_cli.py257def test_delete_study_command() -> None:CODE
LOWtests/test_cli.py274def test_delete_study_command_without_storage_url() -> None:CODE
LOWtests/test_cli.py282def test_study_set_user_attr_command() -> None:CODE
LOWtests/test_cli.py366def test_study_names_command_without_storage_url() -> None:CODE
LOWtests/test_cli.py442def test_studies_command_flatten(output_format: str | None) -> None:CODE
902 more matches not shown…
Unused Imports485 hits · 476 pts
SeverityFileLineSnippetContext
LOWtutorial/20_recipes/012_artifact_tutorial.py252CODE
LOWtutorial/10_key_features/002_configurations.py17CODE
LOWtests/test_convert_positional_args.py1CODE
LOWtests/test_deprecated.py1CODE
LOWtests/test_distributions.py1CODE
LOWtests/test_multi_objective.py1CODE
LOWtests/test_cli.py1CODE
LOWtests/trial_tests/test_frozen.py1CODE
LOWtests/trial_tests/test_trials.py1CODE
LOWtests/trial_tests/test_trial.py1CODE
LOWtests/trial_tests/test_fixed.py1CODE
LOWtests/pruners_tests/test_percentile.py1CODE
LOWtests/pruners_tests/test_median.py1CODE
LOWtests/pruners_tests/test_patient.py1CODE
LOWtests/pruners_tests/test_wilcoxon.py1CODE
LOWtests/pruners_tests/test_successive_halving.py1CODE
LOWtests/pruners_tests/test_hyperband.py1CODE
LOWtests/study_tests/test_optimize.py1CODE
LOWtests/study_tests/test_study.py1CODE
LOWtests/study_tests/test_multi_objective.py1CODE
LOWtests/study_tests/test_dataframe.py1CODE
LOWtests/hypervolume_tests/test_hssp.py1CODE
LOWtests/hypervolume_tests/test_box_decomposition.py1CODE
LOWtests/importance_tests/test_evaluator.py1CODE
LOWtests/importance_tests/fanova_tests/test_tree.py1CODE
LOWtests/importance_tests/pedanova_tests/test_evaluator.py1CODE
LOW…ce_tests/pedanova_tests/test_scott_parzen_estimator.py1CODE
LOWtests/artifacts_tests/test_upload_artifact.py1CODE
LOWtests/artifacts_tests/test_boto3.py1CODE
LOWtests/artifacts_tests/test_download_artifact.py1CODE
LOWtests/artifacts_tests/test_gcs.py1CODE
LOWtests/artifacts_tests/stubs.py1CODE
LOWtests/artifacts_tests/test_list_artifact_meta.py1CODE
LOWtests/storages_tests/test_grpc.py1CODE
LOWtests/storages_tests/test_heartbeat.py1CODE
LOWtests/storages_tests/test_cached_storage.py1CODE
LOWtests/storages_tests/test_storages.py1CODE
LOWtests/storages_tests/test_with_server.py1CODE
LOWtests/storages_tests/rdb_tests/test_storage.py1CODE
LOWtests/storages_tests/rdb_tests/test_storage.py19CODE
LOWtests/storages_tests/rdb_tests/test_models.py1CODE
LOWtests/storages_tests/rdb_tests/create_db.py39CODE
LOWtests/storages_tests/journal_tests/test_journal.py1CODE
LOW…ages_tests/journal_tests/test_combination_with_grpc.py1CODE
LOWtests/samplers_tests/test_grid.py1CODE
LOWtests/samplers_tests/test_gp.py1CODE
LOWtests/samplers_tests/test_cmaes.py1CODE
LOWtests/samplers_tests/test_samplers.py1CODE
LOWtests/samplers_tests/test_base_gasampler.py1CODE
LOWtests/samplers_tests/test_nsgaii.py1CODE
LOWtests/samplers_tests/test_nsgaiii.py1CODE
LOWtests/samplers_tests/test_brute_force.py1CODE
LOWtests/samplers_tests/test_qmc.py1CODE
LOWtests/samplers_tests/tpe_tests/test_parzen_estimator.py1CODE
LOWtests/samplers_tests/tpe_tests/test_truncnorm.py1CODE
LOW…mplers_tests/tpe_tests/test_multi_objective_sampler.py1CODE
LOWtests/samplers_tests/tpe_tests/test_sampler.py1CODE
LOWtests/gp_tests/test_batched_lbfgsb.py1CODE
LOWtests/gp_tests/test_search_space.py1CODE
LOWtests/gp_tests/test_gp.py1CODE
425 more matches not shown…
Decorative Section Separators54 hits · 200 pts
SeverityFileLineSnippetContext
MEDIUMtutorial/20_recipes/003_attributes.py12# ---------------------------------COMMENT
MEDIUMtutorial/20_recipes/003_attributes.py52# --------------------------------COMMENT
MEDIUMtutorial/20_recipes/001_rdb.py48# ------------COMMENT
MEDIUMtutorial/20_recipes/001_rdb.py78# --------------------COMMENT
MEDIUMtutorial/20_recipes/009_ask_and_tell.py154# ---------------COMMENT
MEDIUMtutorial/20_recipes/009_ask_and_tell.py156# ---------------COMMENT
MEDIUMtutorial/20_recipes/009_ask_and_tell.py193# -------------------COMMENT
MEDIUMtutorial/20_recipes/009_ask_and_tell.py195# -------------------COMMENT
MEDIUMtutorial/20_recipes/010_reuse_best_trial.py87# ----------------------------------------------------------------------------------COMMENT
MEDIUM⚡tutorial/20_recipes/013_wilcoxon_pruner.py186# ---------------------------------------------------------------------------------------COMMENT
MEDIUM⚡tutorial/20_recipes/013_wilcoxon_pruner.py195# -----------------------------COMMENT
MEDIUM⚡tutorial/20_recipes/014_ablation_study_by_optuna.py40# ---------------------COMMENT
MEDIUM⚡tutorial/20_recipes/014_ablation_study_by_optuna.py42# ---------------------COMMENT
MEDIUMtutorial/20_recipes/014_ablation_study_by_optuna.py87# ----------------------------------------COMMENT
MEDIUMtutorial/20_recipes/014_ablation_study_by_optuna.py89# ----------------------------------------COMMENT
MEDIUMtutorial/20_recipes/014_ablation_study_by_optuna.py134# -------------------------------------------COMMENT
MEDIUMtutorial/20_recipes/014_ablation_study_by_optuna.py136# -------------------------------------------COMMENT
MEDIUMtutorial/20_recipes/014_ablation_study_by_optuna.py199# -------------------------------------------COMMENT
MEDIUMtutorial/20_recipes/014_ablation_study_by_optuna.py201# -------------------------------------------COMMENT
MEDIUM⚡tutorial/20_recipes/008_specify_params.py102# ----------------------------------------------------------------------COMMENT
MEDIUM⚡tutorial/20_recipes/008_specify_params.py104# ----------------------------------------------------------------------COMMENT
MEDIUMtutorial/20_recipes/007_optuna_callback.py17# -------------------------------------------------------COMMENT
MEDIUMtutorial/20_recipes/012_artifact_tutorial.py440# ----------COMMENT
MEDIUMtutorial/20_recipes/002_multi_objective.py117# --------------------------------COMMENT
MEDIUM…_key_features/003_efficient_optimization_algorithms.py67# ------------------COMMENT
MEDIUM…_key_features/003_efficient_optimization_algorithms.py96# ------------------COMMENT
MEDIUM…_key_features/003_efficient_optimization_algorithms.py151# ----------------------------------------COMMENT
MEDIUM…_key_features/003_efficient_optimization_algorithms.py179# -------------------------------COMMENT
MEDIUMtutorial/10_key_features/002_configurations.py45# -------------------------COMMENT
MEDIUMtutorial/10_key_features/001_first.py72# ------------COMMENT
MEDIUMtutorial/10_key_features/005_visualization.py172# --------------COMMENT
MEDIUMtutorial/10_key_features/005_visualization.py228# ---------------------------COMMENT
MEDIUMtutorial/10_key_features/004_distributed.py152# ----------------------------------------------COMMENT
MEDIUMtutorial/10_key_features/004_distributed.py218# ---------------------------------------COMMENT
MEDIUMtutorial/10_key_features/004_distributed.py278# ---------------------------------------------COMMENT
MEDIUM⚡tests/study_tests/test_multi_objective.py46 # ╔═════╤═════╤═════╤═════╤═════╗COMMENT
MEDIUM⚡tests/study_tests/test_multi_objective.py48 # ╟─────┼─────┼─────┼─────┼─────╢COMMENT
MEDIUM⚡tests/study_tests/test_multi_objective.py50 # ╟─────┼─────┼─────┼─────┼─────╢COMMENT
MEDIUM⚡tests/study_tests/test_multi_objective.py52 # value0 ╟─────┼─────┼─────┼─────┼─────╢COMMENT
MEDIUM⚡tests/study_tests/test_multi_objective.py54 # ╟─────┼─────┼─────┼─────┼─────╢COMMENT
MEDIUM⚡tests/study_tests/test_multi_objective.py56 # ╚═════╧═════╧═════╧═════╧═════╝COMMENT
MEDIUM⚡tests/samplers_tests/test_nsgaii.py325 # ╔═════╤═════╤═════╤═════╤═════╤═════╗COMMENT
MEDIUM⚡tests/samplers_tests/test_nsgaii.py327 # ╟─────┼─────┼─────┼─────┼─────┼─────╢COMMENT
MEDIUM⚡tests/samplers_tests/test_nsgaii.py329 # ╟─────┼─feasible ─┼─────┼─────┼─────╢COMMENT
MEDIUM⚡tests/samplers_tests/test_nsgaii.py331 # c1 ╟─────┼─────┼─────┼─────┼─────┼─────╢COMMENT
MEDIUM⚡tests/samplers_tests/test_nsgaii.py333 # ╟─────┼─────┼─────┼─────┼─────┼─────╢COMMENT
MEDIUM⚡tests/samplers_tests/test_nsgaii.py335 # ╟─────┼─────┼─────┼─────┼─────┼─────╢COMMENT
MEDIUM⚡tests/samplers_tests/test_nsgaii.py337 # ╚═════╧═════╧═════╧═════╧═════╧═════╝COMMENT
MEDIUM⚡optuna/samplers/_brute_force.py60 # ┌────────────┬─────────────────┬────────────┐COMMENT
MEDIUM⚡optuna/samplers/_brute_force.py62 # ├────────────┼─────────────────┼────────────┤COMMENT
MEDIUM⚡optuna/samplers/_brute_force.py64 # ├────────────┼─────────────────┼────────────┤COMMENT
MEDIUM⚡optuna/samplers/_brute_force.py66 # ├────────────┼─────────────────┼────────────┤COMMENT
MEDIUM⚡optuna/samplers/_brute_force.py68 # ├────────────┼─────────────────┼────────────┤COMMENT
MEDIUM⚡optuna/samplers/_brute_force.py70 # └────────────┴─────────────────┴────────────┘COMMENT
Docstring Block Structure20 hits · 100 pts
SeverityFileLineSnippetContext
HIGHoptuna/visualization/_timeline.py37Plot the timeline of a study. Args: study: A :class:`~optuna.study.Study` object whose trials aSTRING
HIGHoptuna/visualization/matplotlib/_timeline.py24Plot the timeline of a study. .. seealso:: Please refer to :func:`optuna.visualization.plot_timeline` for aSTRING
HIGHoptuna/storages/_base.py55Create a new study from a name. If no name is specified, the storage class generates a name. The returnSTRING
HIGHoptuna/storages/_base.py135Read the ID of a study. Args: study_name: Name of the study. Returns: STRING
HIGHoptuna/storages/_base.py152Read the study name of a study. Args: study_id: ID of the study. Returns: STRING
HIGHoptuna/storages/_base.py169Read whether a study maximizes or minimizes an objective. Args: study_id: ID of a sSTRING
HIGHoptuna/storages/_base.py186Read the user-defined attributes of a study. Args: study_id: ID of the study. STRING
HIGHoptuna/storages/_base.py203Read the optuna-internal attributes of a study. Args: study_id: ID of the study. STRING
HIGHoptuna/storages/_base.py232Create and add a new trial to a study. The returned trial ID is unique among all current and deleted trials. STRING
HIGHoptuna/storages/_base.py281Read the trial ID of a trial. Args: study_id: ID of the study. trial_nuSTRING
HIGHoptuna/storages/_base.py302Read the trial number of a trial. .. note:: The trial number is only unique within a study, and isSTRING
HIGHoptuna/storages/_base.py322Read the parameter of a trial. Args: trial_id: ID of the trial. param_nSTRING
HIGHoptuna/storages/_base.py345Update the state and values of a trial. Set return values of an objective function to values argument. STRING
HIGHoptuna/storages/_base.py445Read a trial. Args: trial_id: ID of the trial. Returns: Trial STRING
HIGHoptuna/storages/_base.py467Read all trials in a study. Args: study_id: ID of the study. deepcopy: STRING
HIGHoptuna/storages/_base.py490Count the number of trials in a study. Args: study_id: ID of the study. STRING
HIGHoptuna/storages/_base.py512Return the trial with the best value in a study. This method is valid only during single-objective optimizationSTRING
HIGHoptuna/storages/_base.py551Read the parameter dictionary of a trial. Args: trial_id: ID of the trial. STRING
HIGHoptuna/storages/_base.py568Read the user-defined attributes of a trial. Args: trial_id: ID of the trial. STRING
HIGHoptuna/storages/_base.py584Read the optuna-internal attributes of a trial. Args: trial_id: ID of the trial. STRING
Modern Structural Boilerplate97 hits · 98 pts
SeverityFileLineSnippetContext
LOW…mplers_tests/tpe_tests/test_multi_objective_sampler.py21 def set_trial_system_attr(self, _: int, key: str, value: dict) -> None:CODE
LOWoptuna/logging.py17__all__ = [CODE
LOWoptuna/logging.py146def set_verbosity(verbosity: int) -> None:CODE
LOWoptuna/_typing.py18__all__ = ["JSONSerializable"]CODE
LOWoptuna/__init__.py28__all__ = [CODE
LOWoptuna/_warnings.py41__all__ = ["optuna_warn"]CODE
LOWoptuna/cli.py945def _set_verbosity(args: Namespace) -> None:CODE
LOWoptuna/cli.py963def _set_log_file(args: Namespace) -> None:CODE
LOWoptuna/visualization/_plotly_imports.py23__all__ = ["_imports", "plotly", "go", "Contour", "Scatter", "make_subplots"]CODE
LOWoptuna/visualization/__init__.py17__all__ = [CODE
LOWoptuna/visualization/_utils.py22__all__ = ["is_available"]CODE
LOWoptuna/visualization/matplotlib/__init__.py16__all__ = [CODE
LOWoptuna/visualization/matplotlib/_param_importances.py130def _set_bar_labels(info: _ImportancesInfo, fig: "Figure", ax: "Axes", offset: float) -> None:CODE
LOWoptuna/visualization/matplotlib/_matplotlib_imports.py32__all__ = [CODE
LOWoptuna/visualization/matplotlib/_utils.py16__all__ = ["is_available"]CODE
LOWoptuna/artifacts/__init__.py11__all__ = [CODE
LOWoptuna/storages/_base.py92 def set_study_user_attr(self, study_id: int, key: str, value: Any) -> None:CODE
LOWoptuna/storages/_base.py112 def set_study_system_attr(self, study_id: int, key: str, value: JSONSerializable) -> None:CODE
LOWoptuna/storages/_base.py398 def set_trial_user_attr(self, trial_id: int, key: str, value: Any) -> None:CODE
LOWoptuna/storages/_base.py420 def set_trial_system_attr(self, trial_id: int, key: str, value: JSONSerializable) -> None:CODE
LOWoptuna/storages/_cached_storage.py102 def set_study_user_attr(self, study_id: int, key: str, value: Any) -> None:CODE
LOWoptuna/storages/_cached_storage.py105 def set_study_system_attr(self, study_id: int, key: str, value: JSONSerializable) -> None:CODE
LOW⚡optuna/storages/_cached_storage.py201 def set_trial_user_attr(self, trial_id: int, key: str, value: Any) -> None:CODE
LOW⚡optuna/storages/_cached_storage.py204 def set_trial_system_attr(self, trial_id: int, key: str, value: JSONSerializable) -> None:CODE
LOWoptuna/storages/__init__.py22__all__ = [CODE
LOWoptuna/storages/_in_memory.py102 def set_study_user_attr(self, study_id: int, key: str, value: Any) -> None:CODE
LOWoptuna/storages/_in_memory.py110 def set_study_system_attr(self, study_id: int, key: str, value: JSONSerializable) -> None:CODE
LOWoptuna/storages/_in_memory.py296 def _update_cache(self, trial_id: int, study_id: int) -> None:CODE
LOWoptuna/storages/_in_memory.py341 def set_trial_user_attr(self, trial_id: int, key: str, value: Any) -> None:CODE
LOWoptuna/storages/_in_memory.py352 def set_trial_system_attr(self, trial_id: int, key: str, value: JSONSerializable) -> None:CODE
LOWoptuna/storages/_in_memory.py371 def _set_trial(self, trial_id: int, trial: FrozenTrial) -> None:CODE
LOWoptuna/storages/journal/__init__.py12__all__ = [CODE
LOWoptuna/storages/journal/_storage.py188 def set_study_user_attr(self, study_id: int, key: str, value: Any) -> None:CODE
LOWoptuna/storages/journal/_storage.py194 def set_study_system_attr(self, study_id: int, key: str, value: JSONSerializable) -> None:CODE
LOWoptuna/storages/journal/_storage.py369 def set_trial_user_attr(self, trial_id: int, key: str, value: Any) -> None:CODE
LOWoptuna/storages/journal/_storage.py379 def set_trial_system_attr(self, trial_id: int, key: str, value: JSONSerializable) -> None:CODE
LOWoptuna/storages/_grpc/client.py80 def _setup(self) -> None:CODE
LOWoptuna/storages/_grpc/client.py145 def set_study_user_attr(self, study_id: int, key: str, value: Any) -> None:CODE
LOWoptuna/storages/_grpc/client.py156 def set_study_system_attr(self, study_id: int, key: str, value: Any) -> None:CODE
LOWoptuna/storages/_grpc/client.py320 def set_trial_user_attr(self, trial_id: int, key: str, value: Any) -> None:CODE
LOWoptuna/storages/_grpc/client.py334 def set_trial_system_attr(self, trial_id: int, key: str, value: Any) -> None:CODE
LOWoptuna/storages/_grpc/__init__.py5__all__ = [CODE
LOW⚡optuna/storages/_rdb/storage.py758 def set_trial_user_attr(self, trial_id: int, key: str, value: Any) -> None:CODE
LOW⚡optuna/storages/_rdb/storage.py768 def set_trial_system_attr(self, trial_id: int, key: str, value: JSONSerializable) -> None:CODE
LOWoptuna/storages/_rdb/storage.py332 def set_study_user_attr(self, study_id: int, key: str, value: Any) -> None:CODE
LOWoptuna/storages/_rdb/storage.py344 def set_study_system_attr(self, study_id: int, key: str, value: JSONSerializable) -> None:CODE
LOWoptuna/storages/_rdb/storage.py986 def _set_default_engine_kwargs_for_mysql(url: str, engine_kwargs: dict[str, Any]) -> None:CODE
LOWoptuna/storages/_rdb/storage.py1140 def _set_alembic_revision(self, revision: str) -> None:CODE
LOWoptuna/study/_dataframe.py19__all__ = ["pd"]CODE
LOWoptuna/study/__init__.py13__all__ = [CODE
LOWoptuna/study/study.py694 def set_user_attr(self, key: str, value: Any) -> None:CODE
LOWoptuna/study/study.py1021 def set_metric_names(self, metric_names: list[str]) -> None:CODE
LOWoptuna/search_space/__init__.py7__all__ = [CODE
LOWoptuna/pruners/__init__.py19__all__ = [CODE
LOWoptuna/trial/_base.py99 def set_user_attr(self, key: str, value: Any) -> None:CODE
LOWoptuna/trial/_base.py131 def set_constraint(self, key: str, value: float) -> None:CODE
LOWoptuna/trial/_fixed.py135 def set_user_attr(self, key: str, value: Any) -> None:CODE
LOWoptuna/trial/_fixed.py197 def set_constraint(self, key: str, value: float) -> None:CODE
LOWoptuna/trial/_trial.py545 def set_user_attr(self, key: str, value: Any) -> None:CODE
LOWoptuna/trial/_trial.py748 def set_constraint(self, key: str, value: float) -> None:CODE
37 more matches not shown…
Self-Referential Comments27 hits · 87 pts
SeverityFileLineSnippetContext
MEDIUM⚡tutorial/20_recipes/014_ablation_study_by_optuna.py45# Define an objective function using ``suggest_categorical`` and ``suggest_float``COMMENT
MEDIUMtutorial/20_recipes/008_specify_params.py42# Define the objective function.COMMENT
MEDIUMtutorial/10_key_features/005_visualization.py125# Define the objective function.COMMENT
MEDIUMtests/test_cli.py322 # Create a study.COMMENT
MEDIUMtests/study_tests/test_study.py429 # Create a new study.COMMENT
MEDIUMtests/study_tests/test_study.py1176 # Create a trial to retrieve it as the `study.best_trial`.COMMENT
MEDIUMtests/study_tests/test_study.py1678 # Create a study and ask for a new trial.COMMENT
MEDIUM⚡tests/storages_tests/test_callbacks.py24 # Create a trial and manually set it as failed.COMMENT
MEDIUMtests/storages_tests/test_cached_storage.py134 # Create a trial via CachedStorage and update it via backend storage directly.COMMENT
MEDIUMtests/storages_tests/test_with_server.py69 # Create a studyCOMMENT
MEDIUMtests/storages_tests/test_with_server.py130 # Create a new study to confirm the study can load trial properly.COMMENT
MEDIUMtests/storages_tests/rdb_tests/test_storage.py225 # Create a new study.COMMENT
MEDIUMtests/storages_tests/rdb_tests/test_storage.py275 # Create a new study.COMMENT
MEDIUM⚡tests/storages_tests/rdb_tests/create_db.py85 # Create an empty study.COMMENT
MEDIUM⚡tests/storages_tests/rdb_tests/create_db.py88 # Create a study for single-objective optimization.COMMENT
MEDIUM⚡tests/storages_tests/rdb_tests/create_db.py93 # Create a study for multi-objective optimization.COMMENT
MEDIUMtests/storages_tests/rdb_tests/create_db.py106 # Create a study for distributions upgrade.COMMENT
MEDIUM⚡tests/storages_tests/journal_tests/test_journal.py323 # Create an Optuna studyCOMMENT
MEDIUMtests/samplers_tests/test_samplers.py67# This function is used only in test_reproducible_in_other_process, but declared at top-levelCOMMENT
MEDIUM…ion_examples/optuna.visualization.plot_pareto_front.py34# The following code snippet shows how to plot a 2-dimensional Pareto frontCOMMENT
MEDIUMoptuna/visualization/_utils.py105 # This function is not raising when target is missing, since we'reCOMMENT
MEDIUMoptuna/storages/journal/_file.py62 open(self._file_path, "ab").close() # Create a file if it does not exist.CODE
MEDIUMoptuna/storages/_grpc/auto_generated/api_pb2_grpc.py398 # This class is part of an EXPERIMENTAL API.COMMENT
MEDIUMoptuna/study/study.py775 # Create a dataframe from the study.STRING
MEDIUMoptuna/pruners/_hyperband.py269 # This class is assumed to be passed toCOMMENT
MEDIUM…plers/_nsgaiii/_elite_population_selection_strategy.py23# Define a coefficient for scaling intervals, used in _filter_inf() to replace +-inf.COMMENT
MEDIUMoptuna/samplers/_tpe/_truncnorm.py1# This file contains the codes from SciPy project.COMMENT
Over-Commented Block67 hits · 66 pts
SeverityFileLineSnippetContext
LOWtutorial/20_recipes/001_rdb.py61# reproducibility, you need to restore the sampler with using ``pickle`` as follows::COMMENT
LOWtutorial/20_recipes/001_rdb.py81#COMMENT
LOWtutorial/20_recipes/009_ask_and_tell.py81 clf.fit(X_train, y_train)COMMENT
LOWtutorial/20_recipes/009_ask_and_tell.py101# from sklearn.linear_model import SGDClassifierCOMMENT
LOWtutorial/20_recipes/009_ask_and_tell.py121# trial = study.ask()COMMENT
LOWtutorial/20_recipes/009_ask_and_tell.py141# score = clf.score(X_valid, y_valid)COMMENT
LOWtutorial/20_recipes/009_ask_and_tell.py241# :class:`optuna.samplers.TPESampler` class can take a boolean parameter ``constant_liar``,COMMENT
LOWtutorial/20_recipes/010_reuse_best_trial.py81# Pass ``study.best_trial`` as the argument of ``detailed_objective``.COMMENT
LOWtutorial/20_recipes/013_wilcoxon_pruner.py181COMMENT
LOWtutorial/20_recipes/013_wilcoxon_pruner.py201# too often, the optimization may get stuck in a local optimum, so we must tune the thresholdCOMMENT
LOWtutorial/20_recipes/014_ablation_study_by_optuna.py41# Basic Ablation StudyCOMMENT
LOWtutorial/20_recipes/014_ablation_study_by_optuna.py81# a finite ``step``. Using ``suggest_float`` without ``step`` will raise an error becauseCOMMENT
LOWtutorial/20_recipes/014_ablation_study_by_optuna.py121# The sampler explores all valid paths through the conditional search space:COMMENT
LOWtutorial/20_recipes/014_ablation_study_by_optuna.py141#COMMENT
LOWtutorial/20_recipes/014_ablation_study_by_optuna.py161# )COMMENT
LOWtutorial/20_recipes/014_ablation_study_by_optuna.py181# python run_ablation.pyCOMMENT
LOWtutorial/20_recipes/014_ablation_study_by_optuna.py201# -------------------------------------------COMMENT
LOWtutorial/20_recipes/014_ablation_study_by_optuna.py221# def objective(trial: optuna.Trial) -> float:COMMENT
LOWtutorial/20_recipes/014_ablation_study_by_optuna.py241# )COMMENT
LOWtutorial/20_recipes/014_ablation_study_by_optuna.py261# if trial.state == optuna.trial.TrialState.RUNNING:COMMENT
LOWtutorial/20_recipes/008_specify_params.py101#COMMENT
LOWtutorial/20_recipes/012_artifact_tutorial.py321# Each function is as follows.COMMENT
LOWtutorial/20_recipes/012_artifact_tutorial.py421 write("best_atoms.png", best_atoms, rotation=("315x,0y,0z"))COMMENT
LOWtutorial/20_recipes/012_artifact_tutorial.py441#COMMENT
LOWtutorial/20_recipes/011_journal_storage.py41COMMENT
LOWtutorial/20_recipes/004_cli.py41COMMENT
LOWtutorial/20_recipes/004_cli.py61#COMMENT
LOWtutorial/20_recipes/002_multi_objective.py121# Specifically, in this example, we want to minimize the FLOPS (we want a faster model)COMMENT
LOW…_key_features/003_efficient_optimization_algorithms.py61study = optuna.create_study(sampler=optuna.samplers.CmaEsSampler())COMMENT
LOW…_key_features/003_efficient_optimization_algorithms.py81#COMMENT
LOW…_key_features/003_efficient_optimization_algorithms.py141optuna.logging.get_logger("optuna").addHandler(logging.StreamHandler(sys.stdout))COMMENT
LOW…_key_features/003_efficient_optimization_algorithms.py161# This table is from the `Ozaki et al., Hyperparameter Optimization Methods: Overview and Characteristics, in IEICE TranCOMMENT
LOW…_key_features/003_efficient_optimization_algorithms.py181#COMMENT
LOWtutorial/10_key_features/002_configurations.py41COMMENT
LOWtutorial/10_key_features/002_configurations.py61 if classifier_name == "SVC":COMMENT
LOWtutorial/10_key_features/002_configurations.py81# layers = []COMMENT
LOWtutorial/10_key_features/001_first.py41#COMMENT
LOWtutorial/10_key_features/001_first.py61# We can see that the ``x`` value found by Optuna is close to the optimal value of ``2``.COMMENT
LOWtutorial/10_key_features/004_distributed.py141study = optuna.create_study(COMMENT
LOWtutorial/10_key_features/004_distributed.py161# it cannot be used for multi-process optimization.COMMENT
LOWtutorial/10_key_features/004_distributed.py181# def run_optimization(_):COMMENT
LOWtutorial/10_key_features/004_distributed.py201# Running trial trial.number=3 in process 4607COMMENT
LOWtutorial/10_key_features/004_distributed.py221# it is likely to cause race conditions when accessed by multiple machines.COMMENT
LOWtutorial/10_key_features/004_distributed.py241# x = trial.suggest_float("x", -10, 10)COMMENT
LOWtutorial/10_key_features/004_distributed.py261# [I 2025-06-03 14:07:45,306] A new study created in RDB with name: distributed_testCOMMENT
LOWtutorial/10_key_features/004_distributed.py281# In that case, you can use :class:`~optuna.storages.GrpcStorageProxy`COMMENT
LOWtutorial/10_key_features/004_distributed.py301#COMMENT
LOWtutorial/10_key_features/004_distributed.py321#COMMENT
LOWtests/study_tests/test_multi_objective.py41COMMENT
LOWtests/samplers_tests/test_nsgaii.py321 # When both trials are infeasible, the trial with smaller violation dominatesCOMMENT
LOWdocs/source/conf.py1# -*- coding: utf-8 -*-COMMENT
LOWdocs/source/conf.py121# defined by theme itself. Builtin themes are using these templates byCOMMENT
LOWdocs/source/conf.py141 # Additional stuff for the LaTeX preamble.COMMENT
LOWoptuna/visualization/matplotlib/_contour.py321 zmap[(xindex, yindex)] = zCOMMENT
LOWoptuna/storages/journal/_storage.py321 elif state.is_finished():COMMENT
LOWoptuna/storages/_rdb/alembic.ini1# A generic, single database configuration.COMMENT
LOWoptuna/storages/_rdb/alembic.ini21# the 'revision' command, regardless of autogenerateCOMMENT
LOWoptuna/samplers/_brute_force.py61 # │ State │ children │ is_running │COMMENT
LOWoptuna/samplers/_brute_force.py81 # {"a": 0, "b": 0.0}, {"a": 0, "b": 1.0}, {"a": 1, "b": 0.0, "c": 0}COMMENT
LOWoptuna/samplers/_brute_force.py101 # We know that `Unexpanded` paths such as `{"a": 1, "b": 1}` can be sampled becauseCOMMENT
7 more matches not shown…
Deep Nesting72 hits · 66 pts
SeverityFileLineSnippetContext
LOWtests/test_transform.py92CODE
LOWtests/test_cli.py64CODE
LOWtests/test_cli.py533CODE
LOWtests/test_cli.py611CODE
LOWtests/test_cli.py687CODE
LOWtests/test_cli.py768CODE
LOWtests/test_cli.py843CODE
LOWtests/test_cli.py928CODE
LOWtests/study_tests/test_study.py1113CODE
LOWtests/study_tests/test_dataframe.py51CODE
LOWtests/storages_tests/journal_tests/test_journal.py173CODE
LOWtests/samplers_tests/test_nsgaii.py314CODE
LOWtests/visualization_tests/test_contour.py390CODE
LOWtests/visualization_tests/test_hypervolume_history.py25CODE
LOWtests/visualization_tests/test_hypervolume_history.py30CODE
LOWtests/visualization_tests/test_hypervolume_history.py31CODE
LOWtests/visualization_tests/test_rank.py126CODE
LOWoptuna/distributions.py565CODE
LOWoptuna/distributions.py709CODE
LOWoptuna/distributions.py531CODE
LOWoptuna/cli.py82CODE
LOWoptuna/cli.py98CODE
LOWoptuna/cli.py244CODE
LOWoptuna/progress_bar.py76CODE
LOWoptuna/_transform.py175CODE
LOWoptuna/_transform.py246CODE
LOWoptuna/_transform.py269CODE
LOWoptuna/visualization/_rank.py116CODE
LOWoptuna/visualization/_rank.py306CODE
LOWoptuna/visualization/_parallel_coordinate.py239CODE
LOWoptuna/visualization/_optimization_history.py50CODE
LOWoptuna/visualization/_optimization_history.py137CODE
LOWoptuna/visualization/_slice.py181CODE
LOWoptuna/visualization/_contour.py108CODE
LOWoptuna/visualization/_contour.py259CODE
LOWoptuna/visualization/matplotlib/_utils.py37CODE
LOWoptuna/visualization/matplotlib/_contour.py81CODE
LOWoptuna/visualization/matplotlib/_contour.py326CODE
LOWoptuna/storages/_cached_storage.py89CODE
LOWoptuna/storages/_in_memory.py375CODE
LOWoptuna/storages/journal/_file.py146CODE
LOWoptuna/storages/journal/_file.py237CODE
LOWoptuna/storages/journal/_storage.py420CODE
LOWoptuna/storages/journal/_storage.py590CODE
LOWoptuna/storages/_grpc/client.py259CODE
LOWoptuna/storages/_rdb/storage.py670CODE
LOWoptuna/storages/_rdb/storage.py778CODE
LOWoptuna/storages/_rdb/storage.py858CODE
LOWoptuna/storages/_rdb/alembic/versions/v3.0.0.c.py68CODE
LOWoptuna/storages/_rdb/alembic/versions/v3.0.0.d.py78CODE
LOWoptuna/study/_dataframe.py22CODE
LOWoptuna/study/_optimize.py39CODE
LOWoptuna/study/_optimize.py190CODE
LOWoptuna/study/_tell.py80CODE
LOWoptuna/study/study.py1163CODE
LOWoptuna/study/study.py1536CODE
LOWoptuna/trial/_trial.py602CODE
LOWoptuna/importance/_base.py115CODE
LOWoptuna/importance/_fanova/_tree.py80CODE
LOWoptuna/testing/pytest_storages.py771CODE
12 more matches not shown…
Cross-Language Confusion6 hits · 38 pts
SeverityFileLineSnippetContext
HIGHtutorial/20_recipes/004_cli.py56# --search-space '{"x": {"name": "FloatDistribution", "attributes": {"step": null, "low": -10.0, "high": 10.0, COMMENT
HIGH⚡tests/test_distributions.py65 "f": '{"type": "float", "low": 1.0, "high": 2.0, "log": false, "step": null}',CODE
HIGH⚡tests/test_distributions.py66 "fl": '{"type": "float", "low": 0.001, "high": 100, "log": true, "step": null}',CODE
HIGHtests/test_distributions.py16_choices_json = '[null, true, false, 0, 1, 0.0, 1.0, NaN, Infinity, -Infinity, "", "a"]'CODE
HIGHtests/test_distributions.py47 '"attributes": {"low": 1.0, "high": 2.0, "log": false, "step": null}}',CODE
HIGHtests/test_distributions.py49 '"attributes": {"low": 0.001, "high": 100.0, "log": true, "step": null}}',CODE
Empty Error Handlers6 hits · 30 pts
SeverityFileLineSnippetContext
HIGHtests/storages_tests/test_with_server.py117except KeyError:CODE
HIGHtests/storages_tests/test_with_server.py182except KeyError:CODE
HIGHoptuna/progress_bar.py96except ValueError:CODE
HIGHoptuna/storages/_heartbeat.py183except optuna.exceptions.UpdateFinishedTrialError:CODE
HIGHoptuna/study/study.py1155except ValueError:CODE
HIGHoptuna/testing/tempfile_pool.py68except (FileNotFoundError, PermissionError):CODE
Cross-File Repetition6 hits · 30 pts
SeverityFileLineSnippetContext
HIGHoptuna/trial/_fixed.py0returns constraint values. the trial is considered feasible when all constraint values are zero or less. returns: constrSTRING
HIGHoptuna/trial/_trial.py0returns constraint values. the trial is considered feasible when all constraint values are zero or less. returns: constrSTRING
HIGHoptuna/trial/_frozen.py0returns constraint values. the trial is considered feasible when all constraint values are zero or less. returns: constrSTRING
HIGHoptuna/trial/_fixed.py0set a constraint value for the trial. args: key: a constraint name. value: a constraint value. the trial is considered fSTRING
HIGHoptuna/trial/_trial.py0set a constraint value for the trial. args: key: a constraint name. value: a constraint value. the trial is considered fSTRING
HIGHoptuna/trial/_frozen.py0set a constraint value for the trial. args: key: a constraint name. value: a constraint value. the trial is considered fSTRING
AI Structural Patterns25 hits · 24 pts
SeverityFileLineSnippetContext
LOWoptuna/storages/_grpc/auto_generated/api_pb2_grpc.py405CODE
LOWoptuna/storages/_grpc/auto_generated/api_pb2_grpc.py432CODE
LOWoptuna/storages/_grpc/auto_generated/api_pb2_grpc.py459CODE
LOWoptuna/storages/_grpc/auto_generated/api_pb2_grpc.py486CODE
LOWoptuna/storages/_grpc/auto_generated/api_pb2_grpc.py513CODE
LOWoptuna/storages/_grpc/auto_generated/api_pb2_grpc.py540CODE
LOWoptuna/storages/_grpc/auto_generated/api_pb2_grpc.py567CODE
LOWoptuna/storages/_grpc/auto_generated/api_pb2_grpc.py594CODE
LOWoptuna/storages/_grpc/auto_generated/api_pb2_grpc.py621CODE
LOWoptuna/storages/_grpc/auto_generated/api_pb2_grpc.py648CODE
LOWoptuna/storages/_grpc/auto_generated/api_pb2_grpc.py675CODE
LOWoptuna/storages/_grpc/auto_generated/api_pb2_grpc.py702CODE
LOWoptuna/storages/_grpc/auto_generated/api_pb2_grpc.py729CODE
LOWoptuna/storages/_grpc/auto_generated/api_pb2_grpc.py756CODE
LOWoptuna/storages/_grpc/auto_generated/api_pb2_grpc.py783CODE
LOWoptuna/storages/_grpc/auto_generated/api_pb2_grpc.py810CODE
LOWoptuna/storages/_grpc/auto_generated/api_pb2_grpc.py837CODE
LOWoptuna/storages/_grpc/auto_generated/api_pb2_grpc.py864CODE
LOWoptuna/storages/_grpc/auto_generated/api_pb2_grpc.py891CODE
LOWoptuna/trial/_frozen.py519CODE
LOWoptuna/_gp/batched_lbfgsb.py89CODE
LOWoptuna/samplers/_cmaes.py271CODE
LOWoptuna/samplers/_nsgaiii/_sampler.py86CODE
LOWoptuna/samplers/nsgaii/_sampler.py169CODE
LOWoptuna/samplers/_tpe/sampler.py330CODE
AI Slop Vocabulary6 hits · 16 pts
SeverityFileLineSnippetContext
MEDIUM⚡tutorial/20_recipes/013_wilcoxon_pruner.py205# Some samplers, including the default ``TPESampler``, currently cannot utilize theCOMMENT
MEDIUM⚡tutorial/20_recipes/008_specify_params.py103# Second scenario: Have Optuna utilize already evaluated hyperparametersCOMMENT
LOWoptuna/_gp/gp.py323 # Note that we cannot just use the constraint because of the numerical instabilityCOMMENT
LOWoptuna/_gp/acqf.py480 # Since all the objectives are equally important, we simply use the mean ofCOMMENT
LOWoptuna/_gp/acqf.py578 # Since all the objectives are equally important, we simply use the mean ofCOMMENT
MEDIUMoptuna/samplers/_brute_force.py108 # Essentially, each node represents a param value, and a path from the first node to the leafCOMMENT
Slop Phrases4 hits · 12 pts
SeverityFileLineSnippetContext
MEDIUMtutorial/10_key_features/002_configurations.py49# Also, you can use branches or loops depending on the parameter values.COMMENT
MEDIUMtutorial/10_key_features/004_distributed.py232# Then, you can use this MySQL database as a storage backend by setting theCOMMENT
MEDIUMtutorial/10_key_features/004_distributed.py281# In that case, you can use :class:`~optuna.storages.GrpcStorageProxy`COMMENT
MEDIUMoptuna/_hypervolume/wfg.py104 # which is guaranteed. As mentioned earlier, if all ``False`` in on_front is correct, theCOMMENT
Redundant / Tautological Comments7 hits · 11 pts
SeverityFileLineSnippetContext
LOW⚡tests/test_cli.py149 # Check if study_name is stored in the storage.COMMENT
LOWtests/test_cli.py1016 # Check if study_name is stored in the storage.COMMENT
LOWtests/storages_tests/rdb_tests/test_storage.py334 # Check if Study.optimize can run on new storage.COMMENT
LOWtests/samplers_tests/test_base_gasampler.py109 assert len(mock_study.mock_calls) == 2 # Check if only the two calls above were madeCODE
LOWoptuna/testing/pytest_storages.py343 # Check if trial_number starts from 0.COMMENT
LOWoptuna/testing/pytest_storages.py445 # Set params to another trial.COMMENT
LOWoptuna/samplers/_partial_fixed.py101 # Check if a parameter value is contained in the range of this distribution.COMMENT
Excessive Try-Catch Wrapping9 hits · 10 pts
SeverityFileLineSnippetContext
LOWtests/visualization_tests/test_utils.py52 except Exception:CODE
MEDIUMtests/visualization_tests/test_utils.py47def _is_plotly_available() -> bool:CODE
LOWoptuna/progress_bar.py28 except Exception:CODE
LOWoptuna/artifacts/_backoff.py75 except Exception as e:CODE
LOWoptuna/artifacts/_backoff.py90 except Exception as e:CODE
LOWoptuna/artifacts/_backoff.py105 except Exception as e:CODE
LOWoptuna/storages/journal/_storage.py609 except Exception:CODE
LOWoptuna/storages/_rdb/storage.py99 except Exception:CODE
LOWoptuna/study/_optimize.py229 except Exception:CODE
AI Response Leakage1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHoptuna/pruners/_hyperband.py204 # In this implementation, we combine this formula and that of ASHA paperCOMMENT
Dead Code1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUMtests/study_tests/test_dataframe.py131CODE
Fake / Example Data1 hit · 0 pts
SeverityFileLineSnippetContext
LOWoptuna/testing/pytest_storages.py419 storage.get_trial_param(existent_trial_id, "dummy-key")CODE