A hyperparameter optimization framework
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.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 1191 finding(s).
Are imports declared and package/API names verified? 492 finding(s).
Are wrappers, guards, and repeated structures necessary? 1160 finding(s).
Which changes need focused human review? 1856 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 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.
| 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_transform.py | 230 | def test_untransform_numerical_param_int_uses_equal_width_bins() -> None: | 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 | 25 | def assert_is_output_equal_to_ans( | CODE |
| LOW | tests/test_multi_objective.py | 47 | def test_get_pareto_front_trials( | CODE |
| LOW | tests/test_multi_objective.py | 76 | 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 |
| 902 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_evaluator.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 | |
| LOW | tests/gp_tests/test_gp.py | 1 | CODE | |
| 425 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 | 325 | # ╔═════╤═════╤═════╤═════╤═════╤═════╗ | COMMENT |
| MEDIUM⚡ | tests/samplers_tests/test_nsgaii.py | 327 | # ╟─────┼─────┼─────┼─────┼─────┼─────╢ | COMMENT |
| MEDIUM⚡ | tests/samplers_tests/test_nsgaii.py | 329 | # ╟─────┼─feasible ─┼─────┼─────┼─────╢ | COMMENT |
| MEDIUM⚡ | tests/samplers_tests/test_nsgaii.py | 331 | # c1 ╟─────┼─────┼─────┼─────┼─────┼─────╢ | COMMENT |
| MEDIUM⚡ | tests/samplers_tests/test_nsgaii.py | 333 | # ╟─────┼─────┼─────┼─────┼─────┼─────╢ | COMMENT |
| MEDIUM⚡ | tests/samplers_tests/test_nsgaii.py | 335 | # ╟─────┼─────┼─────┼─────┼─────┼─────╢ | COMMENT |
| MEDIUM⚡ | tests/samplers_tests/test_nsgaii.py | 337 | # ╚═════╧═════╧═════╧═════╧═════╧═════╝ | COMMENT |
| MEDIUM⚡ | optuna/samplers/_brute_force.py | 60 | # ┌────────────┬─────────────────┬────────────┐ | 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 |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | optuna/visualization/_timeline.py | 37 | 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 | 130 | def _set_bar_labels(info: _ImportancesInfo, fig: "Figure", ax: "Axes", offset: float) -> None: | CODE |
| LOW | optuna/visualization/matplotlib/_matplotlib_imports.py | 32 | __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 | 110 | def set_study_system_attr(self, study_id: int, key: str, value: JSONSerializable) -> None: | CODE |
| LOW | optuna/storages/_in_memory.py | 296 | def _update_cache(self, trial_id: int, study_id: int) -> None: | CODE |
| LOW | optuna/storages/_in_memory.py | 341 | def set_trial_user_attr(self, trial_id: int, key: str, value: Any) -> None: | CODE |
| LOW | optuna/storages/_in_memory.py | 352 | def set_trial_system_attr(self, trial_id: int, key: str, value: JSONSerializable) -> None: | CODE |
| LOW | optuna/storages/_in_memory.py | 371 | 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 | 188 | def set_study_user_attr(self, study_id: int, key: str, value: Any) -> None: | CODE |
| LOW | optuna/storages/journal/_storage.py | 194 | def set_study_system_attr(self, study_id: int, key: str, value: JSONSerializable) -> None: | CODE |
| LOW | optuna/storages/journal/_storage.py | 369 | def set_trial_user_attr(self, trial_id: int, key: str, value: Any) -> None: | CODE |
| LOW | optuna/storages/journal/_storage.py | 379 | 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 | 145 | def set_study_user_attr(self, study_id: int, key: str, value: Any) -> None: | CODE |
| LOW | optuna/storages/_grpc/client.py | 156 | def set_study_system_attr(self, study_id: int, key: str, value: Any) -> None: | CODE |
| LOW | optuna/storages/_grpc/client.py | 320 | def set_trial_user_attr(self, trial_id: int, key: str, value: Any) -> None: | CODE |
| LOW | optuna/storages/_grpc/client.py | 334 | 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 | 758 | def set_trial_user_attr(self, trial_id: int, key: str, value: Any) -> None: | CODE |
| LOW⚡ | optuna/storages/_rdb/storage.py | 768 | def set_trial_system_attr(self, trial_id: int, key: str, value: JSONSerializable) -> None: | CODE |
| LOW | optuna/storages/_rdb/storage.py | 332 | def set_study_user_attr(self, study_id: int, key: str, value: Any) -> None: | CODE |
| LOW | optuna/storages/_rdb/storage.py | 344 | def set_study_system_attr(self, study_id: int, key: str, value: JSONSerializable) -> None: | CODE |
| LOW | optuna/storages/_rdb/storage.py | 986 | def _set_default_engine_kwargs_for_mysql(url: str, engine_kwargs: dict[str, Any]) -> None: | CODE |
| LOW | optuna/storages/_rdb/storage.py | 1140 | 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 | 694 | def set_user_attr(self, key: str, value: Any) -> None: | CODE |
| LOW | optuna/study/study.py | 1021 | 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 | 99 | def set_user_attr(self, key: str, value: Any) -> None: | CODE |
| LOW | optuna/trial/_base.py | 131 | def set_constraint(self, key: str, value: float) -> None: | CODE |
| LOW | optuna/trial/_fixed.py | 135 | def set_user_attr(self, key: str, value: Any) -> None: | CODE |
| LOW | optuna/trial/_fixed.py | 197 | def set_constraint(self, key: str, value: float) -> None: | CODE |
| LOW | optuna/trial/_trial.py | 545 | def set_user_attr(self, key: str, value: Any) -> None: | CODE |
| LOW | optuna/trial/_trial.py | 748 | def set_constraint(self, key: str, value: float) -> None: | CODE |
| 37 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 | 429 | # Create a new study. | COMMENT |
| MEDIUM | tests/study_tests/test_study.py | 1176 | # Create a trial to retrieve it as the `study.best_trial`. | COMMENT |
| MEDIUM | tests/study_tests/test_study.py | 1678 | # 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/storages_tests/journal_tests/test_journal.py | 323 | # Create an Optuna study | 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 | 34 | # The following code snippet shows how to plot a 2-dimensional Pareto front | COMMENT |
| MEDIUM | optuna/visualization/_utils.py | 105 | # This function is not raising when target is missing, since we're | COMMENT |
| MEDIUM | optuna/storages/journal/_file.py | 62 | 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 | 775 | # 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 | 23 | # 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 | 321 | # When both trials are infeasible, the trial with smaller violation dominates | COMMENT |
| LOW | docs/source/conf.py | 1 | # -*- coding: utf-8 -*- | COMMENT |
| LOW | docs/source/conf.py | 121 | # defined by theme itself. Builtin themes are using these templates by | COMMENT |
| LOW | docs/source/conf.py | 141 | # Additional stuff for the LaTeX preamble. | COMMENT |
| LOW | optuna/visualization/matplotlib/_contour.py | 321 | zmap[(xindex, yindex)] = z | COMMENT |
| LOW | optuna/storages/journal/_storage.py | 321 | elif state.is_finished(): | 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 | # │ State │ children │ is_running │ | COMMENT |
| LOW | optuna/samplers/_brute_force.py | 81 | # {"a": 0, "b": 0.0}, {"a": 0, "b": 1.0}, {"a": 1, "b": 0.0, "c": 0} | COMMENT |
| LOW | optuna/samplers/_brute_force.py | 101 | # We know that `Unexpanded` paths such as `{"a": 1, "b": 1}` can be sampled because | 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 | 1113 | CODE | |
| LOW | tests/study_tests/test_dataframe.py | 51 | CODE | |
| LOW | tests/storages_tests/journal_tests/test_journal.py | 173 | CODE | |
| LOW | tests/samplers_tests/test_nsgaii.py | 314 | CODE | |
| LOW | tests/visualization_tests/test_contour.py | 390 | CODE | |
| LOW | tests/visualization_tests/test_hypervolume_history.py | 25 | CODE | |
| LOW | tests/visualization_tests/test_hypervolume_history.py | 30 | CODE | |
| LOW | tests/visualization_tests/test_hypervolume_history.py | 31 | CODE | |
| LOW | tests/visualization_tests/test_rank.py | 126 | 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 | 116 | CODE | |
| LOW | optuna/visualization/_rank.py | 306 | CODE | |
| LOW | optuna/visualization/_parallel_coordinate.py | 239 | CODE | |
| LOW | optuna/visualization/_optimization_history.py | 50 | CODE | |
| LOW | optuna/visualization/_optimization_history.py | 137 | CODE | |
| LOW | optuna/visualization/_slice.py | 181 | CODE | |
| LOW | optuna/visualization/_contour.py | 108 | CODE | |
| LOW | optuna/visualization/_contour.py | 259 | 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 | 375 | CODE | |
| LOW | optuna/storages/journal/_file.py | 146 | CODE | |
| LOW | optuna/storages/journal/_file.py | 237 | CODE | |
| LOW | optuna/storages/journal/_storage.py | 420 | CODE | |
| LOW | optuna/storages/journal/_storage.py | 590 | CODE | |
| LOW | optuna/storages/_grpc/client.py | 259 | CODE | |
| LOW | optuna/storages/_rdb/storage.py | 670 | CODE | |
| LOW | optuna/storages/_rdb/storage.py | 778 | CODE | |
| LOW | optuna/storages/_rdb/storage.py | 858 | 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 | 190 | CODE | |
| LOW | optuna/study/_tell.py | 80 | CODE | |
| LOW | optuna/study/study.py | 1163 | CODE | |
| LOW | optuna/study/study.py | 1536 | CODE | |
| LOW | optuna/trial/_trial.py | 602 | CODE | |
| LOW | optuna/importance/_base.py | 115 | CODE | |
| LOW | optuna/importance/_fanova/_tree.py | 80 | CODE | |
| LOW | optuna/testing/pytest_storages.py | 771 | 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 |
|---|---|---|---|---|
| HIGH | tests/storages_tests/test_with_server.py | 117 | except KeyError: | CODE |
| HIGH | tests/storages_tests/test_with_server.py | 182 | except KeyError: | CODE |
| HIGH | optuna/progress_bar.py | 96 | except ValueError: | CODE |
| HIGH | optuna/storages/_heartbeat.py | 183 | except optuna.exceptions.UpdateFinishedTrialError: | CODE |
| HIGH | optuna/study/study.py | 1155 | except ValueError: | CODE |
| HIGH | optuna/testing/tempfile_pool.py | 68 | except (FileNotFoundError, PermissionError): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | optuna/trial/_fixed.py | 0 | returns constraint values. the trial is considered feasible when all constraint values are zero or less. returns: constr | STRING |
| HIGH | optuna/trial/_trial.py | 0 | returns constraint values. the trial is considered feasible when all constraint values are zero or less. returns: constr | STRING |
| HIGH | optuna/trial/_frozen.py | 0 | returns constraint values. the trial is considered feasible when all constraint values are zero or less. returns: constr | STRING |
| HIGH | optuna/trial/_fixed.py | 0 | set a constraint value for the trial. args: key: a constraint name. value: a constraint value. the trial is considered f | STRING |
| HIGH | optuna/trial/_trial.py | 0 | set a constraint value for the trial. args: key: a constraint name. value: a constraint value. the trial is considered f | STRING |
| HIGH | optuna/trial/_frozen.py | 0 | set a constraint value for the trial. args: key: a constraint name. value: a constraint value. the trial is considered f | STRING |
| 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 | 519 | CODE | |
| LOW | optuna/_gp/batched_lbfgsb.py | 89 | CODE | |
| LOW | optuna/samplers/_cmaes.py | 271 | CODE | |
| LOW | optuna/samplers/_nsgaiii/_sampler.py | 86 | CODE | |
| LOW | optuna/samplers/nsgaii/_sampler.py | 169 | CODE | |
| LOW | optuna/samplers/_tpe/sampler.py | 330 | 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 | 323 | # Note that we cannot just use the constraint because of the numerical instability | COMMENT |
| LOW | optuna/_gp/acqf.py | 480 | # Since all the objectives are equally important, we simply use the mean of | COMMENT |
| LOW | optuna/_gp/acqf.py | 578 | # Since all the objectives are equally important, we simply use the mean of | COMMENT |
| MEDIUM | optuna/samplers/_brute_force.py | 108 | # Essentially, each node represents a param value, and a path from the first node to the leaf | COMMENT |
| 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 | 343 | # Check if trial_number starts from 0. | COMMENT |
| LOW | optuna/testing/pytest_storages.py | 445 | # 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 |
| 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 | 105 | except Exception as e: | CODE |
| LOW | optuna/storages/journal/_storage.py | 609 | except Exception: | CODE |
| LOW | optuna/storages/_rdb/storage.py | 99 | except Exception: | CODE |
| LOW | optuna/study/_optimize.py | 229 | 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 | 419 | storage.get_trial_param(existent_trial_id, "dummy-key") | CODE |