Git-like experiment tracking for deep learning with exact computational resumption
Project description
Syckpt
Git-like experiment tracking for deep learning with exact computational resumption, zero-copy safetensors memory-mapping, and delta-compression.
syckpt is a lightweight, local-first experiment version control system designed to perfectly reconstruct massive computational states—model weights, optimizer momentum, mixed-precision GradScalers, Random Number Generators, and Stateful DataLoaders—without perturbing the loss curve.
How syckpt Works (The Architecture)
syckpt solves checkpoint bloat by treating machine learning parameters exactly like source code in a Git repository.
- Content-Addressable Storage (CAS) & Delta-Compression: Computes purely elemental arrays of
delta = current - baseto save disk space over epochs. - Sub-Layer Freezing: Identifies immutable layers (e.g. frozen backbones) and uses virtual hard-links to achieve zero-cost storage.
- Locality-Sensitive Hashing (LSH): Hyperparameters hash into unique prefixes. Mathematically similar training runs intentionally collide into the identical hash bucket to instantly query the Git tree.
- Asynchronous Multiprocessing: Offloads I/O and delta math to background systems to prevent GPU stalling and bypass the GIL.
- Exact Mathematical Resumption: Restores RNG bit-states specifically across PyTorch, CUDA, Numpy, and isolated
StatefulDataLoaderswith $O(1)$ efficiency.
Installation
pip install syckpt
Workflows and Example Usages
1. Integrating into an Existing Training Flow
If you have a massive Vision Transformer (ViT) looping over a billion-image dataset on S3, slotting in syckpt takes 4 lines.
import torch
import torch.nn as nn
import torch.optim as optim
from syckpt import CheckpointManager
from syckpt.dataloader import StatefulRandomSampler
from torch.utils.data import DataLoader, TensorDataset
model = nn.Linear(10, 2)
optimizer = optim.SGD(model.parameters(), lr=0.01)
dataset = TensorDataset(torch.randn(100, 10), torch.randn(100, 2))
# Use StatefulRandomSampler for O(1) resumption
sampler = StatefulRandomSampler(dataset, batch_size=32)
loader = DataLoader(dataset, batch_size=32, sampler=sampler)
with CheckpointManager("./.syckpt") as ckpt:
ckpt.model = model
ckpt.optimizer = optimizer
ckpt.sampler = sampler
for epoch in ckpt.loop(epochs=10):
for batch_idx, (x, y) in enumerate(loader):
# Training happens here...
ckpt.step_up()
ckpt.save()
2. Hyperparameter Search Efficiency
Evaluating thousands of configurations linearly is deeply inefficient. Because syckpt utilizes Locality-Sensitive Hashing on the config object, running an efficient grid search is incredibly fast.
def evaluate_run(learning_rate: float):
with CheckpointManager("./ml_logs/.syckpt") as ckpt:
ckpt.model = ResNet50()
ckpt.config.lr = learning_rate
# Resumes directly from similar runs if hashes collide in LSH space
for epoch in ckpt.loop(epochs=50):
train_one_epoch()
ckpt.save()
3. Distributed Resumption (PyTorch DDP)
syckpt seamlessly integrates with massive GPU topologies, employing dist.barrier() natively to guarantee exact write structures.
4. Exporting Monolithic Assets (.ckpt)
When the checkpoint has achieved optimal convergence, collapse the internal Git-Tree branches into a single flattened standard portable format.
with CheckpointManager("./experiments") as ckpt:
ckpt.export_ckpt(hash_or_branch="main", output_path="final-model.ckpt")
Architectural Deep-Dive
Curious how syckpt leverages Git pointers, fsspec atomic cloud mechanisms, manages PyTorch tensors, and accelerates training via Zero-Copy Safetensors?
Read our comprehensive documentation reports across the docs/ suite:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file syckpt-0.0.2.tar.gz.
File metadata
- Download URL: syckpt-0.0.2.tar.gz
- Upload date:
- Size: 23.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df33c57370810e0f267136702287db2130778d4d7b9b0ea6202b011eecbfa7fa
|
|
| MD5 |
272e2c1bd52092dec335eae4d4cfc158
|
|
| BLAKE2b-256 |
7a91056a2cb9abc003e479592268dce109e986d6d287cdebed1e34a40757158f
|
Provenance
The following attestation bundles were made for syckpt-0.0.2.tar.gz:
Publisher:
publish.yml on SykChw/syckpt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
syckpt-0.0.2.tar.gz -
Subject digest:
df33c57370810e0f267136702287db2130778d4d7b9b0ea6202b011eecbfa7fa - Sigstore transparency entry: 1116287976
- Sigstore integration time:
-
Permalink:
SykChw/syckpt@6a9fd7e684010202071f5fdd67a2535598d8bf13 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/SykChw
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6a9fd7e684010202071f5fdd67a2535598d8bf13 -
Trigger Event:
push
-
Statement type:
File details
Details for the file syckpt-0.0.2-py3-none-any.whl.
File metadata
- Download URL: syckpt-0.0.2-py3-none-any.whl
- Upload date:
- Size: 21.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2070015418490c37a0f0bd2fd4776ad6a73c0d14ad6a6fbb05e975556f4b7802
|
|
| MD5 |
a7ad46356a51641509efa54e9d4b26dc
|
|
| BLAKE2b-256 |
a924ab8291de23005935303b4aec6d82e5d829db805f1ab4b6e508e082069595
|
Provenance
The following attestation bundles were made for syckpt-0.0.2-py3-none-any.whl:
Publisher:
publish.yml on SykChw/syckpt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
syckpt-0.0.2-py3-none-any.whl -
Subject digest:
2070015418490c37a0f0bd2fd4776ad6a73c0d14ad6a6fbb05e975556f4b7802 - Sigstore transparency entry: 1116288018
- Sigstore integration time:
-
Permalink:
SykChw/syckpt@6a9fd7e684010202071f5fdd67a2535598d8bf13 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/SykChw
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6a9fd7e684010202071f5fdd67a2535598d8bf13 -
Trigger Event:
push
-
Statement type: