https://github.com/bamresearch/parallel-abus
This code is a Python implementation of the parallelized adaptive Bayesian Updating with Structural reliabilty methods.
Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
✓DOI references
Found 3 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.4%) to scientific vocabulary
Repository
This code is a Python implementation of the parallelized adaptive Bayesian Updating with Structural reliabilty methods.
Basic Info
- Host: GitHub
- Owner: BAMresearch
- License: mit
- Language: Python
- Default Branch: main
- Size: 133 KB
Statistics
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
- Releases: 1
Metadata Files
README.md
Parallel aBUS
Table of Contents
Introduction
This code is a Python implementation of the parallelized adaptive Bayesian Updating with Structural reliabilty methods. The methods were described in:
Simon, P., Schneider, R., Baeßler, M., & Morgenthal, G. (2025). Parallelized adaptive Bayesian updating with structural reliability methods for inference of large engineering models. Advances in Structural Engineering, 13694332251346848. https://doi.org/10.1177/13694332251346848
It is based upon the original Python implementation of the original adaptive Bayesian Updating with Structural reliability methods with Subset Simulation (aBUS-SuS) by the Engineering Risk Analysis (ERA) Group of Technische Universität München.
Installation
The package is installable from the Python Package Index (PyPI) using pip:
console
pip install parallel-abus
Usage
Usage is exemplified in the corresponding GitHub project of this package.
Examples using this package are documented in the ./tests/ folder. The number of processes can be specified as a command line parameter, for example:
console
python ./tests/test_main_example_3_2DOF.py 5
runs inference with parallel aBUS on 5 processes.
A more comprehensive example is presented in ./example/bayesian_inference.py. Here, an engineering model of a reinforced concrete beam including an OpenSees finite element model is updated. Details on this example are found in this contribution:
Simon, P., Schneider, R., Baeßler, M., Morgenthal, G., 2024. A Bayesian probabilistic framework for building models for structural health monitoring of structures subject to environmental variability. (submitted for publication).
This example requires amongst others the python package for OpenSees.
An easy way to get this example running is to install its dependencies via Poetry:
console
poetry install
Logging
The parallel_abus library uses Python's standard logging module. By default, the library will not output any log messages unless you configure logging in your application.
Basic Usage
```python import logging import parallel_abus
Enable INFO level logging to see algorithm progress
logging.basicConfig(level=logging.INFO)
Or use the library's configuration helper
parallelabus.configurelogging(level=logging.INFO) ```
Controlling Library Logging
```python
Enable only WARNING and ERROR messages
parallelabus.configurelogging(level=logging.WARNING)
Disable all library logging
parallelabus.disablelogging()
Custom handler example
handler = logging.FileHandler('parallelabus.log') parallelabus.configure_logging(level=logging.DEBUG, handler=handler) ```
Module-Specific Logging Levels
You can set different logging levels for different modules within the library. There are two approaches depending on your needs:
Using Helper Functions (Recommended for Simple Cases)
Use configure_module_logging() when you want the same handler(s) with different levels:
```python import logging import parallel_abus
Set DEBUG level for aBUS_SuS modules, WARNING level for aCS modules
parallelabus.configuremodulelogging({ 'aBUSSuS': logging.DEBUG, 'aCS': logging.WARNING })
You can also use full logger names for fine-grained control
parallelabus.configuremodulelogging({ 'parallelabus.aBUSSuS.aBUSSuS': logging.DEBUG, 'parallelabus.aBUSSuS.aCSaBUS': logging.WARNING, 'parallelabus.aBUSSuS.aCSaBUS_parallel': logging.ERROR }) ```
Direct Logger Configuration (For Complex Cases)
Use direct configuration when you need different handlers per module:
```python import logging
Example: aBUS messages to console + file, aCS messages only to file
filehandler = logging.FileHandler('inference.log') consolehandler = logging.StreamHandler()
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') filehandler.setFormatter(formatter) consolehandler.setFormatter(formatter)
Configure aBUS modules (INFO level) - console + file output
abuslogger = logging.getLogger('parallelabus.aBUSSuS.aBUSSuS') abuslogger.handlers.clear() abuslogger.addHandler(consolehandler) # Show progress on console abuslogger.addHandler(filehandler) # Also save to file abuslogger.setLevel(logging.INFO) abus_logger.propagate = False
Configure aCS modules (DEBUG level) - file output only
acslogger = logging.getLogger('parallelabus.aBUSSuS.aCSaBUS') acslogger.handlers.clear() acslogger.addHandler(filehandler) # Only save to file acslogger.setLevel(logging.DEBUG) acs_logger.propagate = False ```
Choosing the Right Approach
Use helper functions (
configure_module_logging) when:- All modules use the same handler(s)
- You only need different logging levels
- You want convenient bulk configuration
Use direct configuration when:
- Different modules need different handlers
- You need granular control over handler behavior
- You have complex logging requirements
Log Levels
- DEBUG: Detailed algorithm state, parameter values, and intermediate results
- INFO: Key algorithm progress messages (default for examples)
- WARNING: Potential issues or numerical instabilities
- ERROR: Error conditions and exceptions
License
parallel-abus is distributed under the terms of the MIT license.
Owner
- Name: Bundesanstalt für Materialforschung und -prüfung
- Login: BAMresearch
- Kind: organization
- Email: oss@bam.de
- Location: Berlin/Germany
- Website: www.bam.de
- Repositories: 36
- Profile: https://github.com/BAMresearch
German Federal scientific research institute for materials testing and research
GitHub Events
Total
- Release event: 3
- Watch event: 1
- Push event: 2
- Create event: 4
Last Year
- Release event: 3
- Watch event: 1
- Push event: 2
- Create event: 4
Packages
- Total packages: 1
-
Total downloads:
- pypi 51 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 9
- Total maintainers: 1
pypi.org: parallel-abus
- Documentation: https://parallel-abus.readthedocs.io/
- License: MIT
-
Latest release: 0.2.1
published 12 months ago
Rankings
Maintainers (1)
Dependencies
- 126 dependencies
- jupyter ~1 develop
- mypy ^1.9.0 develop
- numpy >=1.22
- python >=3.8
- scipy >=1.6
- matplotlib >=3.4 test
- openseespy 3.5.1.3 test
- pandas ~2 test
- pytest 8.0 test