---
title: ClearML Parameter Search CLI (HPO)
---
Use the `clearml-param-search` CLI tool to launch ClearML's automated hyperparameter optimization (HPO). This process finds
the optimal values for your experiments' hyperparameters that yield the best performing models.
## How Does `clearml-param-search` Work?
1. Execute `clearml-param-search`, specifying the base task whose parameters will be optimized, and a set of parameter
values and/or ranges to test. This creates an Optimization Task which manages the whole optimization process.
1. `clearml-param-search` creates multiple clones of the base task: each clone's parameters are set to values from the
specified parameter space.
1. Each clone is enqueued for execution by a [ClearML Agent](../clearml_agent.md).
The Optimization Task records and monitors the cloned tasks' configuration and execution details, and returns a summary
of the optimization results in table and graph forms.
## Execution Configuration
### Command Line Options
```bash
clearml-param-search --script keras_simple.py --params-search '{"type": "UniformIntegerParameterRange", "name": "General/layer_1", "min_value": 128, "max_value": 512, "step_size": 128}' '{"type": "UniformIntegerParameterRange", "name": "General/layer_2", "min_value": 128, "max_value": 512, "step_size": 128}' '{"type": "DiscreteParameterRange", "name": "General/batch_size", "values": [96, 128, 160]}' --params-override '{"name": "epochs", "value": 30}' --objective-metric-title validation --objective-metric-series epoch_accuracy --objective-metric-sign max --optimizer-class OptimizerOptuna --queue default
```
:::important JSON format for Windows Users
Windows users must add escapes (`\`) when using quotation marks (`"`) in JSON format inputs. For example:
```bash
clearml-param-search --script base_template_keras_simple.py --params-search "{\"type\": \"UniformIntegerParameterRange\", \"name\": \"General/layer_1\", \"min_value\": 128, \"max_value\": 512, \"step_size\": 128}" "{\"type\": \"UniformIntegerParameterRange\", \"name\": \"General/layer_2\", \"min_value\": 128, \"max_value\": 512, \"step_size\": 128}" "{\"type\": \"DiscreteParameterRange\", \"name\": \"General/batch_size\", \"values\": [96, 128, 160]}" --params-override "{\"name\": \"epochs\", \"value\": 30}" --objective-metric-title validation --objective-metric-series epoch_accuracy --objective-metric-sign max --optimizer-class OptimizerOptuna --max-iteration-per-job 30 --queue default
```
:::
### Optimization Objective
Use the `--objective-metric-sign` to specify which optimum your optimization process should use. The options are:
* `min` - Least value of the specified objective metric reported at the end of the experiment
* `max` - Greatest value of the specified objective metric reported at the end of the experiment
* `min_global` - Least value of the specified objective metric reported at any time in the experiment
* `max_global` - Greatest value of the specified objective metric reported at any time in the experiment