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:
| Type | Description |
|---|---|
| DirectEntry | The simplest type—ignores input parameters and returns pre-defined values (e.g., from literature or direct measurements) |
| Calculation | Computes new parameters based on provided inputs (e.g., calculating maximum particle concentration from capacity, volume fraction, and thickness) |
| DataFit | Estimates parameters by fitting a model to experimental data |
| ArrayDataFit | Fits the same model separately at each value of an independent variable (e.g., a separate fit per temperature or per pulse SOC) |
| Validation | Checks 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:
- Takes input parameters from the parameter dictionary
- Performs computation
- 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
Use descriptive parameter names with units: "Electrode capacity [A.h]" not "cap"
Be explicit about unit conversions; use SI units internally
Built-in Calculations
Electrode geometry, mass, capacity, cyclable lithium, and microstructure
Thermal PropertiesHeat capacity, Arrhenius temperature dependence, and thermal modeling
Piecewise InterpolantsSmooth piecewise functions for SOC and temperature-dependent parameters
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_code | Meaning |
|---|---|
SUBMISSION_FAILED | The element could not be submitted to a worker (for example, transient infrastructure issue). Safe to resubmit. |
EXECUTION_TIMEOUT | The element exceeded its execution time limit. Adjust the configuration before retrying. |
INTERNAL_ERROR | An 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.
client.pipeline.get(...)):curl -X POST \
-H "Authorization: Bearer $IONWORKS_API_KEY" \
https://api.ionworks.com/jobs/{pipeline_id}/resubmit400 if the first failed element is not in a SUBMISSION_FAILED state, and 404 if the pipeline does not exist. See the API Reference for the full schema.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
Cost functions, identifiability, regularization, and other theory.
Data Fitting (how-to)Configure and submit data fits with ionworks.pipeline + ionworks.api.
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:
| Code | When it's raised | What to do |
|---|---|---|
CONFIGURATION_ERROR | A 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_ERROR | The 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_ERROR | The 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_EXCEEDED | A 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_TIMEOUT | The job exceeded its allowed wall-clock time. | Reduce problem size, simplify the model, or split the run. |
SUBMISSION_FAILED | The job could not be submitted to the compute backend. | Retry the job. Contact support if it persists. |
INTERNAL_ERROR | An 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.