Documentation

Welcome to the developer documentation for SigOpt. If you have a question you can’t answer, feel free to contact us!
Welcome to the new SigOpt docs! If you're looking for the classic SigOpt documentation then you can find that here. Otherwise, happy optimizing!

Enable Optimization for your SigOpt Runs

In the Experiment case you want SigOpt to suggest parameter values in your script. That means you no longer need to set parameters by assigning hard-coded values to sigopt.params objects. To define one script to execute Runs and Experiments you can change your previous Run script to define the previously hard-coded defaults with sigopt.params.setdefault for a single parameter or sigopt.params.setdefaults for a set of parameters. Let's walk through how to modify your parameters and set up your metrics for optimization.

Parameterize your SigOpt Run

We'll walk through how to modify instrumenting your parameter values for our Keras model. We will set up activation_fn and hidden_layer_size for tuning, and will not tune num_epochs.

Parameterization for a Run

Parameterization for an Experiment

sigopt.log_dataset(name="mnist")
(train_images, train_labels), (test_images, test_labels) = tf.keras.datasets.mnist.load_data()

# set model training, architecture parameters and hyperparameters
sigopt.params.num_epochs = 3
sigopt.params.hidden_layer_size = 200
sigopt.params.activation_fn = "relu"
sigopt.log_dataset(name="mnist")
(train_images, train_labels), (test_images, test_labels) = tf.keras.datasets.mnist.load_data()

# set model training, architecture parameters and hyperparameters
sigopt.params.num_epochs = 3
sigopt.params.setdefaults({"activation_fn": "relu", "hidden_layer_size": 200})

Set up your Metrics for a SigOpt Run

You don't have to change anything about your metric parameterization when optimizing. In the Optimize your Model section below, we'll walk you through various approaches to optimizing your metrics and how to set up a SigOpt Experiment.