xet_runtime/config/groups/xorb.rs
1use crate::utils::{ByteSize, ConfigEnum};
2
3crate::config_group!({
4 /// How often should we retest the compression scheme?
5 /// Determining the optimal compression scheme takes time, but
6 /// it also minimizes the storage costs of the data.
7 ///
8 /// If set to zero, it's set once per file block per xorb.
9 ///
10 /// The default value is 32.
11 ///
12 /// Use the environment variable `HF_XET_XORB_COMPRESSION_SCHEME_RETEST_INTERVAL` to set this value.
13 ref compression_scheme_retest_interval : usize = 32;
14
15 /// Compression policy for xorb data.
16 /// Valid values: "" or "auto" for automatic detection, "none", "lz4", "bg4-lz4".
17 /// When set to "" or "auto", the best compression scheme is chosen based on data analysis.
18 ///
19 /// The default value is "auto" (auto-detect).
20 ///
21 /// Use the environment variable `HF_XET_XORB_COMPRESSION_POLICY` to set this value.
22 ref compression_policy: ConfigEnum = ConfigEnum::new("auto", &["", "auto", "none", "lz4", "bg4-lz4"]);
23
24 /// Override the maximum xorb size in bytes for simulation mode.
25 /// When set to Some(value), this overrides the hard-coded MAX_XORB_BYTES
26 /// cutting threshold in simulation builds. When None (default), the
27 /// standard constant is used.
28 ///
29 /// Only effective when the `simulation` feature is enabled.
30 ///
31 /// Use the environment variable `HF_XET_XORB_SIMULATION_MAX_BYTES` to set this value.
32 ref simulation_max_bytes: Option<ByteSize> = None;
33
34 /// Override the maximum xorb chunk count for simulation mode.
35 /// When set to Some(value), this overrides the hard-coded MAX_XORB_CHUNKS
36 /// cutting threshold in simulation builds. When None (default), the
37 /// standard constant is used.
38 ///
39 /// Only effective when the `simulation` feature is enabled.
40 ///
41 /// Use the environment variable `HF_XET_XORB_SIMULATION_MAX_CHUNKS` to set this value.
42 ref simulation_max_chunks: Option<usize> = None;
43});