This release is a pre-release and may not be stable for production use.
chronocratic-models
Ready-to-use time series models implemented in PyTorch and Lightning.
Note: The PyPI package name uses a hyphen (
chronocratic-models), but the import uses thechronocratic.modelsnamespace.
Installation
pip install chronocratic-models
Quick Start
import torch
from lightning.pytorch import Trainer
from chronocratic.models import TS2Vec, TS2VecModelParameters
# Create model using parameters dataclass
params = TS2VecModelParameters(input_dims=1)
model = TS2Vec(**vars(params))
# Prepare synthetic time series (n_instance, n_timestamps, n_features)
synthetic_data = torch.randn(2, 100, 1)
# Train the model first (models do not ship with pre-trained weights)
trainer = Trainer(max_epochs=1, accelerator="cpu", enable_checkpointing=False)
trainer.fit(model, train_dataloaders=synthetic_data)
# Get multi-scale representations
representations = model.encode(
synthetic_data,
batch_size=2,
num_workers=0,
encoding_window="multiscale",
)
print(representations.shape)
Models
Convolutional (Dilated)
| Model | Description |
|---|---|
| TS2Vec | Multi-scale hierarchical representation learning via dilated convolutions with hierarchical clustering. Code source: zhihanyue/ts2vec |
| CoST | Decomposition-based contrastive self-supervised learning with trend-seasonal decomposition and contrastive objectives. Code source: salesforce/CoST |
| AutoTCL | Automatic temporal contrastive learning with a trainable augmentation module for self-supervised time-series encoding. Code source: AslanDing/AutoTCL |
Convolutional (Standard)
| Model | Description |
|---|---|
| Series2Vec | Self-supervised pretraining via contrastive learning on augmented time-series segments. |
| TSTCC | Temporal and contextual contrastive pretraining for time-series representation learning. |
| MCL | Fully convolutional encoder designed for Mixup Contrastive Learning objectives. |
Transformer
| Model | Description |
|---|---|
| TST | Time Series Transformer with masked-reconstruction-based self-supervised pretraining. |
Recurrent
| Model | Description |
|---|---|
| TimeNet | Recurrent encoder-decoder architecture for time-series representation learning. |
| RecurrentAutoEncoder | Recurrent autoencoder for time-series representation learning. Code source: time-series-foundation-models/time-series-autoencoder |
Generative
| Model | Description |
|---|---|
| TimeVAE | Variational autoencoder for time-series data with latent representation encoding and generation. |
Important: These models are provided as training-ready implementations. No pre-trained weights are included — you must train them on your own data before using them for inference.
Features
- Polymorphic augmentation producer contract — models accept any augmentation through a unified interface, eliminating enum-based branching.
- Lightning integration — all models are built on PyTorch Lightning for clean training loops and extensibility.
- Self-supervised representation learning — train encoders for downstream tasks without labeled data.
- Pre-configured model parameters — each model ships with tested default configuration dataclasses.
- NumPy and PyTorch tensor support — flexible input handling for both frameworks.
Documentation
For full API reference, guides, and examples, visit chronocratic-models.readthedocs.io.
License
This project is licensed under the BSD 3-Clause License — see the LICENSE file for details.
Metadata
Release files for chronocratic-models 0.1.0a9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| chronocratic_models-0.1.0a9.tar.gz | 323.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| chronocratic_models-0.1.0a9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 456.7 kB
Release files / chronocratic_models-0.1.0a9.tar.gz
| Download URL | chronocratic_models-0.1.0a9.tar.gz |
|---|---|
| Size | 323.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ef8e401da97713657c0db49a3b05e5161d37949ead3da9b098de67f6269bca61
|
|
BLAKE2b-256 checksum How to use checksums |
c1232dfaffb9e6c1bf60738808a6cfaa8d212661e4101173ddc59dcd259fa117
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 1, 2026.
Transparency logRelease files / chronocratic_models-0.1.0a9-py3-none-any.whl
| Download URL | chronocratic_models-0.1.0a9-py3-none-any.whl |
|---|---|
| Size | 133.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
11b07c692f528c252f14c7987afee6ceec6c4db78324ab3a5ba4640e0a63600c
|
|
BLAKE2b-256 checksum How to use checksums |
22af41ff67217e03c7b6dc0c01f0b618855c39fdd677c05e30784af97a0f9f9e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 1, 2026.
Transparency log