0lai0 commented on code in PR #1407:
URL: https://github.com/apache/mahout/pull/1407#discussion_r3473402757
##########
qdp/qdp-core/src/pipeline_runner.rs:
##########
@@ -492,26 +628,42 @@ impl PipelineIterator {
config.encoding.as_str()
)));
}
- if data.len() != num_samples * sample_size {
+ if batch_data.len() != num_samples * sample_size {
return Err(MahoutError::InvalidInput(format!(
"File data length {} is not num_samples ({}) * sample_size
({})",
- data.len(),
+ batch_data.len(),
num_samples,
sample_size
)));
}
- let producer = InMemoryProducer {
- data,
- cursor: 0,
- sample_size,
- batch_size: config.batch_size,
- num_qubits: config.num_qubits as usize,
- batches_yielded: 0,
- batch_limit,
- };
let prefetch_depth = config.prefetch_depth;
- let (rx, recycle_tx, _producer_handle) = spawn_producer(producer,
prefetch_depth)?;
+ let (rx, recycle_tx, _producer_handle) = match batch_data {
+ BatchData::F32(data) => spawn_producer(
Review Comment:
I updated `extracted::build_inmemory_producer<T>` so that the two
`from_file` arms are now consolidated into a single generic call, aligning it
with `build_streaming_producer<T>`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]