Skip to main content

Shared general-purpose research utilities (tensor/module batching, linear algebra, ARE/ODE solvers, labeled arrays, plotting) used across multiple projects.

Project description

ecliseutils

Shared general-purpose research utilities used across multiple projects (e.g. KF_RNN, event_camera). This package is the single source of truth for code that previously lived as diverged copies inside each project's infrastructure/utils.py.

What's here

Module Contents
settings configure(device, dtype, precision, seed, debug), default_dtype, safe-global registration. No hardcoded paths; no import-time torch mutation.
types ModelPair = tuple[nn.Module, TensorDict] and shared aliases.
labeled_array LabeledArray / LabeledDataset (in-house replacement for dimarray).
modules Module/tensor/TensorDict batching: stack_module_arr, run_module_arr, multi_vmap, td_items, ...
arrays NumPy object-array comprehensions: multi_map, multi_zip, broadcast_dim_arrays, ...
linalg pow_series, batch_trace, kl_div, sqrtm, hadamard_conjugation*, inverse, eig_some, ...
are solve_discrete_are (torch Schur) and solve_continuous_are (scipy ordqz fallback) + residual tests.
ode batch_odeint, linspace, geomspace (lazy torchdiffeq).
ensemble EnsembleModule chunked vmap wrapper.
fast_conv_scan conv_scan exponential cumulative scan autograd op.
recursive Dotted-path rgetattr / rsetattr / rgetitem / rsetitem.
dicts flatten_nested_dict, map_dict, nested_type, call_func_with_kwargs.
io torch_load, empty_cache, reset_seed, model_size.
memory get_tensors_in_memory, track_tensor_diff, ...
timing Timer, print_disabled, print_enabled, track_calls.
plotting color, confidence_ellipse.

Install

From PyPI (once published):

pip install ecliseutils
# with ODE support:
pip install "ecliseutils[ode]"

From GitHub (works on any device, no clone needed):

pip install "git+https://github.com/JophiArcana/ecliseutils.git"
# pin to a release:
pip install "git+https://github.com/JophiArcana/ecliseutils.git@v0.1.0"
# with ODE support:
pip install "ecliseutils[ode] @ git+https://github.com/JophiArcana/ecliseutils.git"

Editable (for local development):

pip install -e /path/to/ecliseutils
# with ODE support:
pip install -e "/path/to/ecliseutils[ode]"

Usage

import torch
import ecliseutils as eu

# Configure once at startup (typically from your project's settings module).
eu.configure(device="cpu", dtype=torch.float64, precision=8, seed=1212)

P = eu.solve_discrete_are(A, B, Q, R)

torchdiffeq is only required if you call ecliseutils.ode.batch_odeint; it is imported lazily.

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

ecliseutils-0.1.1.tar.gz (30.0 kB view details)

Uploaded Source

Built Distribution

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

ecliseutils-0.1.1-py3-none-any.whl (30.9 kB view details)

Uploaded Python 3

File details

Details for the file ecliseutils-0.1.1.tar.gz.

File metadata

  • Download URL: ecliseutils-0.1.1.tar.gz
  • Upload date:
  • Size: 30.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for ecliseutils-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a27df721bf2e62b527d59caac4410033816171f609c7f8d21c3e6f404996c7b7
MD5 7f4b165188cd44f35518440bc2c13152
BLAKE2b-256 d02f4eb65d4cc6067dafa215970dfaf44895311159ef18c7ce2e8a1043df5b66

See more details on using hashes here.

File details

Details for the file ecliseutils-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ecliseutils-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 30.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for ecliseutils-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9cfb7af9ef87b39ac3aacacb921e14c028a9bb96b339c101af806f48926eb4dc
MD5 cb36cdf0f216fc85973a022e5aacaa0f
BLAKE2b-256 8ef74f4d47b11662feb117e4703331bb456d23e05a67225d63c29f64e9f66427

See more details on using hashes here.

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