Make compaction transitions recoverable
This commit is contained in:
@@ -14,7 +14,7 @@ use std::ptr::NonNull;
|
||||
use std::time::UNIX_EPOCH;
|
||||
|
||||
const CHECKPOINT_MAGIC: &[u8; 8] = b"DS4RKV01";
|
||||
const CHECKPOINT_VERSION: u32 = 1;
|
||||
const CHECKPOINT_VERSION: u32 = 2;
|
||||
const CHECKPOINT_IO_CHUNK: usize = 8 * 1024 * 1024;
|
||||
const DEFAULT_PREFILL_CHUNK: u32 = 4096;
|
||||
|
||||
@@ -571,6 +571,7 @@ pub(super) struct Executor {
|
||||
quality: bool,
|
||||
checkpoint_tag: [u8; 32],
|
||||
model_modified: (u64, u32),
|
||||
model_identity: [u8; 32],
|
||||
_context: Context,
|
||||
model: Model,
|
||||
}
|
||||
@@ -599,6 +600,7 @@ impl Executor {
|
||||
.and_then(|modified| modified.duration_since(UNIX_EPOCH).ok())
|
||||
.map(|duration| (duration.as_secs(), duration.subsec_nanos()))
|
||||
.unwrap_or_default();
|
||||
let model_identity = model.checkpoint_identity();
|
||||
Ok(Self {
|
||||
weights,
|
||||
session,
|
||||
@@ -607,6 +609,7 @@ impl Executor {
|
||||
quality,
|
||||
checkpoint_tag: [0; 32],
|
||||
model_modified,
|
||||
model_identity,
|
||||
_context: context_handle,
|
||||
model,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user