# Batched Results Use this page when {func}`solve ` returns a {class}`BatchSolveResult `. Each batch entry represents one set of {term}`project keys`. Start with [Batched Solves](../core/solve/batched.md) to create a batch. ## Batch Result Data {class}`BatchSolveResult ` provides these types of result data: - {attr}`project_file `: the solved project file. - {attr}`keys `: metadata for the {term}`batched project keys`. - {attr}`costs `: tabular batched cost data. - {attr}`eigenvalues `: tabular batched eigenvalue data. - {attr}`postprocesses `: a collection of batched postprocesses. Exports of {class}`BatchSolveResult ` data include a batch dimension. Use {meth}`to_dict() ` for dictionary exports from batched project-key views and {meth}`to_dict() ` for batched postprocess views. The deprecated {meth}`to_mapping() ` compatibility name remains available for both views, including {meth}`BatchPostprocessRecord.to_mapping() `. {class}`BatchSolveResult ` also provides: - {attr}`success_indices `: indices of successful solve entries. - {attr}`failure_indices `: indices of failed solve entries. ## Select Entries And Slices Select individual entries or slices from a {class}`BatchSolveResult `. Use an index in square brackets to select one {class}`BatchSolveEntry ` from the {class}`BatchSolveResult `. Index `0` selects the first entry: ```python entry = batch[0] ``` Use a slice, such as {class}`batch[1:4] `, to create another {class}`BatchSolveResult `. The first number is included and the second number is excluded: ```python subset = batch[1:4] ``` The batch preserves input order. Slicing preserves the original entry indices. Use `len` to get the number of batch entries and iterate over the batch to inspect each {class}`BatchSolveEntry ` in input order: ```python print(len(batch)) for entry in batch: print(entry.index, entry.keys) ``` Use {attr}`success_indices ` and {attr}`failure_indices ` to select entry groups. ## Inspect One Entry A {class}`BatchSolveEntry ` provides these attributes: - {attr}`index `: the batch index. - {attr}`keys `: the keys used for the solve call. - {attr}`result `: the {class}`SolveResult ` object when the solve call succeeded. - {attr}`failure `: a {class}`BatchSolveFailure ` when this entry failed. - {attr}`log `: solve log information, as for a {class}`SolveResult `. ## Batch Export Dimensions The {attr}`costs `, {attr}`eigenvalues `, and {attr}`postprocesses ` attributes follow the same rules as the corresponding {class}`SolveResult ` attributes. Their exports include an extra batch dimension. Batch exports use explicit dimensions and identities: - `batch_index` identifies the original input set of project keys. - `row_index` identifies a row within one result entry. - `is_valid` marks result data that is available. - `is_padded` marks positions added to align variable-length results. Unavailable rows use `NaN` values where the export format requires padding. The `is_valid` mask distinguishes unavailable data from solver data that is actually `NaN`. ## Export Limits Batch results do not provide wide-form aggregate DataFrame exports. Use long-form DataFrame methods for batch tables and postprocess rows. See [Data Exporting](data_exports) for general format behavior and [{term}`Resultbag`](../resultbag/index.md) for cached batch acquisition.