Introduction to Pipelines

Chain DirectEntry, Calculation, DataFit, and Validation elements to transform battery parameters and fit models to experimental data.

Battery parameterization is built around a simple abstraction: pipeline elements that transform input parameters into output parameters, chained together into a pipeline. This design provides flexibility to handle any parameterization workflow—from simple calculations to complex data fitting.

Pipeline Elements

The basic building block is a pipeline element. Any pipeline element accepts a set of parameter values (possibly empty) and returns another set of parameter values. The full pipeline is built by calling each element in series to yield the complete parameter set.

There are five types of pipeline element:

TypeDescription
DirectEntryThe simplest type—ignores input parameters and returns pre-defined values (e.g., from literature or direct measurements)
CalculationComputes new parameters based on provided inputs (e.g., calculating maximum particle concentration from capacity, volume fraction, and thickness)
DataFitEstimates parameters by fitting a model to experimental data
ArrayDataFitFits the same model separately at each value of an independent variable (e.g., a separate fit per temperature or per pulse SOC)
ValidationChecks fitted parameters against held-out data

The pipeline element types and built-in calculations listed here are not exhaustive. See the Pipelines API how-to for the full configuration surface.

For example, a capacity pipeline chains an electrode-capacity calculation per electrode with cyclable-lithium and electrode-SOH calculations — each element consuming parameters produced by the elements before it.

Each element:

  1. Takes input parameters from the parameter dictionary
  2. Performs computation
  3. Returns output parameters that become available to subsequent elements

To assemble and submit a pipeline programmatically, see Pipelines → Overview in the Documentation tab.

Naming conventions

Clear Naming

Use descriptive parameter names with units: "Electrode capacity [A.h]" not "cap"

Unit Consistency

Be explicit about unit conversions; use SI units internally

Built-in Calculations

Handling pipeline failures

Pipeline elements run sequentially. When an element fails, the pipeline reports an error and any downstream elements stop. The cause is recorded on the element as an error_code:

error_codeMeaning
SUBMISSION_FAILEDThe element could not be submitted to a worker (for example, transient infrastructure issue). Safe to resubmit.
EXECUTION_TIMEOUTThe element exceeded its execution time limit. Adjust the configuration before retrying.
INTERNAL_ERRORAn unexpected server-side error occurred while running the element.

Resubmitting a failed pipeline

If the first failed element has error_code = SUBMISSION_FAILED, you can resubmit the pipeline. Resubmission resets that element and continues execution from where the pipeline stopped — completed elements are not re-run.

Open the pipeline detail page. When the first failed element could not be submitted, the error shown under that element in the list offers a Resubmit button; the alert at the top of the page links to the element. Click Resubmit to retry the pipeline in place.

For failures with other error codes (timeouts, internal errors, or configuration issues), create a new pipeline with the corrected configuration instead of resubmitting.

Data Fitting

The pipeline abstraction also powers data fitting—estimating unknown parameters by comparing model predictions to experimental data. A DataFit element wraps a pipeline with an optimization loop:

  • The optimizer proposes parameter values
  • The pipeline runs the model with those values
  • The objective computes how well predictions match data
  • This repeats until the best-fit parameters are found

Pipeline errors

When a pipeline element fails, Studio shows the element in a Failed state with its full error message directly beneath it, headed by what its machine-readable error code means (for example, Solver error for SOLVER_ERROR). Hover the Failed status chip in any pipeline list to see the same heading.

The same fields are returned by the API on failed jobs and pipeline elements:

{
  "status": "FAILED",
  "error": "Parameter 'Negative electrode loading [A.h.cm-2]' not found in pipeline parameter values. Best matches are [...]",
  "error_code": "CONFIGURATION_ERROR",
  "error_detail": {
    "exception_type": "ParameterNotFoundError"
  }
}

Error codes

Use the error_code field to branch on failure type without parsing error strings:

CodeWhen it's raisedWhat to do
CONFIGURATION_ERRORA pipeline, element or protocol is misconfigured — for example, a required parameter is missing, a value is out of range, a field has the wrong type, or a protocol can't be simulated as written (malformed step, unknown end-condition type, missing drive cycle, unresolved goto target, initial SOC outside [0, 100]). Also raised when a fit or optimization finds no parameter set within its bounds for which the model can be solved; the message names the first failure.Fix the configuration, parameters or bounds. The error message names the offending field, or the failure every evaluation hit.
MODEL_ERRORThe model could not be set up, discretised, initialised or evaluated as configured — for example, an incompatible combination of model options, or a state-of-charge initialisation that fails for these parameters.Check the model options and that the parameter set suits this model. The error message names the underlying failure and, for a fit or optimization, the objective it failed in.
SOLVER_ERRORThe numerical solver failed (e.g., voltage cut-off violated, integration failure during a simulation), or a single model evaluation exceeded its time limit.Check the operating protocol, initial conditions, and parameter values for physical consistency.
MAX_BACKWARD_JUMPS_EXCEEDEDA protocol made more backward goto jumps than its limit allows: either a loop that never exits, or a long protocol (many cycles) that needs a higher limit.If the protocol should loop that many times, rerun with a higher max_backward_jumps — Studio offers this on the failed simulation. Otherwise fix the loop's exit condition.
EXECUTION_TIMEOUTThe job exceeded its allowed wall-clock time.Reduce problem size, simplify the model, or split the run.
SUBMISSION_FAILEDThe job could not be submitted to the compute backend.Retry the job. Contact support if it persists.
INTERNAL_ERRORAn unexpected error inside the platform. The raw exception message is intentionally sanitised.Retry the job. Contact support if it persists.

A failure carries the same code wherever it is recorded: on the failed job, its pipeline element and the pipeline. A run of a multistart fit that fails on its own carries its own failure's code, and runs still in progress when the fit fails take the fit's. When a validation runs but some of its objectives fail, the element still completes; in the element's result, each failed objective's message is in failed_objectives and its code in failed_objective_error_codes.

Catching configuration errors in Python

Submitting a pipeline with a bad configuration doesn't fail at submission time — the job is accepted, then the offending element fails with error_code = CONFIGURATION_ERROR once it runs (see the table above). Waiting for the pipeline with the SDK's wait_for_completion raises that failure as an IonworksError:

import ionworks as iw

try:
    client.pipeline.wait_for_completion(pipeline_id)
except iw.api.IonworksError as err:
    if err.error_code != "JOB_FAILED":
        raise
    detail = err.data["detail"]
    if detail["job_error_code"] != "CONFIGURATION_ERROR":
        raise
    print(f"Fix the configuration: {detail['job_error']}")

The exception's own error_code is JOB_FAILED, and its data["detail"] says why the job failed: job_error_code is the code from the table above (None when the job has none: it was canceled, or failed before error codes were recorded), and job_error is the message — for a missing parameter, the same message shown above ("Parameter 'Negative electrode loading [A.h.cm-2]' not found in pipeline parameter values. Best matches are [...]"). Branch on job_error_code rather than parsing the message. client.simulation.wait_for_completion, client.optimization.wait_for_completion and client.ecm.wait_for_completion raise the same error; waiting on a batch of simulations also lists each failed one, with its own code and message, under failures.

When a UCP protocol can't be simulated as written — for example, a drive cycle referenced by name that wasn't supplied, a goto target that doesn't resolve, an end-condition string that doesn't parse, an initial SOC outside [0, 100], or an expression that references an uninitialised variable — the failed pipeline element is tagged with the CONFIGURATION_ERROR code and its message is surfaced verbatim through the API. This distinguishes a user-correctable protocol issue (fix the protocol, drive cycles, or inputs and retry) from an unexpected internal failure, which is reported as INTERNAL_ERROR.

On this page