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.0.tar.gz (28.7 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.0-py3-none-any.whl (29.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ecliseutils-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3b8d7caac5a1ac70615370a6eac6b72e916e6007acb57d705b9ade6caba464c7
MD5 a8605b45dd5f20dde87d6a76cb6ea376
BLAKE2b-256 d280d226d93939ac1dd44fa167e39ed3d62233ddc79916c654e65229f860dc3c

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for ecliseutils-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 06482d857d342769c471d2789f40896198e6ed1046ac2f479ed7febb0039a2c2
MD5 bb79860313324988e329b381f03e6973
BLAKE2b-256 800cf6fbbe85fa152272939e321f29bcc954e3854a1f71ab2170ef961c3eac38

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