Skip to main content

Ready-to-use time series models implemented in PyTorch and Lightning.

Project description

chronocratic-models

License: BSD-3-Clause PyPI version Python versions PyPI Downloads Build Status Documentation Status Code style: ruff GitHub stars

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 the chronocratic.models namespace.

Installation

pip install chronocratic-models

Quick Start

import torch
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)

# 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.
FCN Fully convolutional encoder designed for Mixup Contrastive Learning (MCL) 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.

Generative

Model Description
TimeVAE Variational autoencoder for time-series data with latent representation encoding and generation.

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 — pre-trained encoders ready 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chronocratic_models-0.1.0a4.tar.gz (288.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chronocratic_models-0.1.0a4-py3-none-any.whl (123.1 kB view details)

Uploaded Python 3

File details

Details for the file chronocratic_models-0.1.0a4.tar.gz.

File metadata

  • Download URL: chronocratic_models-0.1.0a4.tar.gz
  • Upload date:
  • Size: 288.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for chronocratic_models-0.1.0a4.tar.gz
Algorithm Hash digest
SHA256 132eb392038a903eaa27ac992293c618a7d7e209b3f07156474e7f8fe2abb07b
MD5 e364cade0cb66b8d7a39c3b0935477b0
BLAKE2b-256 dad9f8e970f03d0d5cdbc6a1e157735da268c0cd6138c7328e704f86ad4c1949

See more details on using hashes here.

Provenance

The following attestation bundles were made for chronocratic_models-0.1.0a4.tar.gz:

Publisher: pypi-publish.yml on chronocratic/chronocratic-models

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chronocratic_models-0.1.0a4-py3-none-any.whl.

File metadata

File hashes

Hashes for chronocratic_models-0.1.0a4-py3-none-any.whl
Algorithm Hash digest
SHA256 b1be5723b8e35e2924127616c114db83f4f852d22c8395d9b1c3c27ffe6158b4
MD5 cc95fb4378ba6dc19b226e13d7b2a164
BLAKE2b-256 fd50829a4b8591ec835bcf64cc82e4dca64e8f160cfe40ff27375cefbdc2deae

See more details on using hashes here.

Provenance

The following attestation bundles were made for chronocratic_models-0.1.0a4-py3-none-any.whl:

Publisher: pypi-publish.yml on chronocratic/chronocratic-models

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page