diff --git a/crates/dsperse/src/pipeline/combined.rs b/crates/dsperse/src/pipeline/combined.rs index 5aac2899..623d319a 100644 --- a/crates/dsperse/src/pipeline/combined.rs +++ b/crates/dsperse/src/pipeline/combined.rs @@ -261,6 +261,18 @@ impl CombinedRun { self.outputs_for_names(output_names) } + pub fn output_arrays_for_names(&self, names: &[String]) -> Option>> { + let mut arrays = Vec::with_capacity(names.len()); + for name in names { + arrays.push(self.tensor_cache.try_get(name)?.clone()); + } + if arrays.is_empty() { + None + } else { + Some(arrays) + } + } + pub fn outputs_for_names(&self, names: &[String]) -> Option> { let mut flat = Vec::new(); for name in names {