PyTorch benchmark scaffolding for latent neural dynamics models.
Project description
LaDyS (Latent Dynamical Systems) Package
PyTorch benchmark scaffolding for latent variable models of neural dynamics.
The first API pass standardizes model construction, training/reporting contracts,
and a Lorenz synthetic dataset. Models accept (batch, time, neurons) tensors in
forward.
Initial Examples
ladys.models.cassm: thin adapter around the upstream sparse CASSMKalmanFilterSmootherimplementation. Install the originalcassmpackage or the local CASSM repository before constructing this model.ladys.models.gpfa: Gaussian-observation GPFA with FA initialization, EM updates, and RBF GP timescale learning. One full-dataset E/M update is treated as one benchmark epoch.
References Inspected
- Local planning note:
/Users/jonathanhuml/Desktop/npdb.md - CASSM Lorenz data source:
jonathanhuml/cassm/src/cassm/datasets - Local GPFA-MATLAB reference:
/Users/jonathanhuml/Desktop/gpfa-matlab
Smoke Usage
PYTHONPATH=src python3 examples/smoke_compare.py
Public Experiment API
LaDyS is organized around three public pieces:
ladys.models: model configs build PyTorchnn.Moduleinstances and carry their optimization settings.ladys.data.DataModule: creates PyTorch train/validation datasets and dataloaders.ladys.Experiment: gathers data, model, training, evaluation metrics, and artifacts into one inspectable run folder.
Run the canonical CLI path with a dataset and model:
ladys run -d lorenz -m cassm
The run folder includes config.json, history.csv, metrics.json,
predictions.npz, model.pt, and report.md. The CLI also accepts full YAML
experiment configs:
ladys run -c configs/experiment/gpfa_lorenz.yaml
ladys list datasets
ladys list models
Scaling Benchmark
PYTHONPATH=src python3 scripts/benchmark_lorenz_scaling.py \
--models cassm gpfa \
--neurons 10 100 1000 \
--seeds 1
The script writes lorenz_scaling_results.csv,
lorenz_scaling_results.npy, and time_vs_neurons.png under
artifacts/lorenz_scaling/.
Loss-Curve Benchmark
PYTHONPATH=src python3 scripts/benchmark_lorenz_loss_curves.py \
--models cassm gpfa \
--neurons 100 \
--epochs 30
The script writes lorenz_loss_history.csv, test_rate_mse_curves.png,
test_objective_curves.png, train_test_objective_curves.png, and per-model
held-out rate trace plots/CSVs under artifacts/lorenz_loss_curves/.
Preprocessing
Experiment YAML files can include a preprocessing block. The benchmark
scripts apply this to dataset observations before models see them, while
leaving Lorenz ground-truth rates unchanged for MSE metrics.
preprocessing:
observations:
name: smooth_firing_rate
sampling_precision: 20.0
kern_sd_ms: 50.0
configs/experiment/cassm_lorenz.yaml enables this CASSM-style spike
smoothing. configs/experiment/gpfa_lorenz.yaml leaves observations raw.
See docs/model_output_contract.md for the forward-output convention.
See docs/optimizer_contract.md for the benchmark epoch definition.
Documentation Site
Docs source lives under docs/ and is configured by mkdocs.yml. Model pages
under docs/models/ are generated from model class docstrings and config
defaults. Images referenced from model docstrings should live under
docs/assets/ and can be linked as assets/<filename>:
python scripts/generate_model_docs.py
python scripts/generate_model_docs.py --check
Install the docs extra and serve the site locally:
pip install -e ".[docs]"
mkdocs serve
The GitHub Pages workflow publishes the root homepage at
https://zkunkworks.com/ from website/ and the generated documentation at
https://zkunkworks.com/ladys/.
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 ladys-0.1.0.tar.gz.
File metadata
- Download URL: ladys-0.1.0.tar.gz
- Upload date:
- Size: 28.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f70a48f186dd5fe26cb9271424d688b1bcba2c537a24503f09764982dbcfc7a9
|
|
| MD5 |
4e0c2ce33c989b42ddbfa3de7e80c87e
|
|
| BLAKE2b-256 |
b026ec3d045c7a088c9b6b7748caa67272bfd0b3c759315b091c43aee06373b3
|
Provenance
The following attestation bundles were made for ladys-0.1.0.tar.gz:
Publisher:
publish.yml on jonathanhuml/ladys
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ladys-0.1.0.tar.gz -
Subject digest:
f70a48f186dd5fe26cb9271424d688b1bcba2c537a24503f09764982dbcfc7a9 - Sigstore transparency entry: 1887681561
- Sigstore integration time:
-
Permalink:
jonathanhuml/ladys@ddb761fd6f1d01ee4c9acafcd83cb80f85f7b15b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jonathanhuml
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ddb761fd6f1d01ee4c9acafcd83cb80f85f7b15b -
Trigger Event:
push
-
Statement type:
File details
Details for the file ladys-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ladys-0.1.0-py3-none-any.whl
- Upload date:
- Size: 31.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86792f2ce86b6dc609e8a57cd4af867559d459595f7eb29d3b5eee0f37ce5b2c
|
|
| MD5 |
b17fcad27b995e3ffa37b1e1ac23e7fc
|
|
| BLAKE2b-256 |
52430003208054c0d7074b351ee981a158829e0520bbfb40aea295c64e0d9dab
|
Provenance
The following attestation bundles were made for ladys-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on jonathanhuml/ladys
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ladys-0.1.0-py3-none-any.whl -
Subject digest:
86792f2ce86b6dc609e8a57cd4af867559d459595f7eb29d3b5eee0f37ce5b2c - Sigstore transparency entry: 1887681674
- Sigstore integration time:
-
Permalink:
jonathanhuml/ladys@ddb761fd6f1d01ee4c9acafcd83cb80f85f7b15b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jonathanhuml
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ddb761fd6f1d01ee4c9acafcd83cb80f85f7b15b -
Trigger Event:
push
-
Statement type: