From f852e9e5d5f179e0a39cf32d9f22696187bedc0b Mon Sep 17 00:00:00 2001 From: Arthur Zucker Date: Mon, 5 Aug 2024 17:04:17 +0200 Subject: [PATCH] cleanup --- tokenizers/src/models/bpe/serialization.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tokenizers/src/models/bpe/serialization.rs b/tokenizers/src/models/bpe/serialization.rs index c350bf1ba..e41e261f0 100644 --- a/tokenizers/src/models/bpe/serialization.rs +++ b/tokenizers/src/models/bpe/serialization.rs @@ -122,11 +122,8 @@ impl<'de> Visitor<'de> for BPEVisitor { "vocab" => vocab = Some(map.next_value()?), "merges" => merges = Some(map.next_value()?), "type" => match map.next_value()? { - "BPE" => { - println!("We found BPE"); - } + "BPE" => {} u => { - println!("We found u {}", u); return Err(serde::de::Error::invalid_value( serde::de::Unexpected::Str(u), &"BPE", @@ -142,7 +139,7 @@ impl<'de> Visitor<'de> for BPEVisitor { builder = builder.vocab_and_merges(vocab, merges); builder .build() - .map_err(|_| V::Error::custom("Missing something")) + .map_err(|_| V::Error::custom("Fail building")) } Err(e) => Err(V::Error::custom(format!("Failed to convert merges: {}", e))), }