Skip to main content

No project description provided

Project description

chronopt

Python Versions from PEP 621 TOML License Releases

chronos-optimum is a Rust-first toolkit for time-series inference and optimisation with ergonomic Python bindings. It couples high-performance solvers with a highly customisable builder API for identification and optimisation of differential systems.

Project goals

  • Speed and numerical accuracy through a Rust core.
  • Modular components with informative diagnostics.
  • Batteries-included experience spanning optimisation, sampling, and plotting.

Core capabilities

  • Gradient-free (Nelder-Mead, CMA-ES) and gradient-based (Adam) optimisers with configurable convergence criteria.
  • Paralleled differential equation fitting via DiffSL with dense or sparse Diffsol backends.
  • Customisable likelihood/cost metrics and Monte-Carlo sampling for posterior exploration.
  • Flexible integration with state-of-the-art differential solvers, such as Diffrax, DifferentialEquations.jl
  • Python builder APIs mirroring the Rust core plus generated type stubs for autocompletion.

Installation

Chronopt targets Python >= 3.11. Windows builds are currently marked experimental.

pip install chronopt

# Or with uv
uv pip install chronopt

# Optional extras
pip install "chronopt[plotting]"

Quickstart

ScalarProblem

import numpy as np
import chronopt as chron


def rosenbrock(x):
    value = (1 - x[0]) ** 2 + 100 * (x[1] - x[0] ** 2) ** 2
    return np.asarray([value], dtype=float)


builder = (
    chron.ScalarBuilder()
    .with_callable(rosenbrock)
    .with_parameter("x", 1.5)
    .with_parameter("y", -1.5)
)
problem = builder.build()
result = problem.optimize()

print(f"Optimal parameters: {result.x}")
print(f"Objective value: {result.fun:.3e}")
print(f"Success: {result.success}")

Differential solver workflow

import numpy as np
import chronopt as chron


# Example diffsol ODE (logistic growth)
dsl = """
in = [r, k]
r { 1 } k { 1 }
u_i { y = 0.1 }
F_i { (r * y) * (1 - (y / k)) }
"""

t = np.linspace(0.0, 5.0, 51)
observations = np.exp(-1.3 * t)
data = np.column_stack((t, observations))

builder = (
    chron.DiffsolBuilder()
    .with_diffsl(dsl)
    .with_data(data)
    .with_parameter("k", 1.0)
    .with_backend("dense")
)
problem = builder.build()

optimiser = chron.CMAES().with_max_iter(1000)
result = optimiser.run(problem, [0.5,0.5])

print(result.x)

Development setup

Clone the repository and create the Python environment:

uv sync

Build the Rust extension with Python bindings:

uv run maturin develop

Regenerate .pyi stubs after changing the bindings:

uv run cargo run -p chronopt-py --no-default-features --features stubgen --bin generate_stubs

Without uv, invoke the generator directly:

cargo run -p chronopt-py --no-default-features --features stubgen --bin generate_stubs

Pre-commit hooks

uv tool install pre-commit
pre-commit install
pre-commit run --all-files

Tests

uv run maturin develop && uv run pytest -v # Python tests
cargo test # Rust tests

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

chronopt-0.2.0.tar.gz (84.7 kB view details)

Uploaded Source

Built Distributions

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

chronopt-0.2.0-cp314-cp314-win_amd64.whl (2.8 MB view details)

Uploaded CPython 3.14Windows x86-64

chronopt-0.2.0-cp314-cp314-manylinux_2_39_x86_64.whl (38.8 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.39+ x86-64

chronopt-0.2.0-cp314-cp314-macosx_11_0_arm64.whl (37.4 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

chronopt-0.2.0-cp314-cp314-macosx_10_12_x86_64.whl (39.0 MB view details)

Uploaded CPython 3.14macOS 10.12+ x86-64

chronopt-0.2.0-cp313-cp313-win_amd64.whl (2.8 MB view details)

Uploaded CPython 3.13Windows x86-64

chronopt-0.2.0-cp313-cp313-manylinux_2_39_x86_64.whl (38.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.39+ x86-64

chronopt-0.2.0-cp313-cp313-macosx_11_0_arm64.whl (37.4 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

chronopt-0.2.0-cp313-cp313-macosx_10_12_x86_64.whl (39.0 MB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

chronopt-0.2.0-cp312-cp312-win_amd64.whl (2.8 MB view details)

Uploaded CPython 3.12Windows x86-64

chronopt-0.2.0-cp312-cp312-manylinux_2_39_x86_64.whl (38.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.39+ x86-64

chronopt-0.2.0-cp312-cp312-macosx_11_0_arm64.whl (37.4 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

chronopt-0.2.0-cp312-cp312-macosx_10_12_x86_64.whl (39.0 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

chronopt-0.2.0-cp311-cp311-win_amd64.whl (2.8 MB view details)

Uploaded CPython 3.11Windows x86-64

chronopt-0.2.0-cp311-cp311-manylinux_2_39_x86_64.whl (38.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.39+ x86-64

chronopt-0.2.0-cp311-cp311-macosx_11_0_arm64.whl (37.4 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

chronopt-0.2.0-cp311-cp311-macosx_10_12_x86_64.whl (39.1 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

File details

Details for the file chronopt-0.2.0.tar.gz.

File metadata

  • Download URL: chronopt-0.2.0.tar.gz
  • Upload date:
  • Size: 84.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for chronopt-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3035fbb4a1f3e9ae3b04e54b10b8965d5d65d9b2f7b8b1fb81724b27925ef72b
MD5 5d16e35533951264d32d78b8a4503486
BLAKE2b-256 be5a470a1f6f465d763f0a49cadcb219119e4d27a64649eadc3f0cc10d034b38

See more details on using hashes here.

Provenance

The following attestation bundles were made for chronopt-0.2.0.tar.gz:

Publisher: release.yml on BradyPlanden/chronopt

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

File details

Details for the file chronopt-0.2.0-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: chronopt-0.2.0-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for chronopt-0.2.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 ae2e9920b1cdb1d88728f0558302407c954e6eb76539edd1ed8166905674565f
MD5 0f4080a1f3d6c1062acef94daddbd7a7
BLAKE2b-256 4d96c1e188b90acc9fdffb550a266f383657c9ecde8c42ffd610af7e5e760194

See more details on using hashes here.

Provenance

The following attestation bundles were made for chronopt-0.2.0-cp314-cp314-win_amd64.whl:

Publisher: release.yml on BradyPlanden/chronopt

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

File details

Details for the file chronopt-0.2.0-cp314-cp314-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for chronopt-0.2.0-cp314-cp314-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 a97012fd6a22891fae56e4f63e889ac42b24b244df1c7a747552b3c44b7f8fbd
MD5 3a07d39042877aaea1629969f077fce4
BLAKE2b-256 3aa5332b9e73bfa46e2519187c86e79ab23b873d31c3fb8d72531b15f167d6a9

See more details on using hashes here.

Provenance

The following attestation bundles were made for chronopt-0.2.0-cp314-cp314-manylinux_2_39_x86_64.whl:

Publisher: release.yml on BradyPlanden/chronopt

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

File details

Details for the file chronopt-0.2.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chronopt-0.2.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d66e0770efe9494a4ba0676c8ed6898327cbe22ffec237d0565cc1d3e7346b9b
MD5 a0f2c29529273020b2e821464a349956
BLAKE2b-256 e1f7be481c7ee0355a53ee5fd237c287c8c9b5dd924c7c51ebc371a1620bed9d

See more details on using hashes here.

Provenance

The following attestation bundles were made for chronopt-0.2.0-cp314-cp314-macosx_11_0_arm64.whl:

Publisher: release.yml on BradyPlanden/chronopt

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

File details

Details for the file chronopt-0.2.0-cp314-cp314-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for chronopt-0.2.0-cp314-cp314-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ef212901537800f93302edd27c21fc2e0f54d3b4c3a1c6c7d27d551844d84229
MD5 eeed2d801ff5ac6da5ed5e0d5dae9707
BLAKE2b-256 a17eec3fc0b20fc1aaeb143e179996874e398199fed1e85ba971af8c98f721f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for chronopt-0.2.0-cp314-cp314-macosx_10_12_x86_64.whl:

Publisher: release.yml on BradyPlanden/chronopt

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

File details

Details for the file chronopt-0.2.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: chronopt-0.2.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for chronopt-0.2.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 76e3441d80fc205543bf4ffc8aa6cb3a8faecd2ad4cd832d868c8dd01082a167
MD5 d85e55d0b4196f71f81d521553a2b11c
BLAKE2b-256 dd5b12cec78be3cf6aed2011df9d2a190c02ac6d3e54620a35118290587074b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for chronopt-0.2.0-cp313-cp313-win_amd64.whl:

Publisher: release.yml on BradyPlanden/chronopt

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

File details

Details for the file chronopt-0.2.0-cp313-cp313-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for chronopt-0.2.0-cp313-cp313-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 7a060417e8e10533c4b55ad8110d8a0256ad64860732b751db549f67ccedef29
MD5 1035f4d2e85fc4b3ca2edb84572d66ef
BLAKE2b-256 71aaadf5e877a0b132a6aaee29e588561d6fa46cd07da940d83a3b9917cc60b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for chronopt-0.2.0-cp313-cp313-manylinux_2_39_x86_64.whl:

Publisher: release.yml on BradyPlanden/chronopt

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

File details

Details for the file chronopt-0.2.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chronopt-0.2.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 956e83f132fb30866ed06fdc2b7448c67a874177f50a8b569df2d5e636d00c24
MD5 f67fa8263504128b8ffd26f50735cab1
BLAKE2b-256 ff8abeb5ee124c2332dd4f02a36fe3849d31f2eece85cac1315e5a23a6bc0bb7

See more details on using hashes here.

Provenance

The following attestation bundles were made for chronopt-0.2.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: release.yml on BradyPlanden/chronopt

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

File details

Details for the file chronopt-0.2.0-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for chronopt-0.2.0-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 012b10d4cc69122f115dda8beb987b4b2c5cf9bf9f7a8af976be1fed06364c5c
MD5 33aa47f7a5833826d10a284f7da87ff3
BLAKE2b-256 17c4e3bcce316a41d06b0f22777cf4e832dbe16a48ae307422d034ba30264936

See more details on using hashes here.

Provenance

The following attestation bundles were made for chronopt-0.2.0-cp313-cp313-macosx_10_12_x86_64.whl:

Publisher: release.yml on BradyPlanden/chronopt

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

File details

Details for the file chronopt-0.2.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: chronopt-0.2.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for chronopt-0.2.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 0cae557c56974146b06d30d9515780ffbc1713c90cfa18965f5ca9a2f4749201
MD5 e8104a93b8fddc5ed5c1c0047170fff2
BLAKE2b-256 3717be7a27df990fc936a7f30ccfc51109aa20e3a960d0e8106fe89f8628114e

See more details on using hashes here.

Provenance

The following attestation bundles were made for chronopt-0.2.0-cp312-cp312-win_amd64.whl:

Publisher: release.yml on BradyPlanden/chronopt

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

File details

Details for the file chronopt-0.2.0-cp312-cp312-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for chronopt-0.2.0-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 2b1e696bd0fecbfbe649d78d4d5330a63ea6d874a2b980723b9ec7aebc04bdfa
MD5 fd6639a375cd39b68eeb4d4f1ad608b7
BLAKE2b-256 59f3cf80902e6ee3e78c44a747c8baa35e1860b5638746ce378bce0c23f77c7c

See more details on using hashes here.

Provenance

The following attestation bundles were made for chronopt-0.2.0-cp312-cp312-manylinux_2_39_x86_64.whl:

Publisher: release.yml on BradyPlanden/chronopt

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

File details

Details for the file chronopt-0.2.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chronopt-0.2.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 eb6963364fa7fdf8ce2ca9217cd5f0422deaa35315e05a3a9e748cf71896860a
MD5 645240b5fdb813498ca1e4f6e6c18835
BLAKE2b-256 619e92c64d3b749d8ce4f9397a6f8aa44363e59601f363b79ff78ffa0f29a38e

See more details on using hashes here.

Provenance

The following attestation bundles were made for chronopt-0.2.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: release.yml on BradyPlanden/chronopt

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

File details

Details for the file chronopt-0.2.0-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for chronopt-0.2.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 81e381ec9323151a65e25167f6f5ccd462b55dd7957385f9a2207412c64bc239
MD5 9e257dda1f20ec6005839f87369b6630
BLAKE2b-256 49aca9a6f644330a4f181df079bd3d6ccffbcfb0716377821780725124a30dfb

See more details on using hashes here.

Provenance

The following attestation bundles were made for chronopt-0.2.0-cp312-cp312-macosx_10_12_x86_64.whl:

Publisher: release.yml on BradyPlanden/chronopt

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

File details

Details for the file chronopt-0.2.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: chronopt-0.2.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for chronopt-0.2.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 df79757d8149ce21b939bed1cd9cb99e54fa9db1d7bd1420b2c054b6054ea8cb
MD5 ca0202798756320fe8b5aec1901f484f
BLAKE2b-256 f46a721d2842fc69766d34a9c3d27def36062739b9f8374e0bf47d65992120a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for chronopt-0.2.0-cp311-cp311-win_amd64.whl:

Publisher: release.yml on BradyPlanden/chronopt

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

File details

Details for the file chronopt-0.2.0-cp311-cp311-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for chronopt-0.2.0-cp311-cp311-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 954c36417c3ae24dd1f73905e2038174e55683ff904ccc8584b5e3b45e3ca12d
MD5 fabcc1a4579376b879023055cd7767d0
BLAKE2b-256 416a3c824c5b2b984248870923a9612791ac53ee1fa661fe4f5de45ecdeee0aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for chronopt-0.2.0-cp311-cp311-manylinux_2_39_x86_64.whl:

Publisher: release.yml on BradyPlanden/chronopt

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

File details

Details for the file chronopt-0.2.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chronopt-0.2.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 220b60a9c304ca756d351f7d78295252c51e6aa0ff0ca7e90046b56c4b107d2a
MD5 8c617d28876b39d3e56b9f51d08f15b6
BLAKE2b-256 b14227c980789a1cca350ebaac9445bcc227d13b19f1c11f88beaad213765de5

See more details on using hashes here.

Provenance

The following attestation bundles were made for chronopt-0.2.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: release.yml on BradyPlanden/chronopt

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

File details

Details for the file chronopt-0.2.0-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for chronopt-0.2.0-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 39f03a34c9fe3c3339b6275040e1795c85a01c9603b38b1b0c73f928b90e4221
MD5 28518daecfb387cfaae620961de0469c
BLAKE2b-256 24c046990a12924166b9352aa17295765730aa99e8e2764cc834628cda97f768

See more details on using hashes here.

Provenance

The following attestation bundles were made for chronopt-0.2.0-cp311-cp311-macosx_10_12_x86_64.whl:

Publisher: release.yml on BradyPlanden/chronopt

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