entrenar/hf_pipeline/dataset/split.rs
1//! Dataset split type
2
3use serde::{Deserialize, Serialize};
4
5/// Dataset split type
6#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
7pub enum Split {
8 /// Training split
9 Train,
10 /// Validation split
11 Validation,
12 /// Test split
13 Test,
14}
15
16impl std::fmt::Display for Split {
17 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
18 match self {
19 Self::Train => write!(f, "train"),
20 Self::Validation => write!(f, "validation"),
21 Self::Test => write!(f, "test"),
22 }
23 }
24}