mirror of
https://github.com/mii443/tokenizers.git
synced 2025-08-23 00:35:35 +00:00
Hotfix for new Builder
cc @epwalsh
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
extern crate tokenizers as tk;
|
||||
|
||||
use super::error::ToPyResult;
|
||||
use super::utils::Container;
|
||||
use pyo3::prelude::*;
|
||||
use pyo3::types::*;
|
||||
@ -51,10 +50,8 @@ impl BpeTrainer {
|
||||
}
|
||||
}
|
||||
|
||||
let trainer: PyResult<_> = ToPyResult(builder.build()).into();
|
||||
|
||||
Ok(Trainer {
|
||||
trainer: Container::Owned(Box::new(trainer?)),
|
||||
trainer: Container::Owned(Box::new(builder.build())),
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -100,10 +97,8 @@ impl WordPieceTrainer {
|
||||
}
|
||||
}
|
||||
|
||||
let trainer: PyResult<_> = ToPyResult(builder.build()).into();
|
||||
|
||||
Ok(Trainer {
|
||||
trainer: Container::Owned(Box::new(trainer?)),
|
||||
trainer: Container::Owned(Box::new(builder.build())),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user