mirror of
https://github.com/mii443/tokenizers.git
synced 2025-08-23 00:35:35 +00:00
PyModel uses a RwLock to allow modifications
This commit is contained in:
@ -89,8 +89,7 @@ impl Trainer for PyTrainer {
|
||||
words: HashMap<String, u32>,
|
||||
model: &mut PyModel,
|
||||
) -> tk::Result<Vec<tk::AddedToken>> {
|
||||
todo!("FIX THIS");
|
||||
self.trainer.train(words, &mut model.model)
|
||||
self.trainer.train(words, &mut model.model.write().unwrap())
|
||||
}
|
||||
|
||||
fn process_tokens(&self, words: &mut HashMap<String, u32>, tokens: Vec<String>) {
|
||||
|
Reference in New Issue
Block a user