mirror of
https://github.com/mii443/tokenizers.git
synced 2025-08-23 00:35:35 +00:00
PyO3 0.22 (#1665)
* PyO3 0.22 * Fix python stubs * Remove name arg from PyModel::save Python signature --------- Co-authored-by: Dimitris Iliopoulos <diliopoulos@fb.com>
This commit is contained in:
committed by
GitHub
parent
41e0eaa561
commit
6ade8c2d21
@ -55,9 +55,9 @@ impl PyTrainer {
|
||||
}
|
||||
|
||||
fn __setstate__(&mut self, py: Python, state: PyObject) -> PyResult<()> {
|
||||
match state.extract::<&PyBytes>(py) {
|
||||
match state.extract::<&[u8]>(py) {
|
||||
Ok(s) => {
|
||||
let unpickled = serde_json::from_slice(s.as_bytes()).map_err(|e| {
|
||||
let unpickled = serde_json::from_slice(s).map_err(|e| {
|
||||
exceptions::PyException::new_err(format!(
|
||||
"Error while attempting to unpickle PyTrainer: {}",
|
||||
e
|
||||
|
Reference in New Issue
Block a user