A hyperparameter optimization framework
1647 matches across 14 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tutorial/20_recipes/005_user_defined_sampler.py | 96 | def infer_relative_search_space(self, study, trial): |
| LOW | tests/test_transform.py | 28 | def test_search_space_transform_shapes_dtypes(param: Any, distribution: BaseDistribution) -> None: |
| LOW | tests/test_transform.py | 44 | def test_search_space_transform_encoding() -> None: |
| LOW | tests/test_transform.py | 92 | def test_search_space_transform_numerical( |
| LOW | tests/test_transform.py | 146 | def test_search_space_transform_values_categorical( |
| LOW | tests/test_transform.py | 161 | def test_search_space_transform_untransform_params() -> None: |
| LOW | tests/test_transform.py | 208 | def test_transform_untransform_params_at_bounds( |
| LOW | tests/test_imports.py | 6 | def test_try_import_is_successful() -> None: |
| LOW | tests/test_imports.py | 13 | def test_try_import_is_successful_other_error() -> None: |
| LOW | tests/test_imports.py | 21 | def test_try_import_not_successful() -> None: |
| LOW | tests/test_convert_positional_args.py | 24 | def test_convert_positional_args_decorator() -> None: |
| LOW | tests/test_convert_positional_args.py | 36 | def test_convert_positional_args_future_warning_for_methods() -> None: |
| LOW | tests/test_convert_positional_args.py | 49 | def test_convert_positional_args_future_warning() -> None: |
| LOW | tests/test_convert_positional_args.py | 70 | def test_convert_positional_args_mypy_type_inference() -> None: |
| LOW | tests/test_convert_positional_args.py | 104 | def test_convert_positional_args_invalid_previous_positional_arg_names( |
| LOW | tests/test_convert_positional_args.py | 125 | def test_convert_positional_args_invalid_positional_args() -> None: |
| LOW | tests/test_deprecated.py | 36 | def test_deprecation_raises_error_for_invalid_version( |
| LOW | tests/test_deprecated.py | 46 | def test_deprecation_decorator() -> None: |
| LOW | tests/test_deprecated.py | 65 | def test_deprecation_instance_method_decorator() -> None: |
| LOW | tests/test_deprecated.py | 79 | def test_deprecation_class_decorator() -> None: |
| LOW | tests/test_deprecated.py | 96 | def test_deprecation_class_decorator_name() -> None: |
| LOW | tests/test_deprecated.py | 108 | def test_deprecation_decorator_name() -> None: |
| LOW | tests/test_deprecated.py | 124 | def test_deprecation_text_specified(text: str | None) -> None: |
| LOW | tests/test_deprecated.py | 152 | def test_deprecation_class_text_specified(text: str | None) -> None: |
| LOW | tests/test_deprecated.py | 182 | def test_deprecation_decorator_default_removed_version() -> None: |
| LOW | tests/test_distributions.py | 74 | def test_json_to_distribution() -> None: |
| LOW | tests/test_distributions.py | 83 | def test_abbreviated_json_to_distribution() -> None: |
| LOW | tests/test_distributions.py | 525 | def test_categorical_init_error() -> None: |
| LOW | tests/test_distributions.py | 530 | def test_categorical_distribution_different_sequence_types() -> None: |
| LOW | tests/test_distributions.py | 538 | def test_convert_old_distribution_to_new_distribution() -> None: |
| LOW | tests/test_distributions.py | 108 | def test_distribution_to_json() -> None: |
| LOW | tests/test_distributions.py | 119 | def test_check_distribution_compatibility() -> None: |
| LOW | tests/test_distributions.py | 200 | def test_int_internal_representation(value: Any) -> None: |
| LOW | tests/test_distributions.py | 224 | def test_int_internal_representation_error(value: Any, kwargs: dict[str, Any]) -> None: |
| LOW | tests/test_distributions.py | 234 | def test_float_internal_representation(value: Any) -> None: |
| LOW | tests/test_distributions.py | 258 | def test_float_internal_representation_error(value: Any, kwargs: dict[str, Any]) -> None: |
| LOW | tests/test_distributions.py | 264 | def test_categorical_internal_representation() -> None: |
| LOW | tests/test_distributions.py | 330 | def test_categorical_contains() -> None: |
| LOW | tests/test_distributions.py | 339 | def test_empty_range_contains() -> None: |
| LOW | tests/test_distributions.py | 419 | def test_invalid_distribution() -> None: |
| LOW | tests/test_distributions.py | 459 | def test_int_distribution_asdict(key: str, low: int, high: int, log: bool, step: int) -> None: |
| LOW | tests/test_distributions.py | 472 | def test_float_distribution_asdict( |
| LOW | tests/test_distributions.py | 570 | def test_convert_old_distribution_to_new_distribution_noop() -> None: |
| LOW | tests/test_multi_objective.py | 24 | def assert_is_output_equal_to_ans( |
| LOW | tests/test_multi_objective.py | 46 | def test_get_pareto_front_trials( |
| LOW | tests/test_multi_objective.py | 73 | def test_get_pareto_front_trials_with_constraint( |
| LOW | tests/test_cli.py | 139 | def test_create_study_command_with_study_name() -> None: |
| LOW | tests/test_cli.py | 154 | def test_create_study_command_without_storage_url() -> None: |
| LOW | tests/test_cli.py | 164 | def test_create_study_command_with_storage_env() -> None: |
| LOW | tests/test_cli.py | 48 | def objective_func_branched_search_space(trial: Trial) -> float: |
| LOW | tests/test_cli.py | 59 | def objective_func_multi_objective(trial: Trial) -> tuple[float, float]: |
| LOW | tests/test_cli.py | 121 | def test_create_study_command() -> None: |
| LOW | tests/test_cli.py | 183 | def test_create_study_command_with_direction() -> None: |
| LOW | tests/test_cli.py | 205 | def test_create_study_command_with_multiple_directions() -> None: |
| LOW | tests/test_cli.py | 257 | def test_delete_study_command() -> None: |
| LOW | tests/test_cli.py | 274 | def test_delete_study_command_without_storage_url() -> None: |
| LOW | tests/test_cli.py | 282 | def test_study_set_user_attr_command() -> None: |
| LOW | tests/test_cli.py | 366 | def test_study_names_command_without_storage_url() -> None: |
| LOW | tests/test_cli.py | 442 | def test_studies_command_flatten(output_format: str | None) -> None: |
| LOW | tests/test_cli.py | 611 | def test_trials_command_flatten( |
| 841 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tutorial/20_recipes/012_artifact_tutorial.py | 252 | |
| LOW | tutorial/10_key_features/002_configurations.py | 17 | |
| LOW | tests/test_convert_positional_args.py | 1 | |
| LOW | tests/test_deprecated.py | 1 | |
| LOW | tests/test_distributions.py | 1 | |
| LOW | tests/test_multi_objective.py | 1 | |
| LOW | tests/test_cli.py | 1 | |
| LOW | tests/trial_tests/test_frozen.py | 1 | |
| LOW | tests/trial_tests/test_trials.py | 1 | |
| LOW | tests/trial_tests/test_trial.py | 1 | |
| LOW | tests/trial_tests/test_fixed.py | 1 | |
| LOW | tests/pruners_tests/test_percentile.py | 1 | |
| LOW | tests/pruners_tests/test_median.py | 1 | |
| LOW | tests/pruners_tests/test_patient.py | 1 | |
| LOW | tests/pruners_tests/test_wilcoxon.py | 1 | |
| LOW | tests/pruners_tests/test_successive_halving.py | 1 | |
| LOW | tests/pruners_tests/test_hyperband.py | 1 | |
| LOW | tests/study_tests/test_optimize.py | 1 | |
| LOW | tests/study_tests/test_study.py | 1 | |
| LOW | tests/study_tests/test_multi_objective.py | 1 | |
| LOW | tests/study_tests/test_dataframe.py | 1 | |
| LOW | tests/hypervolume_tests/test_hssp.py | 1 | |
| LOW | tests/hypervolume_tests/test_box_decomposition.py | 1 | |
| LOW | tests/importance_tests/test_importance_evaluators.py | 1 | |
| LOW | tests/importance_tests/test_init.py | 1 | |
| LOW | tests/importance_tests/fanova_tests/test_tree.py | 1 | |
| LOW | tests/importance_tests/pedanova_tests/test_evaluator.py | 1 | |
| LOW | …ce_tests/pedanova_tests/test_scott_parzen_estimator.py | 1 | |
| LOW | tests/artifacts_tests/test_upload_artifact.py | 1 | |
| LOW | tests/artifacts_tests/test_boto3.py | 1 | |
| LOW | tests/artifacts_tests/test_download_artifact.py | 1 | |
| LOW | tests/artifacts_tests/test_gcs.py | 1 | |
| LOW | tests/artifacts_tests/stubs.py | 1 | |
| LOW | tests/artifacts_tests/test_list_artifact_meta.py | 1 | |
| LOW | tests/storages_tests/test_grpc.py | 1 | |
| LOW | tests/storages_tests/test_heartbeat.py | 1 | |
| LOW | tests/storages_tests/test_cached_storage.py | 1 | |
| LOW | tests/storages_tests/test_storages.py | 1 | |
| LOW | tests/storages_tests/test_with_server.py | 1 | |
| LOW | tests/storages_tests/rdb_tests/test_storage.py | 1 | |
| LOW | tests/storages_tests/rdb_tests/test_storage.py | 19 | |
| LOW | tests/storages_tests/rdb_tests/test_models.py | 1 | |
| LOW | tests/storages_tests/rdb_tests/create_db.py | 39 | |
| LOW | tests/storages_tests/journal_tests/test_journal.py | 1 | |
| LOW | …ages_tests/journal_tests/test_combination_with_grpc.py | 1 | |
| LOW | tests/samplers_tests/test_grid.py | 1 | |
| LOW | tests/samplers_tests/test_gp.py | 1 | |
| LOW | tests/samplers_tests/test_cmaes.py | 1 | |
| LOW | tests/samplers_tests/test_samplers.py | 1 | |
| LOW | tests/samplers_tests/test_base_gasampler.py | 1 | |
| LOW | tests/samplers_tests/test_nsgaii.py | 1 | |
| LOW | tests/samplers_tests/test_nsgaiii.py | 1 | |
| LOW | tests/samplers_tests/test_qmc.py | 1 | |
| LOW | tests/samplers_tests/tpe_tests/test_parzen_estimator.py | 1 | |
| LOW | tests/samplers_tests/tpe_tests/test_truncnorm.py | 1 | |
| LOW | …mplers_tests/tpe_tests/test_multi_objective_sampler.py | 1 | |
| LOW | tests/samplers_tests/tpe_tests/test_sampler.py | 1 | |
| LOW | tests/gp_tests/test_batched_lbfgsb.py | 1 | |
| LOW | tests/gp_tests/test_search_space.py | 1 | |
| LOW | tests/gp_tests/test_gp.py | 1 | |
| 425 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | tutorial/20_recipes/003_attributes.py | 12 | # --------------------------------- |
| MEDIUM | tutorial/20_recipes/003_attributes.py | 52 | # -------------------------------- |
| MEDIUM | tutorial/20_recipes/001_rdb.py | 48 | # ------------ |
| MEDIUM | tutorial/20_recipes/001_rdb.py | 78 | # -------------------- |
| MEDIUM | tutorial/20_recipes/009_ask_and_tell.py | 154 | # --------------- |
| MEDIUM | tutorial/20_recipes/009_ask_and_tell.py | 156 | # --------------- |
| MEDIUM | tutorial/20_recipes/009_ask_and_tell.py | 193 | # ------------------- |
| MEDIUM | tutorial/20_recipes/009_ask_and_tell.py | 195 | # ------------------- |
| MEDIUM | tutorial/20_recipes/010_reuse_best_trial.py | 87 | # ---------------------------------------------------------------------------------- |
| MEDIUM | tutorial/20_recipes/013_wilcoxon_pruner.py | 186 | # --------------------------------------------------------------------------------------- |
| MEDIUM | tutorial/20_recipes/013_wilcoxon_pruner.py | 195 | # ----------------------------- |
| MEDIUM | tutorial/20_recipes/008_specify_params.py | 102 | # ---------------------------------------------------------------------- |
| MEDIUM | tutorial/20_recipes/008_specify_params.py | 104 | # ---------------------------------------------------------------------- |
| MEDIUM | tutorial/20_recipes/007_optuna_callback.py | 17 | # ------------------------------------------------------- |
| MEDIUM | tutorial/20_recipes/012_artifact_tutorial.py | 440 | # ---------- |
| MEDIUM | tutorial/20_recipes/002_multi_objective.py | 117 | # -------------------------------- |
| MEDIUM | …_key_features/003_efficient_optimization_algorithms.py | 67 | # ------------------ |
| MEDIUM | …_key_features/003_efficient_optimization_algorithms.py | 96 | # ------------------ |
| MEDIUM | …_key_features/003_efficient_optimization_algorithms.py | 151 | # ---------------------------------------- |
| MEDIUM | …_key_features/003_efficient_optimization_algorithms.py | 179 | # ------------------------------- |
| MEDIUM | tutorial/10_key_features/002_configurations.py | 45 | # ------------------------- |
| MEDIUM | tutorial/10_key_features/001_first.py | 72 | # ------------ |
| MEDIUM | tutorial/10_key_features/005_visualization.py | 172 | # -------------- |
| MEDIUM | tutorial/10_key_features/005_visualization.py | 228 | # --------------------------- |
| MEDIUM | tutorial/10_key_features/004_distributed.py | 152 | # ---------------------------------------------- |
| MEDIUM | tutorial/10_key_features/004_distributed.py | 218 | # --------------------------------------- |
| MEDIUM | tutorial/10_key_features/004_distributed.py | 278 | # --------------------------------------------- |
| MEDIUM | tests/study_tests/test_multi_objective.py | 46 | # ╔═════╤═════╤═════╤═════╤═════╗ |
| MEDIUM | tests/study_tests/test_multi_objective.py | 48 | # ╟─────┼─────┼─────┼─────┼─────╢ |
| MEDIUM | tests/study_tests/test_multi_objective.py | 50 | # ╟─────┼─────┼─────┼─────┼─────╢ |
| MEDIUM | tests/study_tests/test_multi_objective.py | 52 | # value0 ╟─────┼─────┼─────┼─────┼─────╢ |
| MEDIUM | tests/study_tests/test_multi_objective.py | 54 | # ╟─────┼─────┼─────┼─────┼─────╢ |
| MEDIUM | tests/study_tests/test_multi_objective.py | 56 | # ╚═════╧═════╧═════╧═════╧═════╝ |
| MEDIUM | tests/samplers_tests/test_nsgaii.py | 299 | # ╔═════╤═════╤═════╤═════╤═════╤═════╗ |
| MEDIUM | tests/samplers_tests/test_nsgaii.py | 301 | # ╟─────┼─────┼─────┼─────┼─────┼─────╢ |
| MEDIUM | tests/samplers_tests/test_nsgaii.py | 303 | # ╟─────┼─feasible ─┼─────┼─────┼─────╢ |
| MEDIUM | tests/samplers_tests/test_nsgaii.py | 305 | # c1 ╟─────┼─────┼─────┼─────┼─────┼─────╢ |
| MEDIUM | tests/samplers_tests/test_nsgaii.py | 307 | # ╟─────┼─────┼─────┼─────┼─────┼─────╢ |
| MEDIUM | tests/samplers_tests/test_nsgaii.py | 309 | # ╟─────┼─────┼─────┼─────┼─────┼─────╢ |
| MEDIUM | tests/samplers_tests/test_nsgaii.py | 311 | # ╚═════╧═════╧═════╧═════╧═════╧═════╝ |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | optuna/visualization/_timeline.py | 38 | Plot the timeline of a study. Args: study: A :class:`~optuna.study.Study` object whose trials a |
| HIGH | optuna/visualization/matplotlib/_timeline.py | 24 | Plot the timeline of a study. .. seealso:: Please refer to :func:`optuna.visualization.plot_timeline` for a |
| 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 |
| HIGH | optuna/storages/_base.py | 135 | Read the ID of a study. Args: study_name: Name of the study. Returns: |
| HIGH | optuna/storages/_base.py | 152 | Read the study name of a study. Args: study_id: ID of the study. Returns: |
| HIGH | optuna/storages/_base.py | 169 | Read whether a study maximizes or minimizes an objective. Args: study_id: ID of a s |
| HIGH | optuna/storages/_base.py | 186 | Read the user-defined attributes of a study. Args: study_id: ID of the study. |
| HIGH | optuna/storages/_base.py | 203 | Read the optuna-internal attributes of a study. Args: study_id: ID of the study. |
| 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. |
| HIGH | optuna/storages/_base.py | 281 | Read the trial ID of a trial. Args: study_id: ID of the study. trial_nu |
| 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 |
| HIGH | optuna/storages/_base.py | 322 | Read the parameter of a trial. Args: trial_id: ID of the trial. param_n |
| HIGH | optuna/storages/_base.py | 345 | Update the state and values of a trial. Set return values of an objective function to values argument. |
| HIGH | optuna/storages/_base.py | 445 | Read a trial. Args: trial_id: ID of the trial. Returns: Trial |
| HIGH | optuna/storages/_base.py | 467 | Read all trials in a study. Args: study_id: ID of the study. deepcopy: |
| HIGH | optuna/storages/_base.py | 490 | Count the number of trials in a study. Args: study_id: ID of the study. |
| 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 |
| HIGH | optuna/storages/_base.py | 551 | Read the parameter dictionary of a trial. Args: trial_id: ID of the trial. |
| HIGH | optuna/storages/_base.py | 568 | Read the user-defined attributes of a trial. Args: trial_id: ID of the trial. |
| HIGH | optuna/storages/_base.py | 584 | Read the optuna-internal attributes of a trial. Args: trial_id: ID of the trial. |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | tests/hypervolume_tests/test_box_decomposition.py | 0 | see section 4.2 of https://arxiv.org/pdf/1510.01963 |
| HIGH | tests/hypervolume_tests/test_box_decomposition.py | 0 | see section 4.2 of https://arxiv.org/pdf/1510.01963 |
| HIGH | tests/hypervolume_tests/test_box_decomposition.py | 0 | see section 4.2 of https://arxiv.org/pdf/1510.01963 |
| HIGH | …mplers_tests/tpe_tests/test_multi_objective_sampler.py | 0 | test samples are drawn from the specified category. |
| HIGH | tests/samplers_tests/tpe_tests/test_sampler.py | 0 | test samples are drawn from the specified category. |
| HIGH | tests/samplers_tests/tpe_tests/test_sampler.py | 0 | test samples are drawn from the specified category. |
| HIGH | …mplers_tests/tpe_tests/test_multi_objective_sampler.py | 0 | test sampling from int distribution returns integer. |
| HIGH | tests/samplers_tests/tpe_tests/test_sampler.py | 0 | test sampling from int distribution returns integer. |
| HIGH | tests/samplers_tests/tpe_tests/test_sampler.py | 0 | test sampling from int distribution returns integer. |
| HIGH | tests/samplers_tests/tpe_tests/test_sampler.py | 0 | test sampling from int distribution returns integer. |
| HIGH | tests/samplers_tests/tpe_tests/test_sampler.py | 0 | test sampling from int distribution returns integer. |
| HIGH | …mplers_tests/tpe_tests/test_multi_objective_sampler.py | 0 | tests fail, running, and waiting states are equally. |
| HIGH | tests/samplers_tests/tpe_tests/test_sampler.py | 0 | tests fail, running, and waiting states are equally. |
| HIGH | tests/samplers_tests/tpe_tests/test_sampler.py | 0 | tests fail, running, and waiting states are equally. |
| HIGH | optuna/storages/_grpc/auto_generated/api_pb2_grpc.py | 0 | * optuna storage service defines apis to interact with the storage. |
| HIGH | optuna/storages/_grpc/auto_generated/api_pb2_grpc.py | 0 | * optuna storage service defines apis to interact with the storage. |
| HIGH | optuna/storages/_grpc/auto_generated/api_pb2_grpc.py | 0 | * optuna storage service defines apis to interact with the storage. |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | tutorial/20_recipes/008_specify_params.py | 42 | # Define the objective function. |
| MEDIUM | tutorial/10_key_features/005_visualization.py | 125 | # Define the objective function. |
| MEDIUM | tests/test_cli.py | 322 | # Create a study. |
| MEDIUM | tests/study_tests/test_study.py | 405 | # Create a new study. |
| MEDIUM | tests/study_tests/test_study.py | 1150 | # Create a trial to retrieve it as the `study.best_trial`. |
| MEDIUM | tests/study_tests/test_study.py | 1652 | # Create a study and ask for a new trial. |
| MEDIUM | tests/storages_tests/test_callbacks.py | 24 | # Create a trial and manually set it as failed. |
| MEDIUM | tests/storages_tests/test_cached_storage.py | 134 | # Create a trial via CachedStorage and update it via backend storage directly. |
| MEDIUM | tests/storages_tests/test_with_server.py | 69 | # Create a study |
| MEDIUM | tests/storages_tests/test_with_server.py | 130 | # Create a new study to confirm the study can load trial properly. |
| MEDIUM | tests/storages_tests/rdb_tests/test_storage.py | 225 | # Create a new study. |
| MEDIUM | tests/storages_tests/rdb_tests/test_storage.py | 275 | # Create a new study. |
| MEDIUM | tests/storages_tests/rdb_tests/create_db.py | 85 | # Create an empty study. |
| MEDIUM | tests/storages_tests/rdb_tests/create_db.py | 88 | # Create a study for single-objective optimization. |
| MEDIUM | tests/storages_tests/rdb_tests/create_db.py | 93 | # Create a study for multi-objective optimization. |
| MEDIUM | tests/storages_tests/rdb_tests/create_db.py | 106 | # Create a study for distributions upgrade. |
| MEDIUM | tests/samplers_tests/test_samplers.py | 67 | # This function is used only in test_reproducible_in_other_process, but declared at top-level |
| MEDIUM | …ion_examples/optuna.visualization.plot_pareto_front.py | 32 | # The following code snippet shows how to plot a 2-dimensional Pareto front |
| MEDIUM | optuna/visualization/_utils.py | 132 | # This function is not raising when target is missing, since we're |
| MEDIUM | optuna/storages/journal/_file.py | 63 | open(self._file_path, "ab").close() # Create a file if it does not exist. |
| MEDIUM | optuna/storages/_grpc/auto_generated/api_pb2_grpc.py | 398 | # This class is part of an EXPERIMENTAL API. |
| MEDIUM | optuna/study/study.py | 803 | # Create a dataframe from the study. |
| MEDIUM | optuna/pruners/_hyperband.py | 269 | # This class is assumed to be passed to |
| MEDIUM | …plers/_nsgaiii/_elite_population_selection_strategy.py | 22 | # Define a coefficient for scaling intervals, used in _filter_inf() to replace +-inf. |
| MEDIUM | optuna/samplers/_tpe/_truncnorm.py | 1 | # This file contains the codes from SciPy project. |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/test_transform.py | 92 | |
| LOW | tests/test_cli.py | 64 | |
| LOW | tests/test_cli.py | 533 | |
| LOW | tests/test_cli.py | 611 | |
| LOW | tests/test_cli.py | 687 | |
| LOW | tests/test_cli.py | 768 | |
| LOW | tests/test_cli.py | 843 | |
| LOW | tests/test_cli.py | 928 | |
| LOW | tests/study_tests/test_study.py | 1087 | |
| LOW | tests/study_tests/test_dataframe.py | 51 | |
| LOW | tests/storages_tests/journal_tests/test_journal.py | 124 | |
| LOW | tests/samplers_tests/test_nsgaii.py | 290 | |
| LOW | tests/samplers_tests/test_nsgaii.py | 364 | |
| LOW | tests/visualization_tests/test_contour.py | 396 | |
| LOW | tests/visualization_tests/test_hypervolume_history.py | 25 | |
| LOW | tests/visualization_tests/test_hypervolume_history.py | 28 | |
| LOW | tests/visualization_tests/test_hypervolume_history.py | 29 | |
| LOW | tests/visualization_tests/test_rank.py | 128 | |
| LOW | optuna/distributions.py | 565 | |
| LOW | optuna/distributions.py | 709 | |
| LOW | optuna/distributions.py | 531 | |
| LOW | optuna/cli.py | 82 | |
| LOW | optuna/cli.py | 98 | |
| LOW | optuna/cli.py | 244 | |
| LOW | optuna/progress_bar.py | 76 | |
| LOW | optuna/_transform.py | 175 | |
| LOW | optuna/_transform.py | 246 | |
| LOW | optuna/_transform.py | 269 | |
| LOW | optuna/visualization/_rank.py | 117 | |
| LOW | optuna/visualization/_rank.py | 308 | |
| LOW | optuna/visualization/_parallel_coordinate.py | 124 | |
| LOW | optuna/visualization/_optimization_history.py | 51 | |
| LOW | optuna/visualization/_optimization_history.py | 139 | |
| LOW | optuna/visualization/_slice.py | 183 | |
| LOW | optuna/visualization/_contour.py | 109 | |
| LOW | optuna/visualization/_contour.py | 260 | |
| LOW | optuna/visualization/matplotlib/_utils.py | 37 | |
| LOW | optuna/visualization/matplotlib/_contour.py | 81 | |
| LOW | optuna/visualization/matplotlib/_contour.py | 326 | |
| LOW | optuna/storages/_cached_storage.py | 89 | |
| LOW | optuna/storages/_in_memory.py | 371 | |
| LOW | optuna/storages/journal/_file.py | 148 | |
| LOW | optuna/storages/journal/_file.py | 239 | |
| LOW | optuna/storages/journal/_storage.py | 414 | |
| LOW | optuna/storages/journal/_storage.py | 578 | |
| LOW | optuna/storages/_grpc/client.py | 257 | |
| LOW | optuna/storages/_rdb/storage.py | 675 | |
| LOW | optuna/storages/_rdb/storage.py | 783 | |
| LOW | optuna/storages/_rdb/storage.py | 863 | |
| LOW | optuna/storages/_rdb/alembic/versions/v3.0.0.c.py | 68 | |
| LOW | optuna/storages/_rdb/alembic/versions/v3.0.0.d.py | 78 | |
| LOW | optuna/study/_dataframe.py | 22 | |
| LOW | optuna/study/_optimize.py | 39 | |
| LOW | optuna/study/_optimize.py | 186 | |
| LOW | optuna/study/_tell.py | 80 | |
| LOW | optuna/study/study.py | 1204 | |
| LOW | optuna/study/study.py | 1607 | |
| LOW | optuna/trial/_trial.py | 624 | |
| LOW | optuna/importance/_base.py | 115 | |
| LOW | optuna/importance/_fanova/_tree.py | 80 | |
| 11 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tutorial/20_recipes/001_rdb.py | 61 | # reproducibility, you need to restore the sampler with using ``pickle`` as follows:: |
| LOW | tutorial/20_recipes/001_rdb.py | 81 | # |
| LOW | tutorial/20_recipes/009_ask_and_tell.py | 81 | clf.fit(X_train, y_train) |
| LOW | tutorial/20_recipes/009_ask_and_tell.py | 101 | # from sklearn.linear_model import SGDClassifier |
| LOW | tutorial/20_recipes/009_ask_and_tell.py | 121 | # trial = study.ask() |
| LOW | tutorial/20_recipes/009_ask_and_tell.py | 141 | # score = clf.score(X_valid, y_valid) |
| LOW | tutorial/20_recipes/009_ask_and_tell.py | 241 | # :class:`optuna.samplers.TPESampler` class can take a boolean parameter ``constant_liar``. It |
| LOW | tutorial/20_recipes/010_reuse_best_trial.py | 81 | # Pass ``study.best_trial`` as the argument of ``detailed_objective``. |
| LOW | tutorial/20_recipes/013_wilcoxon_pruner.py | 181 | |
| 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 |
| LOW | tutorial/20_recipes/008_specify_params.py | 101 | # |
| LOW | tutorial/20_recipes/012_artifact_tutorial.py | 321 | # Each function is as follows. |
| LOW | tutorial/20_recipes/012_artifact_tutorial.py | 421 | write("best_atoms.png", best_atoms, rotation=("315x,0y,0z")) |
| LOW | tutorial/20_recipes/012_artifact_tutorial.py | 441 | # |
| LOW | tutorial/20_recipes/011_journal_storage.py | 41 | |
| LOW | tutorial/20_recipes/004_cli.py | 41 | |
| LOW | tutorial/20_recipes/004_cli.py | 61 | # |
| LOW | tutorial/20_recipes/002_multi_objective.py | 121 | # Specifically, in this example, we want to minimize the FLOPS (we want a faster model) |
| LOW | …_key_features/003_efficient_optimization_algorithms.py | 61 | study = optuna.create_study(sampler=optuna.samplers.CmaEsSampler()) |
| LOW | …_key_features/003_efficient_optimization_algorithms.py | 81 | # |
| LOW | …_key_features/003_efficient_optimization_algorithms.py | 141 | optuna.logging.get_logger("optuna").addHandler(logging.StreamHandler(sys.stdout)) |
| 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 |
| LOW | …_key_features/003_efficient_optimization_algorithms.py | 181 | # |
| LOW | tutorial/10_key_features/002_configurations.py | 41 | |
| LOW | tutorial/10_key_features/002_configurations.py | 61 | if classifier_name == "SVC": |
| LOW | tutorial/10_key_features/002_configurations.py | 81 | # layers = [] |
| LOW | tutorial/10_key_features/001_first.py | 41 | # |
| 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``. |
| LOW | tutorial/10_key_features/004_distributed.py | 141 | study = optuna.create_study( |
| LOW | tutorial/10_key_features/004_distributed.py | 161 | # it cannot be used for multi-process optimization. |
| LOW | tutorial/10_key_features/004_distributed.py | 181 | # def run_optimization(_): |
| LOW | tutorial/10_key_features/004_distributed.py | 201 | # Running trial trial.number=3 in process 4607 |
| LOW | tutorial/10_key_features/004_distributed.py | 221 | # it is likely to cause race conditions when accessed by multiple machines. |
| LOW | tutorial/10_key_features/004_distributed.py | 241 | # x = trial.suggest_float("x", -10, 10) |
| 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 |
| LOW | tutorial/10_key_features/004_distributed.py | 281 | # In that case, you can use :class:`~optuna.storages.GrpcStorageProxy` |
| LOW | tutorial/10_key_features/004_distributed.py | 301 | # |
| LOW | tutorial/10_key_features/004_distributed.py | 321 | # |
| LOW | tests/study_tests/test_multi_objective.py | 41 | |
| LOW | tests/samplers_tests/test_nsgaii.py | 301 | # ╟─────┼─────┼─────┼─────┼─────┼─────╢ |
| LOW | tests/samplers_tests/test_brute_force.py | 361 | # suggest new parameters, considering the possibility for trials[1] to suggest `y`. |
| LOW | docs/source/conf.py | 1 | # -*- coding: utf-8 -*- |
| LOW | docs/source/conf.py | 121 | # default: ``['localtoc.html', 'relations.html', 'sourcelink.html', |
| LOW | docs/source/conf.py | 141 | # |
| LOW | optuna/visualization/matplotlib/_contour.py | 321 | zmap[(xindex, yindex)] = z |
| LOW | optuna/storages/journal/_storage.py | 321 | if state == TrialState.RUNNING: |
| LOW | optuna/storages/_rdb/alembic.ini | 1 | # A generic, single database configuration. |
| LOW | optuna/storages/_rdb/alembic.ini | 21 | # the 'revision' command, regardless of autogenerate |
| LOW | optuna/samplers/_brute_force.py | 41 | # A node takes one of the following four states: |
| LOW | optuna/samplers/_tpe/_truncnorm.py | 1 | # This file contains the codes from SciPy project. |
| LOW | optuna/samplers/_tpe/_truncnorm.py | 21 | |
| LOW | optuna/samplers/_tpe/_truncnorm.py | 121 | def mass_case_left(a: np.ndarray, b: np.ndarray) -> np.ndarray: |
| LOW | optuna/samplers/_tpe/_erf.py | 1 | # This code is the modified version of erf function in FreeBSD's standard C library. |
| LOW | optuna/_hypervolume/wfg.py | 81 | # function simply becomes slower. |
| LOW | optuna/_hypervolume/wfg.py | 161 | # NOTE(nabenabe): The result of this function does not change both by |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | tutorial/20_recipes/004_cli.py | 56 | # --search-space '{"x": {"name": "FloatDistribution", "attributes": {"step": null, "low": -10.0, "high": 10.0, |
| HIGH | tests/test_distributions.py | 65 | "f": '{"type": "float", "low": 1.0, "high": 2.0, "log": false, "step": null}', |
| HIGH | tests/test_distributions.py | 66 | "fl": '{"type": "float", "low": 0.001, "high": 100, "log": true, "step": null}', |
| HIGH | tests/test_distributions.py | 16 | _choices_json = '[null, true, false, 0, 1, 0.0, 1.0, NaN, Infinity, -Infinity, "", "a"]' |
| HIGH | tests/test_distributions.py | 47 | '"attributes": {"low": 1.0, "high": 2.0, "log": false, "step": null}}', |
| HIGH | tests/test_distributions.py | 49 | '"attributes": {"low": 0.001, "high": 100.0, "log": true, "step": null}}', |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | tutorial/20_recipes/013_wilcoxon_pruner.py | 205 | # Some samplers, including the default ``TPESampler``, currently cannot utilize the |
| MEDIUM | tutorial/20_recipes/008_specify_params.py | 103 | # Second scenario: Have Optuna utilize already evaluated hyperparameters |
| LOW | optuna/_gp/gp.py | 300 | # Note that we cannot just use the constraint because of the numerical unstability |
| LOW | optuna/_gp/acqf.py | 326 | # Since all the objectives are equally important, we simply use the mean of |
| LOW | optuna/_gp/acqf.py | 392 | # Since all the objectives are equally important, we simply use the mean of |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | tutorial/10_key_features/002_configurations.py | 49 | # Also, you can use branches or loops depending on the parameter values. |
| MEDIUM | tutorial/10_key_features/004_distributed.py | 232 | # Then, you can use this MySQL database as a storage backend by setting the |
| MEDIUM | tutorial/10_key_features/004_distributed.py | 281 | # In that case, you can use :class:`~optuna.storages.GrpcStorageProxy` |
| MEDIUM | optuna/_hypervolume/wfg.py | 104 | # which is guaranteed. As mentioned earlier, if all ``False`` in on_front is correct, the |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/test_cli.py | 149 | # Check if study_name is stored in the storage. |
| LOW | tests/test_cli.py | 1016 | # Check if study_name is stored in the storage. |
| LOW | tests/storages_tests/rdb_tests/test_storage.py | 334 | # Check if Study.optimize can run on new storage. |
| 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 |
| LOW | optuna/testing/pytest_storages.py | 338 | # Check if trial_number starts from 0. |
| LOW | optuna/testing/pytest_storages.py | 441 | # Set params to another trial. |
| LOW | optuna/samplers/_partial_fixed.py | 101 | # Check if a parameter value is contained in the range of this distribution. |
| LOW | optuna/samplers/_tpe/sampler.py | 904 | weights_below = np.where(is_feasible, 1.0, EPS) # Assign EPS to infeasible trials. |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/visualization_tests/test_utils.py | 52 | except Exception: |
| MEDIUM | tests/visualization_tests/test_utils.py | 47 | def _is_plotly_available() -> bool: |
| LOW | optuna/progress_bar.py | 28 | except Exception: |
| LOW | optuna/artifacts/_backoff.py | 75 | except Exception as e: |
| LOW | optuna/artifacts/_backoff.py | 90 | except Exception as e: |
| LOW | optuna/artifacts/_backoff.py | 104 | except Exception as e: |
| LOW | optuna/storages/journal/_storage.py | 597 | except Exception: |
| LOW | optuna/storages/_rdb/storage.py | 99 | except Exception: |
| LOW | optuna/study/_optimize.py | 225 | except Exception: |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | tests/study_tests/test_dataframe.py | 131 |