Fix deps.

This commit is contained in:
Nicolas Patry
2023-08-15 18:58:58 +02:00
parent d726484a6d
commit baca3cf69d
4 changed files with 3 additions and 29 deletions

View File

@ -9,9 +9,6 @@ categories.workspace = true
license.workspace = true license.workspace = true
readme = "README.md" readme = "README.md"
[lib]
crate-type=["dylib"]
[dependencies] [dependencies]
byteorder = { workspace = true } byteorder = { workspace = true }
candle = { path = "../candle-core", version = "0.2.0", package = "candle-core" } candle = { path = "../candle-core", version = "0.2.0", package = "candle-core" }
@ -22,5 +19,5 @@ memmap2 = { workspace = true }
tokenizers = { workspace = true, features = ["onig"] } tokenizers = { workspace = true, features = ["onig"] }
rand = { workspace = true } rand = { workspace = true }
thiserror = { workspace = true } thiserror = { workspace = true }
parquet = { version = "45.0.0"} parquet = { workspace = true}
image = { workspace = true } image = { workspace = true }

View File

@ -57,6 +57,7 @@ pub fn from_hub(api: &Api, dataset_id: String) -> Result<Vec<SerializedFileReade
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::*; use super::*;
use parquet::file::reader::FileReader;
#[test] #[test]
fn test_dataset() { fn test_dataset() {
@ -67,28 +68,6 @@ mod tests {
) )
.unwrap(); .unwrap();
assert_eq!(files.len(), 1); assert_eq!(files.len(), 1);
assert_eq!(files[0].metadata().file_metadata().num_rows(), 20);
let mut rows = files.into_iter().flat_map(|r| r.into_iter());
let row = rows.next().unwrap().unwrap();
let mut col_iter = row.get_column_iter();
// First element is an image
col_iter.next();
assert_eq!(
col_iter.next().unwrap().1,
&parquet::record::Field::Str("a drawing of a green pokemon with red eyes".to_string())
);
// Keep for now to showcase how to use.
for row in rows {
if let Ok(row) = row {
for (_idx, (_name, field)) in row.get_column_iter().enumerate() {
if let parquet::record::Field::Str(value) = field {
println!("Value {value:?}");
}
}
}
}
} }
} }

View File

@ -1,6 +1,5 @@
//! Datasets & Dataloaders for Candle //! Datasets & Dataloaders for Candle
pub mod batcher; pub mod batcher;
#[cfg(feature = "hub")]
pub mod hub; pub mod hub;
pub mod nlp; pub mod nlp;
pub mod vision; pub mod vision;

View File

@ -41,7 +41,6 @@ tracing-subscriber = { workspace = true }
wav = { workspace = true } wav = { workspace = true }
# Necessary to disambiguate with tokio in wasm examples which are 1.28.1 # Necessary to disambiguate with tokio in wasm examples which are 1.28.1
tokio = "1.29.1" tokio = "1.29.1"
parquet = "45.0.0"
image.workspace = true image.workspace = true
[build-dependencies] [build-dependencies]