A hyperparameter optimization framework
This report presents the forensic synthetic code analysis of optuna/optuna, a Python project with 14,499 GitHub stars. SynthScan v2.0 examined 71,420 lines of code across 412 source files, recording 1804 pattern matches distributed across 18 syntactic categories. The overall adjusted score of 29.8 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).
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.
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.
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.
The scanner identified 1804 distinct pattern matches across 18 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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tutorial/20_recipes/005_user_defined_sampler.py | 96 | def infer_relative_search_space(self, study, trial): | CODE |
| LOW | tests/test_transform.py | 28 | def test_search_space_transform_shapes_dtypes(param: Any, distribution: BaseDistribution) -> None: | CODE |
| LOW | tests/test_transform.py | 44 | def test_search_space_transform_encoding() -> None: | CODE |
| LOW | tests/test_transform.py | 92 | def test_search_space_transform_numerical( | CODE |
| LOW | tests/test_transform.py | 146 | def test_search_space_transform_values_categorical( | CODE |
| LOW | tests/test_transform.py | 161 | def test_search_space_transform_untransform_params() -> None: | CODE |
| LOW | tests/test_transform.py | 208 | def test_transform_untransform_params_at_bounds( | CODE |
| LOW⚡ | tests/test_imports.py | 6 | def test_try_import_is_successful() -> None: | CODE |
| LOW⚡ | tests/test_imports.py | 13 | def test_try_import_is_successful_other_error() -> None: | CODE |
| LOW⚡ | tests/test_imports.py | 21 | def test_try_import_not_successful() -> None: | CODE |
| LOW | tests/test_convert_positional_args.py | 24 | def test_convert_positional_args_decorator() -> None: | CODE |
| LOW | tests/test_convert_positional_args.py | 36 | def test_convert_positional_args_future_warning_for_methods() -> None: | CODE |
| LOW | tests/test_convert_positional_args.py | 49 | def test_convert_positional_args_future_warning() -> None: | CODE |
| LOW | tests/test_convert_positional_args.py | 70 | def test_convert_positional_args_mypy_type_inference() -> None: | CODE |
| LOW | tests/test_convert_positional_args.py | 104 | def test_convert_positional_args_invalid_previous_positional_arg_names( | CODE |
| LOW | tests/test_convert_positional_args.py | 125 | def test_convert_positional_args_invalid_positional_args() -> None: | CODE |
| LOW | tests/test_deprecated.py | 36 | def test_deprecation_raises_error_for_invalid_version( | CODE |
| LOW | tests/test_deprecated.py | 46 | def test_deprecation_decorator() -> None: | CODE |
| LOW | tests/test_deprecated.py | 65 | def test_deprecation_instance_method_decorator() -> None: | CODE |
| LOW | tests/test_deprecated.py | 79 | def test_deprecation_class_decorator() -> None: | CODE |
| LOW | tests/test_deprecated.py | 96 | def test_deprecation_class_decorator_name() -> None: | CODE |
| LOW | tests/test_deprecated.py | 108 | def test_deprecation_decorator_name() -> None: | CODE |
| LOW | tests/test_deprecated.py | 124 | def test_deprecation_text_specified(text: str | None) -> None: | CODE |
| LOW | tests/test_deprecated.py | 152 | def test_deprecation_class_text_specified(text: str | None) -> None: | CODE |
| LOW | tests/test_deprecated.py | 182 | def test_deprecation_decorator_default_removed_version() -> None: | CODE |
| LOW⚡ | tests/test_distributions.py | 74 | def test_json_to_distribution() -> None: | CODE |
| LOW⚡ | tests/test_distributions.py | 83 | def test_abbreviated_json_to_distribution() -> None: | CODE |
| LOW⚡ | tests/test_distributions.py | 525 | def test_categorical_init_error() -> None: | CODE |
| LOW⚡ | tests/test_distributions.py | 530 | def test_categorical_distribution_different_sequence_types() -> None: | CODE |
| LOW⚡ | tests/test_distributions.py | 538 | def test_convert_old_distribution_to_new_distribution() -> None: | CODE |
| LOW | tests/test_distributions.py | 108 | def test_distribution_to_json() -> None: | CODE |
| LOW | tests/test_distributions.py | 119 | def test_check_distribution_compatibility() -> None: | CODE |
| LOW | tests/test_distributions.py | 200 | def test_int_internal_representation(value: Any) -> None: | CODE |
| LOW | tests/test_distributions.py | 224 | def test_int_internal_representation_error(value: Any, kwargs: dict[str, Any]) -> None: | CODE |
| LOW | tests/test_distributions.py | 234 | def test_float_internal_representation(value: Any) -> None: | CODE |
| LOW | tests/test_distributions.py | 258 | def test_float_internal_representation_error(value: Any, kwargs: dict[str, Any]) -> None: | CODE |
| LOW | tests/test_distributions.py | 264 | def test_categorical_internal_representation() -> None: | CODE |
| LOW | tests/test_distributions.py | 330 | def test_categorical_contains() -> None: | CODE |
| LOW | tests/test_distributions.py | 339 | def test_empty_range_contains() -> None: | CODE |
| LOW | tests/test_distributions.py | 419 | def test_invalid_distribution() -> None: | CODE |
| LOW | tests/test_distributions.py | 459 | def test_int_distribution_asdict(key: str, low: int, high: int, log: bool, step: int) -> None: | CODE |
| LOW | tests/test_distributions.py | 472 | def test_float_distribution_asdict( | CODE |
| LOW | tests/test_distributions.py | 570 | def test_convert_old_distribution_to_new_distribution_noop() -> None: | CODE |
| LOW | tests/test_multi_objective.py | 24 | def assert_is_output_equal_to_ans( | CODE |
| LOW | tests/test_multi_objective.py | 46 | def test_get_pareto_front_trials( | CODE |
| LOW | tests/test_multi_objective.py | 73 | def test_get_pareto_front_trials_with_constraint( | CODE |
| LOW⚡ | tests/test_cli.py | 139 | def test_create_study_command_with_study_name() -> None: | CODE |
| LOW⚡ | tests/test_cli.py | 154 | def test_create_study_command_without_storage_url() -> None: | CODE |
| LOW⚡ | tests/test_cli.py | 164 | def test_create_study_command_with_storage_env() -> None: | CODE |
| LOW | tests/test_cli.py | 48 | def objective_func_branched_search_space(trial: Trial) -> float: | CODE |
| LOW | tests/test_cli.py | 59 | def objective_func_multi_objective(trial: Trial) -> tuple[float, float]: | CODE |
| LOW | tests/test_cli.py | 121 | def test_create_study_command() -> None: | CODE |
| LOW | tests/test_cli.py | 183 | def test_create_study_command_with_direction() -> None: | CODE |
| LOW | tests/test_cli.py | 205 | def test_create_study_command_with_multiple_directions() -> None: | CODE |
| LOW | tests/test_cli.py | 257 | def test_delete_study_command() -> None: | CODE |
| LOW | tests/test_cli.py | 274 | def test_delete_study_command_without_storage_url() -> None: | CODE |
| LOW | tests/test_cli.py | 282 | def test_study_set_user_attr_command() -> None: | CODE |
| LOW | tests/test_cli.py | 366 | def test_study_names_command_without_storage_url() -> None: | CODE |
| LOW | tests/test_cli.py | 442 | def test_studies_command_flatten(output_format: str | None) -> None: | CODE |
| LOW | tests/test_cli.py | 611 | def test_trials_command_flatten( | CODE |
| 861 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tutorial/20_recipes/012_artifact_tutorial.py | 252 | CODE | |
| LOW | tutorial/10_key_features/002_configurations.py | 17 | CODE | |
| LOW | tests/test_convert_positional_args.py | 1 | CODE | |
| LOW | tests/test_deprecated.py | 1 | CODE | |
| LOW | tests/test_distributions.py | 1 | CODE | |
| LOW | tests/test_multi_objective.py | 1 | CODE | |
| LOW | tests/test_cli.py | 1 | CODE | |
| LOW | tests/trial_tests/test_frozen.py | 1 | CODE | |
| LOW | tests/trial_tests/test_trials.py | 1 | CODE | |
| LOW | tests/trial_tests/test_trial.py | 1 | CODE | |
| LOW | tests/trial_tests/test_fixed.py | 1 | CODE | |
| LOW | tests/pruners_tests/test_percentile.py | 1 | CODE | |
| LOW | tests/pruners_tests/test_median.py | 1 | CODE | |
| LOW | tests/pruners_tests/test_patient.py | 1 | CODE | |
| LOW | tests/pruners_tests/test_wilcoxon.py | 1 | CODE | |
| LOW | tests/pruners_tests/test_successive_halving.py | 1 | CODE | |
| LOW | tests/pruners_tests/test_hyperband.py | 1 | CODE | |
| LOW | tests/study_tests/test_optimize.py | 1 | CODE | |
| LOW | tests/study_tests/test_study.py | 1 | CODE | |
| LOW | tests/study_tests/test_multi_objective.py | 1 | CODE | |
| LOW | tests/study_tests/test_dataframe.py | 1 | CODE | |
| LOW | tests/hypervolume_tests/test_hssp.py | 1 | CODE | |
| LOW | tests/hypervolume_tests/test_box_decomposition.py | 1 | CODE | |
| LOW | tests/importance_tests/test_importance_evaluators.py | 1 | CODE | |
| LOW | tests/importance_tests/test_init.py | 1 | CODE | |
| LOW | tests/importance_tests/fanova_tests/test_tree.py | 1 | CODE | |
| LOW | tests/importance_tests/pedanova_tests/test_evaluator.py | 1 | CODE | |
| LOW | …ce_tests/pedanova_tests/test_scott_parzen_estimator.py | 1 | CODE | |
| LOW | tests/artifacts_tests/test_upload_artifact.py | 1 | CODE | |
| LOW | tests/artifacts_tests/test_boto3.py | 1 | CODE | |
| LOW | tests/artifacts_tests/test_download_artifact.py | 1 | CODE | |
| LOW | tests/artifacts_tests/test_gcs.py | 1 | CODE | |
| LOW | tests/artifacts_tests/stubs.py | 1 | CODE | |
| LOW | tests/artifacts_tests/test_list_artifact_meta.py | 1 | CODE | |
| LOW | tests/storages_tests/test_grpc.py | 1 | CODE | |
| LOW | tests/storages_tests/test_heartbeat.py | 1 | CODE | |
| LOW | tests/storages_tests/test_cached_storage.py | 1 | CODE | |
| LOW | tests/storages_tests/test_storages.py | 1 | CODE | |
| LOW | tests/storages_tests/test_with_server.py | 1 | CODE | |
| LOW | tests/storages_tests/rdb_tests/test_storage.py | 1 | CODE | |
| LOW | tests/storages_tests/rdb_tests/test_storage.py | 19 | CODE | |
| LOW | tests/storages_tests/rdb_tests/test_models.py | 1 | CODE | |
| LOW | tests/storages_tests/rdb_tests/create_db.py | 39 | CODE | |
| LOW | tests/storages_tests/journal_tests/test_journal.py | 1 | CODE | |
| LOW | …ages_tests/journal_tests/test_combination_with_grpc.py | 1 | CODE | |
| LOW | tests/samplers_tests/test_grid.py | 1 | CODE | |
| LOW | tests/samplers_tests/test_gp.py | 1 | CODE | |
| LOW | tests/samplers_tests/test_cmaes.py | 1 | CODE | |
| LOW | tests/samplers_tests/test_samplers.py | 1 | CODE | |
| LOW | tests/samplers_tests/test_base_gasampler.py | 1 | CODE | |
| LOW | tests/samplers_tests/test_nsgaii.py | 1 | CODE | |
| LOW | tests/samplers_tests/test_nsgaiii.py | 1 | CODE | |
| LOW | tests/samplers_tests/test_brute_force.py | 1 | CODE | |
| LOW | tests/samplers_tests/test_qmc.py | 1 | CODE | |
| LOW | tests/samplers_tests/tpe_tests/test_parzen_estimator.py | 1 | CODE | |
| LOW | tests/samplers_tests/tpe_tests/test_truncnorm.py | 1 | CODE | |
| LOW | …mplers_tests/tpe_tests/test_multi_objective_sampler.py | 1 | CODE | |
| LOW | tests/samplers_tests/tpe_tests/test_sampler.py | 1 | CODE | |
| LOW | tests/gp_tests/test_batched_lbfgsb.py | 1 | CODE | |
| LOW | tests/gp_tests/test_search_space.py | 1 | CODE | |
| 422 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tutorial/20_recipes/003_attributes.py | 12 | # --------------------------------- | COMMENT |
| MEDIUM | tutorial/20_recipes/003_attributes.py | 52 | # -------------------------------- | COMMENT |
| MEDIUM | tutorial/20_recipes/001_rdb.py | 48 | # ------------ | COMMENT |
| MEDIUM | tutorial/20_recipes/001_rdb.py | 78 | # -------------------- | COMMENT |
| MEDIUM | tutorial/20_recipes/009_ask_and_tell.py | 154 | # --------------- | COMMENT |
| MEDIUM | tutorial/20_recipes/009_ask_and_tell.py | 156 | # --------------- | COMMENT |
| MEDIUM | tutorial/20_recipes/009_ask_and_tell.py | 193 | # ------------------- | COMMENT |
| MEDIUM | tutorial/20_recipes/009_ask_and_tell.py | 195 | # ------------------- | COMMENT |
| MEDIUM | tutorial/20_recipes/010_reuse_best_trial.py | 87 | # ---------------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tutorial/20_recipes/013_wilcoxon_pruner.py | 186 | # --------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tutorial/20_recipes/013_wilcoxon_pruner.py | 195 | # ----------------------------- | COMMENT |
| MEDIUM⚡ | tutorial/20_recipes/014_ablation_study_by_optuna.py | 40 | # --------------------- | COMMENT |
| MEDIUM⚡ | tutorial/20_recipes/014_ablation_study_by_optuna.py | 42 | # --------------------- | COMMENT |
| MEDIUM | tutorial/20_recipes/014_ablation_study_by_optuna.py | 87 | # ---------------------------------------- | COMMENT |
| MEDIUM | tutorial/20_recipes/014_ablation_study_by_optuna.py | 89 | # ---------------------------------------- | COMMENT |
| MEDIUM | tutorial/20_recipes/014_ablation_study_by_optuna.py | 134 | # ------------------------------------------- | COMMENT |
| MEDIUM | tutorial/20_recipes/014_ablation_study_by_optuna.py | 136 | # ------------------------------------------- | COMMENT |
| MEDIUM | tutorial/20_recipes/014_ablation_study_by_optuna.py | 199 | # ------------------------------------------- | COMMENT |
| MEDIUM | tutorial/20_recipes/014_ablation_study_by_optuna.py | 201 | # ------------------------------------------- | COMMENT |
| MEDIUM⚡ | tutorial/20_recipes/008_specify_params.py | 102 | # ---------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tutorial/20_recipes/008_specify_params.py | 104 | # ---------------------------------------------------------------------- | COMMENT |
| MEDIUM | tutorial/20_recipes/007_optuna_callback.py | 17 | # ------------------------------------------------------- | COMMENT |
| MEDIUM | tutorial/20_recipes/012_artifact_tutorial.py | 440 | # ---------- | COMMENT |
| MEDIUM | tutorial/20_recipes/002_multi_objective.py | 117 | # -------------------------------- | COMMENT |
| MEDIUM | …_key_features/003_efficient_optimization_algorithms.py | 67 | # ------------------ | COMMENT |
| MEDIUM | …_key_features/003_efficient_optimization_algorithms.py | 96 | # ------------------ | COMMENT |
| MEDIUM | …_key_features/003_efficient_optimization_algorithms.py | 151 | # ---------------------------------------- | COMMENT |
| MEDIUM | …_key_features/003_efficient_optimization_algorithms.py | 179 | # ------------------------------- | COMMENT |
| MEDIUM | tutorial/10_key_features/002_configurations.py | 45 | # ------------------------- | COMMENT |
| MEDIUM | tutorial/10_key_features/001_first.py | 72 | # ------------ | COMMENT |
| MEDIUM | tutorial/10_key_features/005_visualization.py | 172 | # -------------- | COMMENT |
| MEDIUM | tutorial/10_key_features/005_visualization.py | 228 | # --------------------------- | COMMENT |
| MEDIUM | tutorial/10_key_features/004_distributed.py | 152 | # ---------------------------------------------- | COMMENT |
| MEDIUM | tutorial/10_key_features/004_distributed.py | 218 | # --------------------------------------- | COMMENT |
| MEDIUM | tutorial/10_key_features/004_distributed.py | 278 | # --------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/study_tests/test_multi_objective.py | 46 | # ╔═════╤═════╤═════╤═════╤═════╗ | COMMENT |
| MEDIUM⚡ | tests/study_tests/test_multi_objective.py | 48 | # ╟─────┼─────┼─────┼─────┼─────╢ | COMMENT |
| MEDIUM⚡ | tests/study_tests/test_multi_objective.py | 50 | # ╟─────┼─────┼─────┼─────┼─────╢ | COMMENT |
| MEDIUM⚡ | tests/study_tests/test_multi_objective.py | 52 | # value0 ╟─────┼─────┼─────┼─────┼─────╢ | COMMENT |
| MEDIUM⚡ | tests/study_tests/test_multi_objective.py | 54 | # ╟─────┼─────┼─────┼─────┼─────╢ | COMMENT |
| MEDIUM⚡ | tests/study_tests/test_multi_objective.py | 56 | # ╚═════╧═════╧═════╧═════╧═════╝ | COMMENT |
| MEDIUM⚡ | tests/samplers_tests/test_nsgaii.py | 308 | # ╔═════╤═════╤═════╤═════╤═════╤═════╗ | COMMENT |
| MEDIUM⚡ | tests/samplers_tests/test_nsgaii.py | 310 | # ╟─────┼─────┼─────┼─────┼─────┼─────╢ | COMMENT |
| MEDIUM⚡ | tests/samplers_tests/test_nsgaii.py | 312 | # ╟─────┼─feasible ─┼─────┼─────┼─────╢ | COMMENT |
| MEDIUM⚡ | tests/samplers_tests/test_nsgaii.py | 314 | # c1 ╟─────┼─────┼─────┼─────┼─────┼─────╢ | COMMENT |
| MEDIUM⚡ | tests/samplers_tests/test_nsgaii.py | 316 | # ╟─────┼─────┼─────┼─────┼─────┼─────╢ | COMMENT |
| MEDIUM⚡ | tests/samplers_tests/test_nsgaii.py | 318 | # ╟─────┼─────┼─────┼─────┼─────┼─────╢ | COMMENT |
| MEDIUM⚡ | tests/samplers_tests/test_nsgaii.py | 320 | # ╚═════╧═════╧═════╧═════╧═════╧═════╝ | COMMENT |
| MEDIUM⚡ | optuna/samplers/_brute_force.py | 62 | # ┌────────────┬─────────────────┬────────────┐ | COMMENT |
| MEDIUM⚡ | optuna/samplers/_brute_force.py | 64 | # ├────────────┼─────────────────┼────────────┤ | COMMENT |
| MEDIUM⚡ | optuna/samplers/_brute_force.py | 66 | # ├────────────┼─────────────────┼────────────┤ | COMMENT |
| MEDIUM⚡ | optuna/samplers/_brute_force.py | 68 | # ├────────────┼─────────────────┼────────────┤ | COMMENT |
| MEDIUM⚡ | optuna/samplers/_brute_force.py | 70 | # ├────────────┼─────────────────┼────────────┤ | COMMENT |
| MEDIUM⚡ | optuna/samplers/_brute_force.py | 72 | # └────────────┴─────────────────┴────────────┘ | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | optuna/visualization/_timeline.py | 38 | Plot the timeline of a study. Args: study: A :class:`~optuna.study.Study` object whose trials a | STRING |
| HIGH | optuna/visualization/matplotlib/_timeline.py | 24 | Plot the timeline of a study. .. seealso:: Please refer to :func:`optuna.visualization.plot_timeline` for a | STRING |
| HIGH | optuna/storages/_base.py | 55 | Create a new study from a name. If no name is specified, the storage class generates a name. The return | STRING |
| HIGH | optuna/storages/_base.py | 135 | Read the ID of a study. Args: study_name: Name of the study. Returns: | STRING |
| HIGH | optuna/storages/_base.py | 152 | Read the study name of a study. Args: study_id: ID of the study. Returns: | STRING |
| HIGH | optuna/storages/_base.py | 169 | Read whether a study maximizes or minimizes an objective. Args: study_id: ID of a s | STRING |
| HIGH | optuna/storages/_base.py | 186 | Read the user-defined attributes of a study. Args: study_id: ID of the study. | STRING |
| HIGH | optuna/storages/_base.py | 203 | Read the optuna-internal attributes of a study. Args: study_id: ID of the study. | STRING |
| HIGH | optuna/storages/_base.py | 232 | Create and add a new trial to a study. The returned trial ID is unique among all current and deleted trials. | STRING |
| HIGH | optuna/storages/_base.py | 281 | Read the trial ID of a trial. Args: study_id: ID of the study. trial_nu | STRING |
| HIGH | optuna/storages/_base.py | 302 | Read the trial number of a trial. .. note:: The trial number is only unique within a study, and is | STRING |
| HIGH | optuna/storages/_base.py | 322 | Read the parameter of a trial. Args: trial_id: ID of the trial. param_n | STRING |
| HIGH | optuna/storages/_base.py | 345 | Update the state and values of a trial. Set return values of an objective function to values argument. | STRING |
| HIGH | optuna/storages/_base.py | 445 | Read a trial. Args: trial_id: ID of the trial. Returns: Trial | STRING |
| HIGH | optuna/storages/_base.py | 467 | Read all trials in a study. Args: study_id: ID of the study. deepcopy: | STRING |
| HIGH | optuna/storages/_base.py | 490 | Count the number of trials in a study. Args: study_id: ID of the study. | STRING |
| HIGH | optuna/storages/_base.py | 512 | Return the trial with the best value in a study. This method is valid only during single-objective optimization | STRING |
| HIGH | optuna/storages/_base.py | 551 | Read the parameter dictionary of a trial. Args: trial_id: ID of the trial. | STRING |
| HIGH | optuna/storages/_base.py | 568 | Read the user-defined attributes of a trial. Args: trial_id: ID of the trial. | STRING |
| HIGH | optuna/storages/_base.py | 584 | Read the optuna-internal attributes of a trial. Args: trial_id: ID of the trial. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …mplers_tests/tpe_tests/test_multi_objective_sampler.py | 21 | def set_trial_system_attr(self, _: int, key: str, value: dict) -> None: | CODE |
| LOW | optuna/logging.py | 17 | __all__ = [ | CODE |
| LOW | optuna/logging.py | 146 | def set_verbosity(verbosity: int) -> None: | CODE |
| LOW | optuna/_typing.py | 18 | __all__ = ["JSONSerializable"] | CODE |
| LOW | optuna/__init__.py | 28 | __all__ = [ | CODE |
| LOW | optuna/_warnings.py | 41 | __all__ = ["optuna_warn"] | CODE |
| LOW | optuna/cli.py | 945 | def _set_verbosity(args: Namespace) -> None: | CODE |
| LOW | optuna/cli.py | 963 | def _set_log_file(args: Namespace) -> None: | CODE |
| LOW | optuna/visualization/_plotly_imports.py | 23 | __all__ = ["_imports", "plotly", "go", "Contour", "Scatter", "make_subplots"] | CODE |
| LOW | optuna/visualization/__init__.py | 17 | __all__ = [ | CODE |
| LOW | optuna/visualization/_utils.py | 22 | __all__ = ["is_available"] | CODE |
| LOW | optuna/visualization/matplotlib/__init__.py | 16 | __all__ = [ | CODE |
| LOW | optuna/visualization/matplotlib/_param_importances.py | 120 | def _set_bar_labels(info: _ImportancesInfo, fig: "Figure", ax: "Axes", offset: float) -> None: | CODE |
| LOW | optuna/visualization/matplotlib/_matplotlib_imports.py | 30 | __all__ = [ | CODE |
| LOW | optuna/visualization/matplotlib/_utils.py | 16 | __all__ = ["is_available"] | CODE |
| LOW | optuna/artifacts/__init__.py | 11 | __all__ = [ | CODE |
| LOW | optuna/storages/_base.py | 92 | def set_study_user_attr(self, study_id: int, key: str, value: Any) -> None: | CODE |
| LOW | optuna/storages/_base.py | 112 | def set_study_system_attr(self, study_id: int, key: str, value: JSONSerializable) -> None: | CODE |
| LOW | optuna/storages/_base.py | 398 | def set_trial_user_attr(self, trial_id: int, key: str, value: Any) -> None: | CODE |
| LOW | optuna/storages/_base.py | 420 | def set_trial_system_attr(self, trial_id: int, key: str, value: JSONSerializable) -> None: | CODE |
| LOW | optuna/storages/_cached_storage.py | 102 | def set_study_user_attr(self, study_id: int, key: str, value: Any) -> None: | CODE |
| LOW | optuna/storages/_cached_storage.py | 105 | def set_study_system_attr(self, study_id: int, key: str, value: JSONSerializable) -> None: | CODE |
| LOW⚡ | optuna/storages/_cached_storage.py | 201 | def set_trial_user_attr(self, trial_id: int, key: str, value: Any) -> None: | CODE |
| LOW⚡ | optuna/storages/_cached_storage.py | 204 | def set_trial_system_attr(self, trial_id: int, key: str, value: JSONSerializable) -> None: | CODE |
| LOW | optuna/storages/__init__.py | 22 | __all__ = [ | CODE |
| LOW | optuna/storages/_in_memory.py | 102 | def set_study_user_attr(self, study_id: int, key: str, value: Any) -> None: | CODE |
| LOW | optuna/storages/_in_memory.py | 108 | def set_study_system_attr(self, study_id: int, key: str, value: JSONSerializable) -> None: | CODE |
| LOW | optuna/storages/_in_memory.py | 292 | def _update_cache(self, trial_id: int, study_id: int) -> None: | CODE |
| LOW | optuna/storages/_in_memory.py | 337 | def set_trial_user_attr(self, trial_id: int, key: str, value: Any) -> None: | CODE |
| LOW | optuna/storages/_in_memory.py | 348 | def set_trial_system_attr(self, trial_id: int, key: str, value: JSONSerializable) -> None: | CODE |
| LOW | optuna/storages/_in_memory.py | 367 | def _set_trial(self, trial_id: int, trial: FrozenTrial) -> None: | CODE |
| LOW | optuna/storages/journal/__init__.py | 12 | __all__ = [ | CODE |
| LOW | optuna/storages/journal/_storage.py | 185 | def set_study_user_attr(self, study_id: int, key: str, value: Any) -> None: | CODE |
| LOW | optuna/storages/journal/_storage.py | 191 | def set_study_system_attr(self, study_id: int, key: str, value: JSONSerializable) -> None: | CODE |
| LOW | optuna/storages/journal/_storage.py | 363 | def set_trial_user_attr(self, trial_id: int, key: str, value: Any) -> None: | CODE |
| LOW | optuna/storages/journal/_storage.py | 373 | def set_trial_system_attr(self, trial_id: int, key: str, value: JSONSerializable) -> None: | CODE |
| LOW | optuna/storages/_grpc/client.py | 80 | def _setup(self) -> None: | CODE |
| LOW | optuna/storages/_grpc/client.py | 143 | def set_study_user_attr(self, study_id: int, key: str, value: Any) -> None: | CODE |
| LOW | optuna/storages/_grpc/client.py | 154 | def set_study_system_attr(self, study_id: int, key: str, value: Any) -> None: | CODE |
| LOW | optuna/storages/_grpc/client.py | 318 | def set_trial_user_attr(self, trial_id: int, key: str, value: Any) -> None: | CODE |
| LOW | optuna/storages/_grpc/client.py | 332 | def set_trial_system_attr(self, trial_id: int, key: str, value: Any) -> None: | CODE |
| LOW | optuna/storages/_grpc/__init__.py | 5 | __all__ = [ | CODE |
| LOW⚡ | optuna/storages/_rdb/storage.py | 763 | def set_trial_user_attr(self, trial_id: int, key: str, value: Any) -> None: | CODE |
| LOW⚡ | optuna/storages/_rdb/storage.py | 773 | def set_trial_system_attr(self, trial_id: int, key: str, value: JSONSerializable) -> None: | CODE |
| LOW | optuna/storages/_rdb/storage.py | 337 | def set_study_user_attr(self, study_id: int, key: str, value: Any) -> None: | CODE |
| LOW | optuna/storages/_rdb/storage.py | 349 | def set_study_system_attr(self, study_id: int, key: str, value: JSONSerializable) -> None: | CODE |
| LOW | optuna/storages/_rdb/storage.py | 991 | def _set_default_engine_kwargs_for_mysql(url: str, engine_kwargs: dict[str, Any]) -> None: | CODE |
| LOW | optuna/storages/_rdb/storage.py | 1145 | def _set_alembic_revision(self, revision: str) -> None: | CODE |
| LOW | optuna/study/_dataframe.py | 19 | __all__ = ["pd"] | CODE |
| LOW | optuna/study/__init__.py | 13 | __all__ = [ | CODE |
| LOW | optuna/study/study.py | 707 | def set_user_attr(self, key: str, value: Any) -> None: | CODE |
| LOW | optuna/study/study.py | 752 | def set_system_attr(self, key: str, value: Any) -> None: | CODE |
| LOW | optuna/study/study.py | 1049 | def set_metric_names(self, metric_names: list[str]) -> None: | CODE |
| LOW | optuna/search_space/__init__.py | 7 | __all__ = [ | CODE |
| LOW | optuna/pruners/__init__.py | 19 | __all__ = [ | CODE |
| LOW | optuna/trial/_base.py | 102 | def set_user_attr(self, key: str, value: Any) -> None: | CODE |
| LOW | optuna/trial/_base.py | 107 | def set_system_attr(self, key: str, value: Any) -> None: | CODE |
| LOW | optuna/trial/_fixed.py | 139 | def set_user_attr(self, key: str, value: Any) -> None: | CODE |
| LOW | optuna/trial/_fixed.py | 143 | def set_system_attr(self, key: str, value: Any) -> None: | CODE |
| LOW | optuna/trial/_trial.py | 549 | def set_user_attr(self, key: str, value: Any) -> None: | CODE |
| 38 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | tutorial/20_recipes/014_ablation_study_by_optuna.py | 45 | # Define an objective function using ``suggest_categorical`` and ``suggest_float`` | COMMENT |
| MEDIUM | tutorial/20_recipes/008_specify_params.py | 42 | # Define the objective function. | COMMENT |
| MEDIUM | tutorial/10_key_features/005_visualization.py | 125 | # Define the objective function. | COMMENT |
| MEDIUM | tests/test_cli.py | 322 | # Create a study. | COMMENT |
| MEDIUM | tests/study_tests/test_study.py | 405 | # Create a new study. | COMMENT |
| MEDIUM | tests/study_tests/test_study.py | 1150 | # Create a trial to retrieve it as the `study.best_trial`. | COMMENT |
| MEDIUM | tests/study_tests/test_study.py | 1652 | # Create a study and ask for a new trial. | COMMENT |
| MEDIUM⚡ | tests/storages_tests/test_callbacks.py | 24 | # Create a trial and manually set it as failed. | COMMENT |
| MEDIUM | tests/storages_tests/test_cached_storage.py | 134 | # Create a trial via CachedStorage and update it via backend storage directly. | COMMENT |
| MEDIUM | tests/storages_tests/test_with_server.py | 69 | # Create a study | COMMENT |
| MEDIUM | tests/storages_tests/test_with_server.py | 130 | # Create a new study to confirm the study can load trial properly. | COMMENT |
| MEDIUM | tests/storages_tests/rdb_tests/test_storage.py | 225 | # Create a new study. | COMMENT |
| MEDIUM | tests/storages_tests/rdb_tests/test_storage.py | 275 | # Create a new study. | COMMENT |
| MEDIUM⚡ | tests/storages_tests/rdb_tests/create_db.py | 85 | # Create an empty study. | COMMENT |
| MEDIUM⚡ | tests/storages_tests/rdb_tests/create_db.py | 88 | # Create a study for single-objective optimization. | COMMENT |
| MEDIUM⚡ | tests/storages_tests/rdb_tests/create_db.py | 93 | # Create a study for multi-objective optimization. | COMMENT |
| MEDIUM | tests/storages_tests/rdb_tests/create_db.py | 106 | # Create a study for distributions upgrade. | COMMENT |
| MEDIUM | tests/samplers_tests/test_samplers.py | 67 | # This function is used only in test_reproducible_in_other_process, but declared at top-level | COMMENT |
| MEDIUM | …ion_examples/optuna.visualization.plot_pareto_front.py | 32 | # The following code snippet shows how to plot a 2-dimensional Pareto front | COMMENT |
| MEDIUM | optuna/visualization/_utils.py | 132 | # This function is not raising when target is missing, since we're | COMMENT |
| MEDIUM | optuna/storages/journal/_file.py | 63 | open(self._file_path, "ab").close() # Create a file if it does not exist. | CODE |
| MEDIUM | optuna/storages/_grpc/auto_generated/api_pb2_grpc.py | 398 | # This class is part of an EXPERIMENTAL API. | COMMENT |
| MEDIUM | optuna/study/study.py | 803 | # Create a dataframe from the study. | STRING |
| MEDIUM | optuna/pruners/_hyperband.py | 269 | # This class is assumed to be passed to | COMMENT |
| MEDIUM | …plers/_nsgaiii/_elite_population_selection_strategy.py | 22 | # Define a coefficient for scaling intervals, used in _filter_inf() to replace +-inf. | COMMENT |
| MEDIUM | optuna/samplers/_tpe/_truncnorm.py | 1 | # This file contains the codes from SciPy project. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tutorial/20_recipes/001_rdb.py | 61 | # reproducibility, you need to restore the sampler with using ``pickle`` as follows:: | COMMENT |
| LOW | tutorial/20_recipes/001_rdb.py | 81 | # | COMMENT |
| LOW | tutorial/20_recipes/009_ask_and_tell.py | 81 | clf.fit(X_train, y_train) | COMMENT |
| LOW | tutorial/20_recipes/009_ask_and_tell.py | 101 | # from sklearn.linear_model import SGDClassifier | COMMENT |
| LOW | tutorial/20_recipes/009_ask_and_tell.py | 121 | # trial = study.ask() | COMMENT |
| LOW | tutorial/20_recipes/009_ask_and_tell.py | 141 | # score = clf.score(X_valid, y_valid) | COMMENT |
| LOW | tutorial/20_recipes/009_ask_and_tell.py | 241 | # :class:`optuna.samplers.TPESampler` class can take a boolean parameter ``constant_liar``, | COMMENT |
| LOW | tutorial/20_recipes/010_reuse_best_trial.py | 81 | # Pass ``study.best_trial`` as the argument of ``detailed_objective``. | COMMENT |
| LOW | tutorial/20_recipes/013_wilcoxon_pruner.py | 181 | COMMENT | |
| LOW | tutorial/20_recipes/013_wilcoxon_pruner.py | 201 | # too often, the optimization may get stuck in a local optimum, so we must tune the threshold | COMMENT |
| LOW | tutorial/20_recipes/014_ablation_study_by_optuna.py | 41 | # Basic Ablation Study | COMMENT |
| LOW | tutorial/20_recipes/014_ablation_study_by_optuna.py | 81 | # a finite ``step``. Using ``suggest_float`` without ``step`` will raise an error because | COMMENT |
| LOW | tutorial/20_recipes/014_ablation_study_by_optuna.py | 121 | # The sampler explores all valid paths through the conditional search space: | COMMENT |
| LOW | tutorial/20_recipes/014_ablation_study_by_optuna.py | 141 | # | COMMENT |
| LOW | tutorial/20_recipes/014_ablation_study_by_optuna.py | 161 | # ) | COMMENT |
| LOW | tutorial/20_recipes/014_ablation_study_by_optuna.py | 181 | # python run_ablation.py | COMMENT |
| LOW | tutorial/20_recipes/014_ablation_study_by_optuna.py | 201 | # ------------------------------------------- | COMMENT |
| LOW | tutorial/20_recipes/014_ablation_study_by_optuna.py | 221 | # def objective(trial: optuna.Trial) -> float: | COMMENT |
| LOW | tutorial/20_recipes/014_ablation_study_by_optuna.py | 241 | # ) | COMMENT |
| LOW | tutorial/20_recipes/014_ablation_study_by_optuna.py | 261 | # if trial.state == optuna.trial.TrialState.RUNNING: | COMMENT |
| LOW | tutorial/20_recipes/008_specify_params.py | 101 | # | COMMENT |
| LOW | tutorial/20_recipes/012_artifact_tutorial.py | 321 | # Each function is as follows. | COMMENT |
| LOW | tutorial/20_recipes/012_artifact_tutorial.py | 421 | write("best_atoms.png", best_atoms, rotation=("315x,0y,0z")) | COMMENT |
| LOW | tutorial/20_recipes/012_artifact_tutorial.py | 441 | # | COMMENT |
| LOW | tutorial/20_recipes/011_journal_storage.py | 41 | COMMENT | |
| LOW | tutorial/20_recipes/004_cli.py | 41 | COMMENT | |
| LOW | tutorial/20_recipes/004_cli.py | 61 | # | COMMENT |
| LOW | tutorial/20_recipes/002_multi_objective.py | 121 | # Specifically, in this example, we want to minimize the FLOPS (we want a faster model) | COMMENT |
| LOW | …_key_features/003_efficient_optimization_algorithms.py | 61 | study = optuna.create_study(sampler=optuna.samplers.CmaEsSampler()) | COMMENT |
| LOW | …_key_features/003_efficient_optimization_algorithms.py | 81 | # | COMMENT |
| LOW | …_key_features/003_efficient_optimization_algorithms.py | 141 | optuna.logging.get_logger("optuna").addHandler(logging.StreamHandler(sys.stdout)) | COMMENT |
| LOW | …_key_features/003_efficient_optimization_algorithms.py | 161 | # This table is from the `Ozaki et al., Hyperparameter Optimization Methods: Overview and Characteristics, in IEICE Tran | COMMENT |
| LOW | …_key_features/003_efficient_optimization_algorithms.py | 181 | # | COMMENT |
| LOW | tutorial/10_key_features/002_configurations.py | 41 | COMMENT | |
| LOW | tutorial/10_key_features/002_configurations.py | 61 | if classifier_name == "SVC": | COMMENT |
| LOW | tutorial/10_key_features/002_configurations.py | 81 | # layers = [] | COMMENT |
| LOW | tutorial/10_key_features/001_first.py | 41 | # | COMMENT |
| LOW | tutorial/10_key_features/001_first.py | 61 | # We can see that the ``x`` value found by Optuna is close to the optimal value of ``2``. | COMMENT |
| LOW | tutorial/10_key_features/004_distributed.py | 141 | study = optuna.create_study( | COMMENT |
| LOW | tutorial/10_key_features/004_distributed.py | 161 | # it cannot be used for multi-process optimization. | COMMENT |
| LOW | tutorial/10_key_features/004_distributed.py | 181 | # def run_optimization(_): | COMMENT |
| LOW | tutorial/10_key_features/004_distributed.py | 201 | # Running trial trial.number=3 in process 4607 | COMMENT |
| LOW | tutorial/10_key_features/004_distributed.py | 221 | # it is likely to cause race conditions when accessed by multiple machines. | COMMENT |
| LOW | tutorial/10_key_features/004_distributed.py | 241 | # x = trial.suggest_float("x", -10, 10) | COMMENT |
| LOW | tutorial/10_key_features/004_distributed.py | 261 | # [I 2025-06-03 14:07:45,306] A new study created in RDB with name: distributed_test | COMMENT |
| LOW | tutorial/10_key_features/004_distributed.py | 281 | # In that case, you can use :class:`~optuna.storages.GrpcStorageProxy` | COMMENT |
| LOW | tutorial/10_key_features/004_distributed.py | 301 | # | COMMENT |
| LOW | tutorial/10_key_features/004_distributed.py | 321 | # | COMMENT |
| LOW | tests/study_tests/test_multi_objective.py | 41 | COMMENT | |
| LOW | tests/samplers_tests/test_nsgaii.py | 301 | directions = [direction] | COMMENT |
| LOW | docs/source/conf.py | 1 | # -*- coding: utf-8 -*- | COMMENT |
| LOW | docs/source/conf.py | 121 | # default: ``['localtoc.html', 'relations.html', 'sourcelink.html', | COMMENT |
| LOW | docs/source/conf.py | 141 | # | COMMENT |
| LOW | optuna/visualization/matplotlib/_contour.py | 321 | zmap[(xindex, yindex)] = z | COMMENT |
| LOW | optuna/storages/journal/_storage.py | 321 | if state == TrialState.RUNNING: | COMMENT |
| LOW | optuna/storages/_rdb/alembic.ini | 1 | # A generic, single database configuration. | COMMENT |
| LOW | optuna/storages/_rdb/alembic.ini | 21 | # the 'revision' command, regardless of autogenerate | COMMENT |
| LOW | optuna/samplers/_brute_force.py | 61 | # A node takes one of the following four states: | COMMENT |
| LOW | optuna/samplers/_brute_force.py | 81 | # Examples: | COMMENT |
| LOW | optuna/samplers/_brute_force.py | 101 | # └ 2: a2_node (Unexpanded) | COMMENT |
| 7 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_transform.py | 92 | CODE | |
| LOW | tests/test_cli.py | 64 | CODE | |
| LOW | tests/test_cli.py | 533 | CODE | |
| LOW | tests/test_cli.py | 611 | CODE | |
| LOW | tests/test_cli.py | 687 | CODE | |
| LOW | tests/test_cli.py | 768 | CODE | |
| LOW | tests/test_cli.py | 843 | CODE | |
| LOW | tests/test_cli.py | 928 | CODE | |
| LOW | tests/study_tests/test_study.py | 1087 | CODE | |
| LOW | tests/study_tests/test_dataframe.py | 51 | CODE | |
| LOW | tests/storages_tests/journal_tests/test_journal.py | 124 | CODE | |
| LOW | tests/samplers_tests/test_nsgaii.py | 297 | CODE | |
| LOW | tests/samplers_tests/test_nsgaii.py | 373 | CODE | |
| LOW | tests/visualization_tests/test_contour.py | 396 | CODE | |
| LOW | tests/visualization_tests/test_hypervolume_history.py | 25 | CODE | |
| LOW | tests/visualization_tests/test_hypervolume_history.py | 28 | CODE | |
| LOW | tests/visualization_tests/test_hypervolume_history.py | 29 | CODE | |
| LOW | tests/visualization_tests/test_rank.py | 128 | CODE | |
| LOW | optuna/distributions.py | 565 | CODE | |
| LOW | optuna/distributions.py | 709 | CODE | |
| LOW | optuna/distributions.py | 531 | CODE | |
| LOW | optuna/cli.py | 82 | CODE | |
| LOW | optuna/cli.py | 98 | CODE | |
| LOW | optuna/cli.py | 244 | CODE | |
| LOW | optuna/progress_bar.py | 76 | CODE | |
| LOW | optuna/_transform.py | 175 | CODE | |
| LOW | optuna/_transform.py | 246 | CODE | |
| LOW | optuna/_transform.py | 269 | CODE | |
| LOW | optuna/visualization/_rank.py | 117 | CODE | |
| LOW | optuna/visualization/_rank.py | 308 | CODE | |
| LOW | optuna/visualization/_parallel_coordinate.py | 124 | CODE | |
| LOW | optuna/visualization/_optimization_history.py | 51 | CODE | |
| LOW | optuna/visualization/_optimization_history.py | 139 | CODE | |
| LOW | optuna/visualization/_slice.py | 183 | CODE | |
| LOW | optuna/visualization/_contour.py | 109 | CODE | |
| LOW | optuna/visualization/_contour.py | 260 | CODE | |
| LOW | optuna/visualization/matplotlib/_utils.py | 37 | CODE | |
| LOW | optuna/visualization/matplotlib/_contour.py | 81 | CODE | |
| LOW | optuna/visualization/matplotlib/_contour.py | 326 | CODE | |
| LOW | optuna/storages/_cached_storage.py | 89 | CODE | |
| LOW | optuna/storages/_in_memory.py | 371 | CODE | |
| LOW | optuna/storages/journal/_file.py | 148 | CODE | |
| LOW | optuna/storages/journal/_file.py | 239 | CODE | |
| LOW | optuna/storages/journal/_storage.py | 414 | CODE | |
| LOW | optuna/storages/journal/_storage.py | 578 | CODE | |
| LOW | optuna/storages/_grpc/client.py | 257 | CODE | |
| LOW | optuna/storages/_rdb/storage.py | 675 | CODE | |
| LOW | optuna/storages/_rdb/storage.py | 783 | CODE | |
| LOW | optuna/storages/_rdb/storage.py | 863 | CODE | |
| LOW | optuna/storages/_rdb/alembic/versions/v3.0.0.c.py | 68 | CODE | |
| LOW | optuna/storages/_rdb/alembic/versions/v3.0.0.d.py | 78 | CODE | |
| LOW | optuna/study/_dataframe.py | 22 | CODE | |
| LOW | optuna/study/_optimize.py | 39 | CODE | |
| LOW | optuna/study/_optimize.py | 186 | CODE | |
| LOW | optuna/study/_tell.py | 80 | CODE | |
| LOW | optuna/study/study.py | 1204 | CODE | |
| LOW | optuna/study/study.py | 1607 | CODE | |
| LOW | optuna/trial/_trial.py | 624 | CODE | |
| LOW | optuna/importance/_base.py | 115 | CODE | |
| LOW | optuna/importance/_fanova/_tree.py | 80 | CODE | |
| 12 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tutorial/20_recipes/004_cli.py | 56 | # --search-space '{"x": {"name": "FloatDistribution", "attributes": {"step": null, "low": -10.0, "high": 10.0, | COMMENT |
| HIGH⚡ | tests/test_distributions.py | 65 | "f": '{"type": "float", "low": 1.0, "high": 2.0, "log": false, "step": null}', | CODE |
| HIGH⚡ | tests/test_distributions.py | 66 | "fl": '{"type": "float", "low": 0.001, "high": 100, "log": true, "step": null}', | CODE |
| HIGH | tests/test_distributions.py | 16 | _choices_json = '[null, true, false, 0, 1, 0.0, 1.0, NaN, Infinity, -Infinity, "", "a"]' | CODE |
| HIGH | tests/test_distributions.py | 47 | '"attributes": {"low": 1.0, "high": 2.0, "log": false, "step": null}}', | CODE |
| HIGH | tests/test_distributions.py | 49 | '"attributes": {"low": 0.001, "high": 100.0, "log": true, "step": null}}', | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | optuna/storages/_grpc/auto_generated/api_pb2_grpc.py | 405 | CODE | |
| LOW | optuna/storages/_grpc/auto_generated/api_pb2_grpc.py | 432 | CODE | |
| LOW | optuna/storages/_grpc/auto_generated/api_pb2_grpc.py | 459 | CODE | |
| LOW | optuna/storages/_grpc/auto_generated/api_pb2_grpc.py | 486 | CODE | |
| LOW | optuna/storages/_grpc/auto_generated/api_pb2_grpc.py | 513 | CODE | |
| LOW | optuna/storages/_grpc/auto_generated/api_pb2_grpc.py | 540 | CODE | |
| LOW | optuna/storages/_grpc/auto_generated/api_pb2_grpc.py | 567 | CODE | |
| LOW | optuna/storages/_grpc/auto_generated/api_pb2_grpc.py | 594 | CODE | |
| LOW | optuna/storages/_grpc/auto_generated/api_pb2_grpc.py | 621 | CODE | |
| LOW | optuna/storages/_grpc/auto_generated/api_pb2_grpc.py | 648 | CODE | |
| LOW | optuna/storages/_grpc/auto_generated/api_pb2_grpc.py | 675 | CODE | |
| LOW | optuna/storages/_grpc/auto_generated/api_pb2_grpc.py | 702 | CODE | |
| LOW | optuna/storages/_grpc/auto_generated/api_pb2_grpc.py | 729 | CODE | |
| LOW | optuna/storages/_grpc/auto_generated/api_pb2_grpc.py | 756 | CODE | |
| LOW | optuna/storages/_grpc/auto_generated/api_pb2_grpc.py | 783 | CODE | |
| LOW | optuna/storages/_grpc/auto_generated/api_pb2_grpc.py | 810 | CODE | |
| LOW | optuna/storages/_grpc/auto_generated/api_pb2_grpc.py | 837 | CODE | |
| LOW | optuna/storages/_grpc/auto_generated/api_pb2_grpc.py | 864 | CODE | |
| LOW | optuna/storages/_grpc/auto_generated/api_pb2_grpc.py | 891 | CODE | |
| LOW | optuna/trial/_frozen.py | 483 | CODE | |
| LOW | optuna/_gp/batched_lbfgsb.py | 89 | CODE | |
| LOW | optuna/samplers/_cmaes.py | 271 | CODE | |
| LOW | optuna/samplers/_nsgaiii/_sampler.py | 83 | CODE | |
| LOW | optuna/samplers/nsgaii/_sampler.py | 166 | CODE | |
| LOW | optuna/samplers/_tpe/sampler.py | 357 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | tutorial/20_recipes/013_wilcoxon_pruner.py | 205 | # Some samplers, including the default ``TPESampler``, currently cannot utilize the | COMMENT |
| MEDIUM⚡ | tutorial/20_recipes/008_specify_params.py | 103 | # Second scenario: Have Optuna utilize already evaluated hyperparameters | COMMENT |
| LOW | optuna/_gp/gp.py | 314 | # Note that we cannot just use the constraint because of the numerical instability | COMMENT |
| LOW | optuna/_gp/acqf.py | 385 | # Since all the objectives are equally important, we simply use the mean of | COMMENT |
| LOW | optuna/_gp/acqf.py | 451 | # Since all the objectives are equally important, we simply use the mean of | COMMENT |
| MEDIUM | optuna/samplers/_brute_force.py | 110 | # Essentially, each node represents a param value, and a path from the first node to the leaf | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | optuna/visualization/_parallel_coordinate.py | 0 | plot the high-dimensional parameter relationships in a study with matplotlib. note that, if a parameter contains missing | STRING |
| HIGH | optuna/visualization/_contour.py | 0 | plot the high-dimensional parameter relationships in a study with matplotlib. note that, if a parameter contains missing | STRING |
| HIGH | optuna/visualization/matplotlib/_parallel_coordinate.py | 0 | plot the high-dimensional parameter relationships in a study with matplotlib. note that, if a parameter contains missing | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tutorial/10_key_features/002_configurations.py | 49 | # Also, you can use branches or loops depending on the parameter values. | COMMENT |
| MEDIUM | tutorial/10_key_features/004_distributed.py | 232 | # Then, you can use this MySQL database as a storage backend by setting the | COMMENT |
| MEDIUM | tutorial/10_key_features/004_distributed.py | 281 | # In that case, you can use :class:`~optuna.storages.GrpcStorageProxy` | COMMENT |
| MEDIUM | optuna/_hypervolume/wfg.py | 104 | # which is guaranteed. As mentioned earlier, if all ``False`` in on_front is correct, the | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/test_cli.py | 149 | # Check if study_name is stored in the storage. | COMMENT |
| LOW | tests/test_cli.py | 1016 | # Check if study_name is stored in the storage. | COMMENT |
| LOW | tests/storages_tests/rdb_tests/test_storage.py | 334 | # Check if Study.optimize can run on new storage. | COMMENT |
| LOW | tests/samplers_tests/test_base_gasampler.py | 109 | assert len(mock_study.mock_calls) == 2 # Check if only the two calls above were made | CODE |
| LOW | optuna/testing/pytest_storages.py | 338 | # Check if trial_number starts from 0. | COMMENT |
| LOW | optuna/testing/pytest_storages.py | 441 | # Set params to another trial. | COMMENT |
| LOW | optuna/samplers/_partial_fixed.py | 101 | # Check if a parameter value is contained in the range of this distribution. | COMMENT |
| LOW | optuna/samplers/_tpe/sampler.py | 901 | weights_below = np.where(is_feasible, 1.0, EPS) # Assign EPS to infeasible trials. | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/visualization_tests/test_utils.py | 52 | except Exception: | CODE |
| MEDIUM | tests/visualization_tests/test_utils.py | 47 | def _is_plotly_available() -> bool: | CODE |
| LOW | optuna/progress_bar.py | 28 | except Exception: | CODE |
| LOW | optuna/artifacts/_backoff.py | 75 | except Exception as e: | CODE |
| LOW | optuna/artifacts/_backoff.py | 90 | except Exception as e: | CODE |
| LOW | optuna/artifacts/_backoff.py | 104 | except Exception as e: | CODE |
| LOW | optuna/storages/journal/_storage.py | 597 | except Exception: | CODE |
| LOW | optuna/storages/_rdb/storage.py | 99 | except Exception: | CODE |
| LOW | optuna/study/_optimize.py | 225 | except Exception: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | optuna/pruners/_hyperband.py | 204 | # In this implementation, we combine this formula and that of ASHA paper | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/study_tests/test_dataframe.py | 131 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | optuna/testing/pytest_storages.py | 415 | storage.get_trial_param(existent_trial_id, "dummy-key") | CODE |