beobench

A toolkit providing easy and unified access to building control environments for reinforcement learning (RL). No longer actively maintained.

https://github.com/rdnfn/beobench

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 5 DOI reference(s) in README
  • Academic publication links
    Links to: acm.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.0%) to scientific vocabulary

Keywords

building-control building-energy-optimization reinforcement-learning reinforcement-learning-environments
Last synced: 6 months ago · JSON representation ·

Repository

A toolkit providing easy and unified access to building control environments for reinforcement learning (RL). No longer actively maintained.

Basic Info
Statistics
  • Stars: 41
  • Watchers: 2
  • Forks: 4
  • Open Issues: 16
  • Releases: 14
Topics
building-control building-energy-optimization reinforcement-learning reinforcement-learning-environments
Created over 4 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog Contributing License Citation Support Authors

README.rst

.. raw:: html

   

.. image:: https://github.com/rdnfn/beobench/raw/0c520a7acd992fef2901c0b576fb948e061e2e1a/docs/_static/beobench_logo_v2_large.png :align: center :width: 400 px :alt: Beobench .. raw:: html

**⚠️ Warning:** *Beobench is no longer actively maintained. I recommend using the integrated building simulation tools directly without Beobench.* .. start-in-sphinx-docs .. image:: https://img.shields.io/pypi/v/beobench.svg :target: https://pypi.python.org/pypi/beobench .. image:: https://readthedocs.org/projects/beobench/badge/?version=latest :target: https://beobench.readthedocs.io/en/latest/?version=latest :alt: Documentation Status .. image:: https://img.shields.io/badge/License-MIT-blue.svg :target: https://opensource.org/licenses/MIT :alt: License A toolkit providing easy and unified access to building control environments for reinforcement learning (RL). Compared to other domains, `RL environments for building control `_ tend to be more difficult to install and handle. Most environments require the user to either manually install a building simulator (e.g. `EnergyPlus `_) or to manually manage Docker containers. This can be tedious. Beobench was created to make building control environments easier to use and experiments more reproducible. Beobench uses Docker to manage all environment dependencies in the background so that the user doesn't have to. A standardised API, illustrated in the figure below, allows the user to easily configure experiments and evaluate new RL agents on building control environments. .. raw:: html

.. image:: https://github.com/rdnfn/beobench/raw/0c520a7acd992fef2901c0b576fb948e061e2e1a/docs/_static/beobench_architecture_horizontal_v1.png :align: center :width: 550 px :alt: Beobench .. raw:: html

Features ======== - **Large collection of building control environments:** Out-of-the-box Beobench provides access to environments from `BOPTEST `_, `Energym `_, and `Sinergym `_. Beobench combines the environments from these frameworks into the *(to the best of our knowledge)* largest single collection of building control environments. `See environment list here `_. - **Clean and light-weight installation:** Beobench is installed via pip and only requires Docker as an additional non-python dependency (`see installation guide `_). Without Beobench, most building control environments will require manually installing building simulators or directly managing docker containers. - **Built-in RL agents:** Beobench allows the user to apply any agent from the `Ray RLlib collection `_ *in addition* to agents provided by the user directly. - **Easily extendable:** want to use Beobench with an environment not yet included? The support for user-defined Docker contexts makes it easy to use Beobench with any RL environment. .. end-in-sphinx-docs .. _sec_quickstart: Quickstart ========== .. start-qs-sec1 .. _sec_installation: Installation ------------ 1. `Install docker `_ on your machine (if on Linux, check the `additional installation steps `_) 2. Install Beobench using: .. code-block:: console pip install beobench .. end-qs-sec1 .. **Warning**: **OS support** - **Linux:** recommended and tested (Ubuntu 20.04). - **Windows:** only use via `Windows Subsystem for Linux (WSL) `_ recommended. - **macOS:** experimental support for Apple silicon systems — only intended for development purposes (not running experiments). Intel-based macOS support untested. .. start-qs-sec2 Running a first experiment -------------------------- Experiment configuration ^^^^^^^^^^^^^^^^^^^^^^^^ To get started with our first experiment, we set up an *experiment configuration*. Experiment configurations can be given as a yaml file or a Python dictionary. The configuration fully defines an experiment, configuring everything from the RL agent to the environment and its wrappers. The figure below illustrates the config structure. .. raw:: html

.. image:: https://github.com/rdnfn/beobench/raw/2cf961a8135b25c9a66e70d67eea9890ce0b878a/docs/_static/beobench_config_v1.png :align: center :width: 350 px :alt: Beobench .. raw:: html

Let's look at a concrete example. Consider this ``config.yaml`` file: .. code-block:: yaml agent: # script to run inside experiment container origin: ./agent.py # configuration that can be accessed by script above config: num_steps: 100 env: # gym framework from which we want use an environment gym: sinergym # gym-specific environment configuration config: # sinergym environment name name: Eplus-5Zone-hot-continuous-v1 wrappers: [] # no wrappers added for this example general: # save experiment data to ``./beobench_results`` directory local_dir: ./beobench_results Agent script ^^^^^^^^^^^^ The ``agent.origin`` setting in the configuration file above sets the *agent script* to be ``./agent.py``. The *agent script* is the main code that is run inside the experiment container. Most of the time this script will define an RL agent but it could really be anything. Simply put, we can think of Beobench as a tool to (1) build a special Docker container and then (2) execute an *agent script* inside that container. Let's create an example *agent script*, ``agent.py``: .. code-block:: python from beobench.experiment.provider import create_env, config # create environment and get starting observation env = create_env() observation = env.reset() for _ in range(config["agent"]["config"]["num_steps"]): # sample random action from environment's action space action = env.action_space.sample() # take selected action in environment observation, reward, done, info = env.step(action) env.close() The only Beobench-specific part of this script is the first line: we import the ``create_env`` function and the ``config`` dictionary from ``beobench.experiment.provider``. The ``create_env`` function allows us to create the environment as definded in our configuration. The ``config`` dictionary gives us access to the full experiment configuration (as defined before). These two imports are only available inside an experiment container. .. end-qs-sec2 .. **Note** We can use these two imports *regardless* of the gym framework we are using. This invariability allows us to create agent scripts that work across frameworks. .. start-qs-sec3 After these Beobench imports, the ``agent.py`` script above just takes a few random actions in the environment. Feel free to customize the agent script to your requirements. Alternatively, there are also a number of pre-defined agent scripts available, including a script for using RLlib. Execution ^^^^^^^^^ .. end-qs-sec3 Given the configuration and agent script above, we can run the experiment either via the command line: .. code-block:: console beobench run --config config.yaml or in Python: .. code-block:: python import beobench beobench.run(config = "config.yaml") .. start-qs-sec4 Either command will: 1. Build an experiment container with Sinergym installed. 2. Execute ``agent.py`` inside that container. You have just run your first Beobench experiment. Next steps ^^^^^^^^^^ To learn more about using Beobench, look at the `advanced usage section `_ in the documentation. .. end-qs-sec4 Documentation ============= https://beobench.readthedocs.io .. _sec_envs: Available environments ====================== .. csv-table:: :header-rows: 1 :widths: auto Gym,Environment,Type*,Description *BOPTEST*,``bestest_air``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/home.svg,"`original `_, `beobench `_" ,``bestest_hydronic``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/home.svg,"`original `_, `beobench `_" ,``bestest_hydronic_heat_pump``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/home.svg,"`original `_, `beobench `_" ,``multizone_residential_hydronic``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/home.svg,"`original `_, `beobench `_" ,``singlezone_commercial_hydronic``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/building-skyscraper.svg,"`original `_, `beobench `_" *Energym*,``Apartments2Thermal-v0``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/home.svg,"`original `_, `beobench `_" ,``Apartments2Grid-v0``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/home.svg,"`original `_, `beobench `_" ,``ApartmentsThermal-v0``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/home.svg,"`original `_, `beobench `_" ,``ApartmentsGrid-v0``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/home.svg,"`original `_, `beobench `_" ,``OfficesThermostat-v0``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/building-skyscraper.svg,"`original `_, `beobench `_" ,``MixedUseFanFCU-v0``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/building-skyscraper.svg,"`original `_, `beobench `_" ,``SeminarcenterThermostat-v0``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/building-skyscraper.svg,"`original `_, `beobench `_" ,``SeminarcenterFull-v0``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/building-skyscraper.svg,"`original `_, `beobench `_" ,``SimpleHouseRad-v0``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/home.svg,"`original `_, `beobench `_" ,``SimpleHouseRSla-v0``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/home.svg,"`original `_, `beobench `_" ,``SwissHouseRSlaW2W-v0``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/home.svg,"`original `_, `beobench `_" ,``SwissHouseRSlaA2W-v0``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/home.svg,"`original `_, `beobench `_" ,``SwissHouseRSlaTank-v0``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/home.svg,"`original `_, `beobench `_" ,``SwissHouseRSlaTankDhw-v0``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/home.svg,"`original `_, `beobench `_" *Sinergym*,``Eplus-demo-v1``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/home.svg,"`original `_, `beobench `_" ,``Eplus-5Zone-hot-discrete-v1``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/home.svg,"`original `_, `beobench `_" ,``Eplus-5Zone-mixed-discrete-v1``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/home.svg,"`original `_, `beobench `_" ,``Eplus-5Zone-cool-discrete-v1``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/home.svg,"`original `_, `beobench `_" ,``Eplus-5Zone-hot-continuous-v1``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/home.svg,"`original `_, `beobench `_" ,``Eplus-5Zone-mixed-continuous-v1``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/home.svg,"`original `_, `beobench `_" ,``Eplus-5Zone-cool-continuous-v1``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/home.svg,"`original `_, `beobench `_" ,``Eplus-5Zone-hot-discrete-stochastic-v1``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/home.svg,"`original `_, `beobench `_" ,``Eplus-5Zone-mixed-discrete-stochastic-v1``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/home.svg,"`original `_, `beobench `_" ,``Eplus-5Zone-cool-discrete-stochastic-v1``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/home.svg,"`original `_, `beobench `_" ,``Eplus-5Zone-hot-continuous-stochastic-v1``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/home.svg,"`original `_, `beobench `_" ,``Eplus-5Zone-mixed-continuous-stochastic-v1``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/home.svg,"`original `_, `beobench `_" ,``Eplus-5Zone-cool-continuous-stochastic-v1``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/home.svg,"`original `_, `beobench `_" ,``Eplus-datacenter-discrete-v1``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/building-factory.svg,"`original `_, `beobench `_" ,``Eplus-datacenter-continuous-v1``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/building-factory.svg,"`original `_, `beobench `_" ,``Eplus-datacenter-discrete-stochastic-v1``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/building-factory.svg,"`original `_, `beobench `_" ,``Eplus-datacenter-continuous-stochastic-v1``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/building-factory.svg,"`original `_, `beobench `_" ,``Eplus-IWMullion-discrete-v1``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/building-skyscraper.svg,"`original `_, `beobench `_" ,``Eplus-IWMullion-continuous-v1``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/building-skyscraper.svg,"`original `_, `beobench `_" ,``Eplus-IWMullion-discrete-stochastic-v1``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/building-skyscraper.svg,"`original `_, `beobench `_" ,``Eplus-IWMullion-continuous-stochastic-v1``,.. image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/building-skyscraper.svg,"`original `_, `beobench `_" \* Types of environments: * residential |home| * office |office| * data center |industry| .. |office| image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/building-skyscraper.svg .. |home| image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/home.svg .. |industry| image:: https://raw.githubusercontent.com/tabler/tabler-icons/master/icons/building-factory.svg Support ======= Need help using Beobench or want to discuss the toolkit? Reach out via ``contact-gh (at) arduin.io`` and we are very happy to help either via email or in a call. Citation ======== If you find Beobench helpful in your work, please consider citing the `accompanying paper `_: .. code-block:: @inproceedings{10.1145/3538637.3538866, author = {Findeis, Arduin and Kazhamiaka, Fiodar and Jeen, Scott and Keshav, Srinivasan}, title = {Beobench: A Toolkit for Unified Access to Building Simulations for Reinforcement Learning}, year = {2022}, isbn = {9781450393973}, publisher = {Association for Computing Machinery}, address = {New York, NY, USA}, url = {https://doi.org/10.1145/3538637.3538866}, doi = {10.1145/3538637.3538866}, booktitle = {Proceedings of the Thirteenth ACM International Conference on Future Energy Systems}, pages = {374–382}, numpages = {9}, keywords = {reinforcement learning, building energy optimisation, building simulation, building control}, location = {Virtual Event}, series = {e-Energy '22} } License ======= MIT license, see `credits and license page in docs `_ for more detailed information.

Owner

  • Name: Arduin
  • Login: rdnfn
  • Kind: user
  • Company: University of Cambridge

PhD student | reinforcement learning & building control

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: >-
  Beobench: A Toolkit for Unified Access to Building
  Simulations for Reinforcement Learning
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
version: 0.5.4
url: https://github.com/rdnfn/beobench
authors:
  - given-names: Arduin
    family-names: Findeis
  - given-names: Fiodar
    family-names: Kazhamiaka
  - given-names: Scott
    family-names: Jeen
  - given-names: Srinivasan
    family-names: Keshav
preferred-citation:
  authors:
    - given-names: Arduin
      family-names: Findeis
    - given-names: Fiodar
      family-names: Kazhamiaka
    - given-names: Scott
      family-names: Jeen
    - given-names: Srinivasan
      family-names: Keshav
  title: >-
    Beobench: A Toolkit for Unified Access to Building
    Simulations for Reinforcement Learning
  type: conference-paper
  year: 2021
  start: 374
  end: 382
  collection-title: Proceedings of the Thirteenth ACM International Conference on Future Energy Systems
  doi: 10.1145/3538637.3538866
  conference:
    name: e-Energy '22
    location: Virtual Event

GitHub Events

Total
  • Watch event: 5
  • Push event: 2
  • Pull request event: 4
  • Create event: 2
Last Year
  • Watch event: 5
  • Push event: 2
  • Pull request event: 4
  • Create event: 2

Committers

Last synced: about 2 years ago

All Time
  • Total Commits: 843
  • Total Committers: 1
  • Avg Commits per committer: 843.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 34
  • Committers: 1
  • Avg Commits per committer: 34.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
rdnfn 7****n 843

Issues and Pull Requests

Last synced: 8 months ago

All Time
  • Total issues: 73
  • Total pull requests: 30
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 10 days
  • Total issue authors: 7
  • Total pull request authors: 2
  • Average comments per issue: 1.14
  • Average comments per pull request: 0.17
  • Merged pull requests: 29
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: less than a minute
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • rdnfn (63)
  • XkunW (3)
  • david-woelfle (2)
  • HYDesmondLiu (2)
  • kad99kev (1)
  • superkaiba (1)
  • enjeeneer (1)
Pull Request Authors
  • rdnfn (32)
  • david-woelfle (1)
Top Labels
Issue Labels
enhancement (34) concerns: main API (17) concerns: documentation (16) bug (15) concerns: integrations (12) beobench_contrib (10) concerns: agents (6) priority: later (5) concerns: infrastructure (5) concerns: packaging (2) wontfix (1) concerns: visualisation (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 71 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 14
  • Total maintainers: 1
pypi.org: beobench

Beobench is a toolkit providing easy and unified access to building control environments for reinforcement learning (RL).

  • Versions: 14
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 71 Last month
Rankings
Dependent packages count: 10.1%
Stargazers count: 11.0%
Average: 16.3%
Forks count: 16.8%
Dependent repos count: 21.6%
Downloads: 21.8%
Maintainers (1)
Last synced: 7 months ago

Dependencies

requirements/dev_requirements.txt pypi
  • Sphinx *
  • black *
  • build *
  • bump2version *
  • click *
  • coverage *
  • doc8 *
  • flake8 *
  • jupyterlab *
  • pip *
  • pre-commit *
  • pylint *
  • rstcheck *
  • tox *
  • twine *
  • watchdog *
  • wheel *
requirements/doc_requirements.txt pypi
  • Jinja2 <3.1
  • docutils ==0.16
  • sphinx-autodoc-typehints *
  • sphinx-book-theme ==0.3.2
  • sphinx-tabs *
requirements/fixed_requirements_dev.txt pypi
  • Babel ==2.9.1
  • Jinja2 ==3.0.2
  • MarkupSafe ==2.0.1
  • PyYAML ==6.0
  • Pygments ==2.10.0
  • Sphinx ==4.2.0
  • alabaster ==0.7.12
  • backports.entry-points-selectable ==1.1.0
  • black ==21.9b0
  • bleach ==4.1.0
  • bump2version ==1.0.1
  • certifi ==2021.10.8
  • cfgv ==3.3.1
  • charset-normalizer ==2.0.7
  • click ==8.0.3
  • colorama ==0.4.4
  • coverage ==6.0.2
  • distlib ==0.3.3
  • docutils ==0.17.1
  • filelock ==3.3.1
  • flake8 ==4.0.1
  • identify ==2.3.1
  • idna ==3.3
  • imagesize ==1.2.0
  • importlib-metadata ==4.8.1
  • keyring ==23.2.1
  • mccabe ==0.6.1
  • mypy-extensions ==0.4.3
  • nodeenv ==1.6.0
  • packaging ==21.0
  • pathspec ==0.9.0
  • pkginfo ==1.7.1
  • platformdirs ==2.4.0
  • pluggy ==1.0.0
  • pre-commit ==2.15.0
  • py ==1.10.0
  • pycodestyle ==2.8.0
  • pyflakes ==2.4.0
  • pyparsing ==3.0.3
  • pytz ==2021.3
  • readme-renderer ==30.0
  • regex ==2021.10.23
  • requests ==2.26.0
  • requests-toolbelt ==0.9.1
  • rfc3986 ==1.5.0
  • six ==1.16.0
  • snowballstemmer ==2.1.0
  • sphinxcontrib-applehelp ==1.0.2
  • sphinxcontrib-devhelp ==1.0.2
  • sphinxcontrib-htmlhelp ==2.0.0
  • sphinxcontrib-jsmath ==1.0.1
  • sphinxcontrib-qthelp ==1.0.3
  • sphinxcontrib-serializinghtml ==1.1.5
  • toml ==0.10.2
  • tomli ==1.2.2
  • tox ==3.24.4
  • tqdm ==4.62.3
  • twine ==3.4.2
  • typing-extensions ==3.10.0.2
  • urllib3 ==1.26.7
  • virtualenv ==20.9.0
  • watchdog ==2.1.6
  • webencodings ==0.5.1
  • zipp ==3.6.0
.github/workflows/black.yaml actions
  • actions/checkout v3 composite
  • psf/black stable composite
.github/workflows/pylint.yaml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
.github/workflows/pypi.yaml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
  • pypa/gh-action-pypi-publish release/v1 composite
.github/workflows/tox.yaml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
.devcontainer/Dockerfile docker
  • mcr.microsoft.com/vscode/devcontainers/python 0-${VARIANT} build
pyproject.toml pypi
requirements/environment.yml pypi
setup.py pypi