Python optimization engine for FEBio
Project description
pyfebiopt
pyFEBiOpt wraps the FEBio solver with a more flexible toolbox. FEBio ships with optimisation hooks, but they are intentionally narrow; this library delivers extremely flexible inverse optimisation, multi-objective workflows, and extensible, parallel computation that slot cleanly into existing FEBio projects.
Highlights
- Inverse optimisation engine with reparameterisation, clean logging, monitoring, Jacobian helpers, FEB template bindings, and configurable runners/storage. Build parameter grids, run multiple cases, and keep artefacts organised with automatic cleanup/persistence policies.
- Post-processing via a fast binary
.xpltreader with sliceable views for nodes, elements, faces, and regions (no copies until needed). - Visualisation utilities built on
pyvistafor quick mesh/result plotting. - Extensible design: adapters for experiment data, telemetry hooks, series export, and structured configuration dataclasses to keep projects reproducible. Plug in your own experiment loaders or monitoring sinks without changing the engine.
Roadmap
- Extensively document the API (usage, configuration, and extension points).
- Add more examples for the
.xpltmodule, visualisation, and optimisation workflows. - Expand monitoring UI (history pagination, richer iteration drill-down, export).
- Strengthen test coverage and benchmarks across optimisation and I/O paths.
- Harden packaging/release automation (semantic-release, CI/CD, PyPI publishing).
- Add CI matrices for multiple Python versions and check FEBio compatibility against the latest stable releases.
Project Info
- Source: https://gitlab.com/autrera-group/pyfebiopt/
- Issues: https://gitlab.com/autrera-group/pyfebiopt/-/issues
- License: MIT (see
LICENSE)
Quickstart
Tested on Ubuntu LTS (latest). Other platforms are untested.
- Install (from repo root):
Or install the published package:pip install .
Or clone and use a virtual env:pip install pyfebioptgit clone https://gitlab.com/autrera-group/pyfebiopt.git cd pyfebiopt python -m venv .venv && source .venv/bin/activate # or conda create -n pyfebiopt python=3.11 pip install -e ".[dev]" - Run a simple example:
This will execute a basic optimisation and log progress. Adjust the example input paths to point at your FEBio files if needed.python examples/simple_biaxial_fit.py - Launch the monitoring UI (optional):
Follow the printed URL to view live runs; the UI lists active runs, cost per iteration, series plots, and system metrics.pyfebiopt-monitor - (Optional) Install the monitor as a service via the helper CLI:
Flags:# run ad-hoc with overrides pyfebiopt-monitorctl run --host 0.0.0.0 --port 8765 --registry /tmp/pyfebiopt-registry.json --socket /tmp/pyfebiopt.sock # install user-level systemd service (default host/port 127.0.0.1:8765) pyfebiopt-monitorctl install # install system-wide (needs sudo) with custom host/port sudo pyfebiopt-monitorctl install --system --host 0.0.0.0 --port 8000 --force # uninstall pyfebiopt-monitorctl uninstall # user sudo pyfebiopt-monitorctl uninstall --system--host,--port: bind address/port for the web UI.--registry: path to the run registry JSON.--socket: path to the event socket used by workers. Exposing the monitor publicly is your responsibility—use VPN/reverse proxy if needed.
Contributing
See CONTRIBUTING.md for coding standards, CI details, and hook setup tips.
Support
Open an issue at https://gitlab.com/autrera-group/pyfebiopt/-/issues with details about your environment, FEBio version, Python version, and minimal reproduction steps. Questions, bug reports, and feature requests are welcome.
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 pyfebiopt-0.1.0.tar.gz.
File metadata
- Download URL: pyfebiopt-0.1.0.tar.gz
- Upload date:
- Size: 96.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
833f762c6a01396369fa82308130cca124cbbc926d14b79e24e773868a91686b
|
|
| MD5 |
028486c1320fafe24f46c57ead9d4810
|
|
| BLAKE2b-256 |
1bafe549bcf4d8255b1f2be40feaf3620ae7fbdd284822b8cf2583a23cc0843e
|
File details
Details for the file pyfebiopt-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyfebiopt-0.1.0-py3-none-any.whl
- Upload date:
- Size: 112.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cdd6ba471e8f5f2b4ad756f80fc8048129219b94f543801dfa28a8ec8c7adb19
|
|
| MD5 |
e7487d2370575c2c4b502b0aed91ceaa
|
|
| BLAKE2b-256 |
978d14d278f65679a1dbe1802bfee9b945c397ac05b4bf830b1de3fb40494fa6
|