400Ping commented on code in PR #779: URL: https://github.com/apache/mahout/pull/779#discussion_r2659526153
########## qdp/qdp-core/src/io.rs: ########## @@ -249,3 +249,22 @@ pub fn read_arrow_ipc_batch<P: AsRef<Path>>(path: P) -> Result<(Vec<f64>, usize, /// /// This is a type alias for backward compatibility. Use [`crate::readers::ParquetStreamingReader`] directly. pub type ParquetBlockReader = crate::readers::ParquetStreamingReader; + +/// Reads batch data from a TensorFlow TensorProto file. +/// +/// Supports Float64 tensors with shape [batch_size, feature_size] or [n]. +/// Prefers tensor_content for efficient parsing, but still requires one copy to Vec<f64>. +/// +/// # Byte Order +/// Assumes little-endian byte order (standard on x86_64). +/// +/// # Returns +/// Tuple of `(flattened_data, num_samples, sample_size)` +/// +/// # TODO +/// Add OOM protection for very large files Review Comment: Remember to do a follow up pr for this. -- 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]
