optuna-joblibspark-mlflow(Python)

Loading...

Scaling up hyperparameter tuning with Optuna and MLflow

Optuna is a Python library for hyperparameter tuning. It is lightweight, and integrates state-of-the-art hyperparameter optimization algorithms.

This notebook is adapted from the Github README of Optuna, with additional tips on how to scale up hyperparameter tuning for a single-machine Python ML algorithm and track the results using MLflow.

  • In part 1, you create a single-machine Optuna workflow.
  • In part 2, you learn to use joblib to parallelize the workflow calculations across the Spark cluster, and use the MLflowCallback provided by Optuna's integration with MLflow to track the hyperparameter and metrics.

Install required packages

Note: you may need to restart the kernel using %restart_python or dbutils.library.restartPython() to use updated packages. Requirement already satisfied: optuna in /local_disk0/.ephemeral_nfs/envs/pythonEnv-bb7487fd-b518-4c56-90e6-7217dadbbd56/lib/python3.11/site-packages (3.6.1) Requirement already satisfied: alembic>=1.5.0 in /local_disk0/.ephemeral_nfs/envs/pythonEnv-bb7487fd-b518-4c56-90e6-7217dadbbd56/lib/python3.11/site-packages (from optuna) (1.13.2) Requirement already satisfied: colorlog in /local_disk0/.ephemeral_nfs/envs/pythonEnv-bb7487fd-b518-4c56-90e6-7217dadbbd56/lib/python3.11/site-packages (from optuna) (6.8.2) Requirement already satisfied: numpy in /databricks/python3/lib/python3.11/site-packages (from optuna) (1.23.5) Requirement already satisfied: packaging>=20.0 in /databricks/python3/lib/python3.11/site-packages (from optuna) (23.2) Requirement already satisfied: sqlalchemy>=1.3.0 in /databricks/python3/lib/python3.11/site-packages (from optuna) (1.4.39) Requirement already satisfied: tqdm in /databricks/python3/lib/python3.11/site-packages (from optuna) (4.65.0) Requirement already satisfied: PyYAML in /databricks/python3/lib/python3.11/site-packages (from optuna) (6.0) Requirement already satisfied: Mako in /databricks/python3/lib/python3.11/site-packages (from alembic>=1.5.0->optuna) (1.2.0) Requirement already satisfied: typing-extensions>=4 in /databricks/python3/lib/python3.11/site-packages (from alembic>=1.5.0->optuna) (4.10.0) Requirement already satisfied: greenlet!=0.4.17 in /databricks/python3/lib/python3.11/site-packages (from sqlalchemy>=1.3.0->optuna) (2.0.1) Requirement already satisfied: MarkupSafe>=0.9.2 in /databricks/python3/lib/python3.11/site-packages (from Mako->alembic>=1.5.0->optuna) (2.1.1) Note: you may need to restart the kernel using %restart_python or dbutils.library.restartPython() to use updated packages. Note: you may need to restart the kernel using %restart_python or dbutils.library.restartPython() to use updated packages. Requirement already satisfied: optuna-integration in /local_disk0/.ephemeral_nfs/envs/pythonEnv-bb7487fd-b518-4c56-90e6-7217dadbbd56/lib/python3.11/site-packages (3.6.0) Requirement already satisfied: optuna in /local_disk0/.ephemeral_nfs/envs/pythonEnv-bb7487fd-b518-4c56-90e6-7217dadbbd56/lib/python3.11/site-packages (from optuna-integration) (3.6.1) Requirement already satisfied: alembic>=1.5.0 in /local_disk0/.ephemeral_nfs/envs/pythonEnv-bb7487fd-b518-4c56-90e6-7217dadbbd56/lib/python3.11/site-packages (from optuna->optuna-integration) (1.13.2) Requirement already satisfied: colorlog in /local_disk0/.ephemeral_nfs/envs/pythonEnv-bb7487fd-b518-4c56-90e6-7217dadbbd56/lib/python3.11/site-packages (from optuna->optuna-integration) (6.8.2) Requirement already satisfied: numpy in /databricks/python3/lib/python3.11/site-packages (from optuna->optuna-integration) (1.23.5) Requirement already satisfied: packaging>=20.0 in /databricks/python3/lib/python3.11/site-packages (from optuna->optuna-integration) (23.2) Requirement already satisfied: sqlalchemy>=1.3.0 in /databricks/python3/lib/python3.11/site-packages (from optuna->optuna-integration) (1.4.39) Requirement already satisfied: tqdm in /databricks/python3/lib/python3.11/site-packages (from optuna->optuna-integration) (4.65.0) Requirement already satisfied: PyYAML in /databricks/python3/lib/python3.11/site-packages (from optuna->optuna-integration) (6.0) Requirement already satisfied: Mako in /databricks/python3/lib/python3.11/site-packages (from alembic>=1.5.0->optuna->optuna-integration) (1.2.0) Requirement already satisfied: typing-extensions>=4 in /databricks/python3/lib/python3.11/site-packages (from alembic>=1.5.0->optuna->optuna-integration) (4.10.0) Requirement already satisfied: greenlet!=0.4.17 in /databricks/python3/lib/python3.11/site-packages (from sqlalchemy>=1.3.0->optuna->optuna-integration) (2.0.1) Requirement already satisfied: MarkupSafe>=0.9.2 in /databricks/python3/lib/python3.11/site-packages (from Mako->alembic>=1.5.0->optuna->optuna-integration) (2.1.1) Note: you may need to restart the kernel using %restart_python or dbutils.library.restartPython() to use updated packages.

Import required packages and load dataset

Part 1. Getting started with Optuna in a single machine

Here are the steps in a Optuna workflow:

  1. Define an objective function to optimize. Within the objective function, define the hyperparameter search space.
  2. Create a Study via the optuna.create_study() function.
  3. Run the tuning algorithm by calling the optimize function of the Study object.

For more information, see the Optuna documentation.

Define a function and search space to optimize

The search space here is defined by calling functions such as suggest_categorical, suggest_float, suggest_int for the Trial object that is passed to the objective function.

A special feature of Optuna is that you can define the search space dynamically. In this example, you can define different hyperparameter spaces depending on the classifier, i.e., svc_c for SVC and rf_max_depth for RandomForestClassifier.

Refer to the documentation of optuna.trial.Trial for a full list of functions supported to define a hyperparameter search space.

Create an Optuna Study and run it

Since the objective function returns the accuracy, set the optimization direction as maximize, otherwise Optuna minimizes the objective function by default.

[I 2024-06-28 00:49:06,670] A new study created in memory with name: no-name-c67b3be8-87c4-4d8f-8358-15e3128afbb2 [I 2024-06-28 00:49:08,279] Trial 0 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 9008.49169580969}. Best is trial 0 with value: 0.96. [I 2024-06-28 00:49:08,651] Trial 1 finished with value: 0.96 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 8}. Best is trial 0 with value: 0.96. [I 2024-06-28 00:49:08,715] Trial 2 finished with value: 0.9533333333333333 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 31}. Best is trial 0 with value: 0.96. [I 2024-06-28 00:49:08,734] Trial 3 finished with value: 0.9666666666666667 and parameters: {'classifier': 'SVC', 'svc_c': 1.5734774737879575}. Best is trial 3 with value: 0.9666666666666667. [I 2024-06-28 00:49:08,751] Trial 4 finished with value: 0.98 and parameters: {'classifier': 'SVC', 'svc_c': 5.7527192277373524}. Best is trial 4 with value: 0.98. [I 2024-06-28 00:49:08,769] Trial 5 finished with value: 0.32 and parameters: {'classifier': 'SVC', 'svc_c': 1.6115242607296887e-06}. Best is trial 4 with value: 0.98. [I 2024-06-28 00:49:08,802] Trial 6 finished with value: 0.96 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 7}. Best is trial 4 with value: 0.98. [I 2024-06-28 00:49:08,834] Trial 7 finished with value: 0.96 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 8}. Best is trial 4 with value: 0.98. [I 2024-06-28 00:49:08,851] Trial 8 finished with value: 0.98 and parameters: {'classifier': 'SVC', 'svc_c': 9.724135411437722}. Best is trial 4 with value: 0.98. [I 2024-06-28 00:49:08,868] Trial 9 finished with value: 0.9666666666666667 and parameters: {'classifier': 'SVC', 'svc_c': 0.6603257048388886}. Best is trial 4 with value: 0.98. [I 2024-06-28 00:49:08,889] Trial 10 finished with value: 0.32 and parameters: {'classifier': 'SVC', 'svc_c': 6.383597770477498e-10}. Best is trial 4 with value: 0.98. [I 2024-06-28 00:49:08,910] Trial 11 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 7224194.13970452}. Best is trial 4 with value: 0.98. [I 2024-06-28 00:49:08,930] Trial 12 finished with value: 0.9666666666666667 and parameters: {'classifier': 'SVC', 'svc_c': 0.4881254274074074}. Best is trial 4 with value: 0.98. [I 2024-06-28 00:49:08,950] Trial 13 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 1468.5475113246598}. Best is trial 4 with value: 0.98. [I 2024-06-28 00:49:08,972] Trial 14 finished with value: 0.32 and parameters: {'classifier': 'SVC', 'svc_c': 6.71523983978664e-05}. Best is trial 4 with value: 0.98. [I 2024-06-28 00:49:08,996] Trial 15 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 4579791412.464786}. Best is trial 4 with value: 0.98. [I 2024-06-28 00:49:09,019] Trial 16 finished with value: 0.32 and parameters: {'classifier': 'SVC', 'svc_c': 0.00019578673096190552}. Best is trial 4 with value: 0.98. [I 2024-06-28 00:49:09,044] Trial 17 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 9072.037749186058}. Best is trial 4 with value: 0.98. [I 2024-06-28 00:49:09,081] Trial 18 finished with value: 0.9533333333333333 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 2}. Best is trial 4 with value: 0.98. [I 2024-06-28 00:49:09,104] Trial 19 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 73.77217944696284}. Best is trial 4 with value: 0.98. [I 2024-06-28 00:49:09,130] Trial 20 finished with value: 0.32 and parameters: {'classifier': 'SVC', 'svc_c': 0.00406597135637977}. Best is trial 4 with value: 0.98. [I 2024-06-28 00:49:09,152] Trial 21 finished with value: 0.98 and parameters: {'classifier': 'SVC', 'svc_c': 6.282344514610331}. Best is trial 4 with value: 0.98. [I 2024-06-28 00:49:09,175] Trial 22 finished with value: 0.9666666666666667 and parameters: {'classifier': 'SVC', 'svc_c': 25.734510113792545}. Best is trial 4 with value: 0.98. [I 2024-06-28 00:49:09,196] Trial 23 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 639737.212822852}. Best is trial 4 with value: 0.98. [I 2024-06-28 00:49:09,217] Trial 24 finished with value: 0.7533333333333333 and parameters: {'classifier': 'SVC', 'svc_c': 0.029277549223897355}. Best is trial 4 with value: 0.98. [I 2024-06-28 00:49:09,237] Trial 25 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 59.524962484574104}. Best is trial 4 with value: 0.98. [I 2024-06-28 00:49:09,272] Trial 26 finished with value: 0.9466666666666667 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 2}. Best is trial 4 with value: 0.98. [I 2024-06-28 00:49:09,294] Trial 27 finished with value: 0.32 and parameters: {'classifier': 'SVC', 'svc_c': 4.1030816826507324e-07}. Best is trial 4 with value: 0.98. [I 2024-06-28 00:49:09,316] Trial 28 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 685338.0940704365}. Best is trial 4 with value: 0.98. [I 2024-06-28 00:49:09,339] Trial 29 finished with value: 0.94 and parameters: {'classifier': 'SVC', 'svc_c': 0.07218333774650208}. Best is trial 4 with value: 0.98. [I 2024-06-28 00:49:09,361] Trial 30 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 791.4298088564291}. Best is trial 4 with value: 0.98. [I 2024-06-28 00:49:09,384] Trial 31 finished with value: 0.9866666666666667 and parameters: {'classifier': 'SVC', 'svc_c': 4.020746153757531}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:09,405] Trial 32 finished with value: 0.98 and parameters: {'classifier': 'SVC', 'svc_c': 7.688597431687424}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:09,427] Trial 33 finished with value: 0.32 and parameters: {'classifier': 'SVC', 'svc_c': 0.004956202233981314}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:09,462] Trial 34 finished with value: 0.96 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 27}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:09,484] Trial 35 finished with value: 0.94 and parameters: {'classifier': 'SVC', 'svc_c': 226.57937836488838}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:09,504] Trial 36 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 86257.33996047205}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:09,550] Trial 37 finished with value: 0.96 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 4}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:09,570] Trial 38 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 8223.900515647298}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:09,605] Trial 39 finished with value: 0.9466666666666667 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 16}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:09,626] Trial 40 finished with value: 0.9733333333333333 and parameters: {'classifier': 'SVC', 'svc_c': 2.7416050688420173}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:09,647] Trial 41 finished with value: 0.98 and parameters: {'classifier': 'SVC', 'svc_c': 6.5324560345782485}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:09,669] Trial 42 finished with value: 0.9666666666666667 and parameters: {'classifier': 'SVC', 'svc_c': 0.15886867463574642}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:09,689] Trial 43 finished with value: 0.98 and parameters: {'classifier': 'SVC', 'svc_c': 6.997671999697382}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:09,712] Trial 44 finished with value: 0.32 and parameters: {'classifier': 'SVC', 'svc_c': 0.003273203403270766}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:09,733] Trial 45 finished with value: 0.9666666666666667 and parameters: {'classifier': 'SVC', 'svc_c': 2.2771491450957946}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:09,753] Trial 46 finished with value: 0.9466666666666667 and parameters: {'classifier': 'SVC', 'svc_c': 310.44278094916234}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:09,774] Trial 47 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 0.3512409273660187}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:09,794] Trial 48 finished with value: 0.9733333333333333 and parameters: {'classifier': 'SVC', 'svc_c': 13.867679091126597}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:09,814] Trial 49 finished with value: 0.32 and parameters: {'classifier': 'SVC', 'svc_c': 0.000151421153881642}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:09,849] Trial 50 finished with value: 0.96 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 4}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:09,871] Trial 51 finished with value: 0.9733333333333333 and parameters: {'classifier': 'SVC', 'svc_c': 1.8511308440215468}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:09,893] Trial 52 finished with value: 0.9733333333333333 and parameters: {'classifier': 'SVC', 'svc_c': 15.377261467395432}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:09,918] Trial 53 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 2643.5709358366375}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:09,939] Trial 54 finished with value: 0.7466666666666667 and parameters: {'classifier': 'SVC', 'svc_c': 0.026070919404969577}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:09,960] Trial 55 finished with value: 0.9733333333333333 and parameters: {'classifier': 'SVC', 'svc_c': 1.016887813568867}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:09,983] Trial 56 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 141.1504585594045}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,005] Trial 57 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 0.31832198824014324}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,028] Trial 58 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 24038.90045203572}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,055] Trial 59 finished with value: 0.32 and parameters: {'classifier': 'SVC', 'svc_c': 3.573179241838137e-10}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,090] Trial 60 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 36.57985585426826}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,120] Trial 61 finished with value: 0.98 and parameters: {'classifier': 'SVC', 'svc_c': 5.5065381660884505}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,141] Trial 62 finished with value: 0.98 and parameters: {'classifier': 'SVC', 'svc_c': 11.713904255561712}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,163] Trial 63 finished with value: 0.7466666666666667 and parameters: {'classifier': 'SVC', 'svc_c': 0.021324823157685566}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,186] Trial 64 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 1460.2884529946614}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,207] Trial 65 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 91.40119802549286}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,229] Trial 66 finished with value: 0.32 and parameters: {'classifier': 'SVC', 'svc_c': 0.0009719739094501301}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,265] Trial 67 finished with value: 0.9533333333333333 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 15}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,287] Trial 68 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 373245309.5987737}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,309] Trial 69 finished with value: 0.9666666666666667 and parameters: {'classifier': 'SVC', 'svc_c': 0.6560779407962601}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,331] Trial 70 finished with value: 0.98 and parameters: {'classifier': 'SVC', 'svc_c': 6.470469355903827}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,352] Trial 71 finished with value: 0.98 and parameters: {'classifier': 'SVC', 'svc_c': 6.020912764921239}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,374] Trial 72 finished with value: 0.94 and parameters: {'classifier': 'SVC', 'svc_c': 0.09187083700967764}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,398] Trial 73 finished with value: 0.9533333333333333 and parameters: {'classifier': 'SVC', 'svc_c': 484.7782743741249}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,420] Trial 74 finished with value: 0.9666666666666667 and parameters: {'classifier': 'SVC', 'svc_c': 41.5246993441563}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,442] Trial 75 finished with value: 0.9733333333333333 and parameters: {'classifier': 'SVC', 'svc_c': 2.9371657707737877}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,462] Trial 76 finished with value: 0.9666666666666667 and parameters: {'classifier': 'SVC', 'svc_c': 0.6220354640731351}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,497] Trial 77 finished with value: 0.9466666666666667 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 4}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,519] Trial 78 finished with value: 0.9533333333333333 and parameters: {'classifier': 'SVC', 'svc_c': 0.13620201877456967}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,541] Trial 79 finished with value: 0.32 and parameters: {'classifier': 'SVC', 'svc_c': 4.1506562363412204e-06}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,561] Trial 80 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 55.2200832061942}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,583] Trial 81 finished with value: 0.98 and parameters: {'classifier': 'SVC', 'svc_c': 9.860788132880746}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,603] Trial 82 finished with value: 0.98 and parameters: {'classifier': 'SVC', 'svc_c': 10.006353400929179}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,624] Trial 83 finished with value: 0.9666666666666667 and parameters: {'classifier': 'SVC', 'svc_c': 1.2132968545105387}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,645] Trial 84 finished with value: 0.9466666666666667 and parameters: {'classifier': 'SVC', 'svc_c': 221.80431099949993}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,666] Trial 85 finished with value: 0.9666666666666667 and parameters: {'classifier': 'SVC', 'svc_c': 22.463426532501806}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,687] Trial 86 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 3245.776437205583}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,708] Trial 87 finished with value: 0.9666666666666667 and parameters: {'classifier': 'SVC', 'svc_c': 2.2284654416422085}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,730] Trial 88 finished with value: 0.32 and parameters: {'classifier': 'SVC', 'svc_c': 0.008803162541098005}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,765] Trial 89 finished with value: 0.9533333333333333 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 14}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,786] Trial 90 finished with value: 0.32 and parameters: {'classifier': 'SVC', 'svc_c': 3.636194964829961e-09}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,808] Trial 91 finished with value: 0.98 and parameters: {'classifier': 'SVC', 'svc_c': 6.004808212703685}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,828] Trial 92 finished with value: 0.9866666666666667 and parameters: {'classifier': 'SVC', 'svc_c': 4.755080155239086}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,849] Trial 93 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 127.19390583995903}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,870] Trial 94 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 0.17431024727839553}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,892] Trial 95 finished with value: 0.9666666666666667 and parameters: {'classifier': 'SVC', 'svc_c': 26.808319726310874}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,923] Trial 96 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 623.4295645107696}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:10,977] Trial 97 finished with value: 0.7866666666666666 and parameters: {'classifier': 'SVC', 'svc_c': 0.03506359641585511}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:11,012] Trial 98 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 0.44977846076361994}. Best is trial 31 with value: 0.9866666666666667. [I 2024-06-28 00:49:11,045] Trial 99 finished with value: 0.9733333333333333 and parameters: {'classifier': 'SVC', 'svc_c': 2.7546785267278278}. Best is trial 31 with value: 0.9866666666666667.

Best trial accuracy: 0.9866666666666667 Best trial params: classifier: SVC svc_c: 4.020746153757531

Part 2. Distributed tuning using Joblib and MLflow

Optuna has a wide set of integrations, which makes it easy to distribute hyperparameter tuning to multiple machines, and tracking the hyperparameters and metrics.

  • Distributed tuning via Joblib: You can distribute Optuna trials to multiple machines in a Databricks cluster by selecting the Spark backend of Joblib.
  • MLflow integration: the MLflowCallback helps automatically logging the hyperparameters and metrics.

/root/.ipykernel/2467/command-738212442120695-781873865:7: ExperimentalWarning: MLflowCallback is experimental (supported from v1.4.0). The interface can change in the future. mlflow_callback = MLflowCallback(

Run an Optuna hyperparameter optimization study with Joblib parallelization and MLflow logging.

  • Wrap the optimize function with Joblib (Spark backend)
  • Pass the MLflowCallback object to the optimize function.

[I 2024-06-28 01:13:55,005] A new study created in memory with name: no-name-0b61daf5-8446-4892-bc1b-e3a27ed84a4b [I 2024-06-28 01:13:55,525] Trial 0 finished with value: 0.32 and parameters: {'classifier': 'SVC', 'svc_c': 4.174676381925467e-09}. Best is trial 0 with value: 0.32. [I 2024-06-28 01:13:57,488] Trial 1 finished with value: 0.32 and parameters: {'classifier': 'SVC', 'svc_c': 3.409831596039196e-10}. Best is trial 0 with value: 0.32. [I 2024-06-28 01:13:59,725] Trial 2 finished with value: 0.9666666666666667 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 4}. Best is trial 2 with value: 0.9666666666666667. [I 2024-06-28 01:14:01,428] Trial 3 finished with value: 0.32 and parameters: {'classifier': 'SVC', 'svc_c': 1.6808268648538712e-09}. Best is trial 2 with value: 0.9666666666666667. [I 2024-06-28 01:14:02,788] Trial 4 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 287425840.61730325}. Best is trial 2 with value: 0.9666666666666667. [I 2024-06-28 01:14:04,569] Trial 5 finished with value: 0.9666666666666667 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 9}. Best is trial 2 with value: 0.9666666666666667. [I 2024-06-28 01:14:06,313] Trial 6 finished with value: 0.9533333333333333 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 2}. Best is trial 2 with value: 0.9666666666666667. [I 2024-06-28 01:14:07,677] Trial 7 finished with value: 0.96 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 4}. Best is trial 2 with value: 0.9666666666666667. [I 2024-06-28 01:14:09,030] Trial 8 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 62.40221212853785}. Best is trial 2 with value: 0.9666666666666667. [I 2024-06-28 01:14:10,529] Trial 9 finished with value: 0.96 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 4}. Best is trial 2 with value: 0.9666666666666667. [I 2024-06-28 01:14:11,885] Trial 10 finished with value: 0.9533333333333333 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 17}. Best is trial 2 with value: 0.9666666666666667. [I 2024-06-28 01:14:13,269] Trial 11 finished with value: 0.9533333333333333 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 11}. Best is trial 2 with value: 0.9666666666666667. [I 2024-06-28 01:14:14,641] Trial 12 finished with value: 0.96 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 7}. Best is trial 2 with value: 0.9666666666666667. [I 2024-06-28 01:14:16,032] Trial 13 finished with value: 0.96 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 5}. Best is trial 2 with value: 0.9666666666666667. [I 2024-06-28 01:14:17,352] Trial 14 finished with value: 0.9533333333333333 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 25}. Best is trial 2 with value: 0.9666666666666667. [I 2024-06-28 01:14:18,694] Trial 15 finished with value: 0.96 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 2}. Best is trial 2 with value: 0.9666666666666667. [I 2024-06-28 01:14:19,999] Trial 16 finished with value: 0.96 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 9}. Best is trial 2 with value: 0.9666666666666667. [I 2024-06-28 01:14:21,379] Trial 17 finished with value: 0.96 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 3}. Best is trial 2 with value: 0.9666666666666667. [I 2024-06-28 01:14:22,778] Trial 18 finished with value: 0.9466666666666667 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 15}. Best is trial 2 with value: 0.9666666666666667. [I 2024-06-28 01:14:24,153] Trial 19 finished with value: 0.9733333333333333 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 7}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:14:25,567] Trial 20 finished with value: 0.9533333333333333 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 6}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:14:26,921] Trial 21 finished with value: 0.9666666666666667 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 9}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:14:28,331] Trial 22 finished with value: 0.9666666666666667 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 6}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:14:29,722] Trial 23 finished with value: 0.9533333333333333 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 3}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:14:31,104] Trial 24 finished with value: 0.9533333333333333 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 12}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:14:32,422] Trial 25 finished with value: 0.9466666666666667 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 8}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:14:33,793] Trial 26 finished with value: 0.96 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 4}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:14:35,135] Trial 27 finished with value: 0.9666666666666667 and parameters: {'classifier': 'SVC', 'svc_c': 0.16814573219920317}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:14:36,492] Trial 28 finished with value: 0.9666666666666667 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 3}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:14:37,878] Trial 29 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 4447367180.273072}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:14:39,247] Trial 30 finished with value: 0.9466666666666667 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 32}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:14:40,597] Trial 31 finished with value: 0.96 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 10}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:14:41,921] Trial 32 finished with value: 0.9466666666666667 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 15}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:14:43,231] Trial 33 finished with value: 0.96 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 7}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:14:44,605] Trial 34 finished with value: 0.32 and parameters: {'classifier': 'SVC', 'svc_c': 0.009896315731325392}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:14:45,937] Trial 35 finished with value: 0.9466666666666667 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 5}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:14:47,276] Trial 36 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 58850.905144698634}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:14:48,643] Trial 37 finished with value: 0.9666666666666667 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 12}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:14:50,009] Trial 38 finished with value: 0.9466666666666667 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 9}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:14:51,319] Trial 39 finished with value: 0.32 and parameters: {'classifier': 'SVC', 'svc_c': 5.7383913362478704e-05}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:14:52,711] Trial 40 finished with value: 0.9533333333333333 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 2}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:14:54,066] Trial 41 finished with value: 0.9533333333333333 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 6}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:14:55,401] Trial 42 finished with value: 0.9533333333333333 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 5}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:14:56,782] Trial 43 finished with value: 0.96 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 6}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:14:58,142] Trial 44 finished with value: 0.9533333333333333 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 7}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:14:59,653] Trial 45 finished with value: 0.96 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 4}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:15:01,016] Trial 46 finished with value: 0.96 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 8}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:15:02,442] Trial 47 finished with value: 0.9533333333333333 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 5}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:15:03,841] Trial 48 finished with value: 0.96 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 8}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:15:05,345] Trial 49 finished with value: 0.9666666666666667 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 11}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:15:06,796] Trial 50 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 128569.65514343833}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:15:08,229] Trial 51 finished with value: 0.32 and parameters: {'classifier': 'SVC', 'svc_c': 8.874646481914104e-05}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:15:09,641] Trial 52 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 35.13494196645245}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:15:11,276] Trial 53 finished with value: 0.8866666666666667 and parameters: {'classifier': 'SVC', 'svc_c': 0.04200057182419562}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:15:12,674] Trial 54 finished with value: 0.32 and parameters: {'classifier': 'SVC', 'svc_c': 3.6740323910304777e-06}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:15:14,033] Trial 55 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 53486.02011566848}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:15:15,390] Trial 56 finished with value: 0.96 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 19}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:15:16,728] Trial 57 finished with value: 0.9666666666666667 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 4}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:15:18,058] Trial 58 finished with value: 0.9466666666666667 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 6}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:15:19,422] Trial 59 finished with value: 0.9533333333333333 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 10}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:15:20,748] Trial 60 finished with value: 0.9733333333333333 and parameters: {'classifier': 'SVC', 'svc_c': 11.880602744909327}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:15:22,076] Trial 61 finished with value: 0.9666666666666667 and parameters: {'classifier': 'SVC', 'svc_c': 24.453778220086345}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:15:23,485] Trial 62 finished with value: 0.94 and parameters: {'classifier': 'SVC', 'svc_c': 0.08965898915244248}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:15:24,864] Trial 63 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 2449.891779457753}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:15:26,230] Trial 64 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 15087620.558987834}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:15:27,591] Trial 65 finished with value: 0.32 and parameters: {'classifier': 'SVC', 'svc_c': 6.755767286947084e-07}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:15:28,972] Trial 66 finished with value: 0.9533333333333333 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 14}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:15:30,341] Trial 67 finished with value: 0.96 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 9}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:15:31,748] Trial 68 finished with value: 0.9733333333333333 and parameters: {'classifier': 'SVC', 'svc_c': 1.0621357088087404}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:15:33,144] Trial 69 finished with value: 0.9666666666666667 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 18}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:15:34,598] Trial 70 finished with value: 0.96 and parameters: {'classifier': 'RandomForest', 'rf_max_depth': 5}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:15:36,028] Trial 71 finished with value: 0.9733333333333333 and parameters: {'classifier': 'SVC', 'svc_c': 2.361462599156787}. Best is trial 19 with value: 0.9733333333333333. [I 2024-06-28 01:15:37,418] Trial 72 finished with value: 0.98 and parameters: {'classifier': 'SVC', 'svc_c': 10.720711306337465}. Best is trial 72 with value: 0.98. [I 2024-06-28 01:15:38,808] Trial 73 finished with value: 0.9733333333333333 and parameters: {'classifier': 'SVC', 'svc_c': 2.461344565926875}. Best is trial 72 with value: 0.98. [I 2024-06-28 01:15:40,186] Trial 74 finished with value: 0.9733333333333333 and parameters: {'classifier': 'SVC', 'svc_c': 3.335516660212553}. Best is trial 72 with value: 0.98. [I 2024-06-28 01:15:41,551] Trial 75 finished with value: 0.98 and parameters: {'classifier': 'SVC', 'svc_c': 6.683393315880088}. Best is trial 72 with value: 0.98. [I 2024-06-28 01:15:42,872] Trial 76 finished with value: 0.9866666666666667 and parameters: {'classifier': 'SVC', 'svc_c': 4.086677328024467}. Best is trial 76 with value: 0.9866666666666667. [I 2024-06-28 01:15:44,236] Trial 77 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 613.0749784499727}. Best is trial 76 with value: 0.9866666666666667. [I 2024-06-28 01:15:45,595] Trial 78 finished with value: 0.9666666666666667 and parameters: {'classifier': 'SVC', 'svc_c': 1.5219228975156904}. Best is trial 76 with value: 0.9866666666666667. [I 2024-06-28 01:15:46,920] Trial 79 finished with value: 0.9733333333333333 and parameters: {'classifier': 'SVC', 'svc_c': 2.4797999601592426}. Best is trial 76 with value: 0.9866666666666667. [I 2024-06-28 01:15:48,297] Trial 80 finished with value: 0.32 and parameters: {'classifier': 'SVC', 'svc_c': 0.009173357777113072}. Best is trial 76 with value: 0.9866666666666667. [I 2024-06-28 01:15:49,607] Trial 81 finished with value: 0.9866666666666667 and parameters: {'classifier': 'SVC', 'svc_c': 3.674135227659586}. Best is trial 76 with value: 0.9866666666666667. [I 2024-06-28 01:15:50,956] Trial 82 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 66.92145730743944}. Best is trial 76 with value: 0.9866666666666667. [I 2024-06-28 01:15:52,312] Trial 83 finished with value: 0.9666666666666667 and parameters: {'classifier': 'SVC', 'svc_c': 0.9211155290822419}. Best is trial 76 with value: 0.9866666666666667. [I 2024-06-28 01:15:53,673] Trial 84 finished with value: 0.9466666666666667 and parameters: {'classifier': 'SVC', 'svc_c': 431.16364568929623}. Best is trial 76 with value: 0.9866666666666667. [I 2024-06-28 01:15:55,108] Trial 85 finished with value: 0.98 and parameters: {'classifier': 'SVC', 'svc_c': 7.038636343394962}. Best is trial 76 with value: 0.9866666666666667. [I 2024-06-28 01:15:56,512] Trial 86 finished with value: 0.9666666666666667 and parameters: {'classifier': 'SVC', 'svc_c': 21.52805345326414}. Best is trial 76 with value: 0.9866666666666667. [I 2024-06-28 01:15:57,868] Trial 87 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 0.21686047005418}. Best is trial 76 with value: 0.9866666666666667. [I 2024-06-28 01:15:59,254] Trial 88 finished with value: 0.9466666666666667 and parameters: {'classifier': 'SVC', 'svc_c': 413.51876087389405}. Best is trial 76 with value: 0.9866666666666667. [I 2024-06-28 01:16:00,795] Trial 89 finished with value: 0.98 and parameters: {'classifier': 'SVC', 'svc_c': 9.0017763113052}. Best is trial 76 with value: 0.9866666666666667. [I 2024-06-28 01:16:02,156] Trial 90 finished with value: 0.32 and parameters: {'classifier': 'SVC', 'svc_c': 0.0012397198469427562}. Best is trial 76 with value: 0.9866666666666667. [I 2024-06-28 01:16:03,670] Trial 91 finished with value: 0.98 and parameters: {'classifier': 'SVC', 'svc_c': 8.767985231729092}. Best is trial 76 with value: 0.9866666666666667. [I 2024-06-28 01:16:05,081] Trial 92 finished with value: 0.9666666666666667 and parameters: {'classifier': 'SVC', 'svc_c': 19.26614303219605}. Best is trial 76 with value: 0.9866666666666667. [I 2024-06-28 01:16:06,792] Trial 93 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 0.47911033217714777}. Best is trial 76 with value: 0.9866666666666667. [I 2024-06-28 01:16:08,188] Trial 94 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 5064.646467455342}. Best is trial 76 with value: 0.9866666666666667. [I 2024-06-28 01:16:09,579] Trial 95 finished with value: 0.96 and parameters: {'classifier': 'SVC', 'svc_c': 106.99247142631742}. Best is trial 76 with value: 0.9866666666666667. [I 2024-06-28 01:16:10,976] Trial 96 finished with value: 0.98 and parameters: {'classifier': 'SVC', 'svc_c': 8.657935162778042}. Best is trial 76 with value: 0.9866666666666667. [I 2024-06-28 01:16:12,351] Trial 97 finished with value: 0.98 and parameters: {'classifier': 'SVC', 'svc_c': 10.006601870668716}. Best is trial 76 with value: 0.9866666666666667. [I 2024-06-28 01:16:13,701] Trial 98 finished with value: 0.32 and parameters: {'classifier': 'SVC', 'svc_c': 0.013537104600198687}. Best is trial 76 with value: 0.9866666666666667. [I 2024-06-28 01:16:15,050] Trial 99 finished with value: 0.9466666666666667 and parameters: {'classifier': 'SVC', 'svc_c': 188.36728777574163}. Best is trial 76 with value: 0.9866666666666667.

Best trial accuracy: 0.9866666666666667 Best trial params: classifier: SVC svc_c: 4.086677328024467

To view the MLflow experiment associated with the notebook, click the Experiment icon in the notebook context bar on the upper right. There, you can view all runs.