ionworks-api Python package provides a sub-client for running and managing optimizations programmatically. For installation and authentication, see the Python API client page.
Running an optimization
Waiting for completion
raise_on_failure=False to get the result dict instead of raising an exception when an optimization fails.
Listing optimizations
When
project_id is omitted, client.optimization.run and .list
use the default project configured on
the Ionworks client.Getting an optimization
Returns the optimization record along with its associated job status.Updating an optimization
Inspecting the parameter trace
Design optimizations and data fits log the optimizer’s per-iteration progress to the job’s metadata. This is the same data that powers the parameter and cost-convergence plots in Studio. Useclient.job.get_parameter_trace to pull it down as a list of dicts (one per
saved iteration, oldest first):
| Key | Description |
|---|---|
cost | Objective value at this iteration. |
best_cost | Best (lowest) objective value seen up to this iteration. |
inputs | Scaled parameter values at this iteration. |
inputs_unscaled | Unscaled (physical) parameter values, keyed by parameter name. Use these for parameter traces. |
multistart_job_id | Index of the multistart this entry belongs to, when applicable. |
outputs / best_outputs | Model outputs at this iteration. Present for design-objective runs. |
Saves are throttled (roughly every 100 iterations or every 5 seconds), so the
trace is a sampled subset of the optimizer’s evaluations rather than every
single one. The list is empty when live progress updates were disabled for
the run, and there is no per-iteration wall-clock timing.