mirror of
https://github.com/mii443/tokenizers.git
synced 2025-08-23 00:35:35 +00:00
Using serde (serde_pyo3) to get __str__ and __repr__ easily.
This commit is contained in:
@ -16,8 +16,8 @@ use tokenizers as tk;
|
||||
/// Trainer will return an instance of this class when instantiated.
|
||||
#[pyclass(module = "tokenizers.trainers", name = "Trainer", subclass)]
|
||||
#[derive(Clone, Deserialize, Serialize)]
|
||||
#[serde(transparent)]
|
||||
pub struct PyTrainer {
|
||||
#[serde(flatten)]
|
||||
pub trainer: Arc<RwLock<TrainerWrapper>>,
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user