Hestia's module to orchestrate the models.
Project description
Hestia Engine Orchestrator
Orchestrate your different models to run on a Cycle, an ImpactAssessment or a Site.
Install
- Install the library:
pip install hestia_earth.orchestrator
You can now install your own models or follow the steps below to use the default Hestia models.
Install the Hestia Models
If you want to use the hestia default models, follow these steps:
- Install the library:
pip install hestia_earth_models
- Install the config library:
pip install hestia_earth_config
Using your own models
You can create your own models in addition (or instead of) the default set of models provided by Hestia.
The model needs to expose only one method:
def run(key: str, data): ...
It will be given the data that has been given to the orchestrator, i.e. by calling:
from hestia_earth.orchestrator import run
my_data = {'@type': 'Cycle', 'inputs': []}
config = {
"models": [{
"key": "inputs",
"model": "my_model",
"value": "my_model_value",
"runStrategy": "add_if_missing_key"
}]
}
run(my_data, config)
Will be calling in your own model my_model.py:
def run('my_model_value', my_data: dict): ...
Usage
# will work with either Cycle or Site
from hestia_earth.orchestrator import run
from hestia_earth.config import load_config
# cycle is a JSONLD node cycle
cycle = {'@type': 'Cycle', ...}
result = run(cycle, load_config(cycle))
print(result)
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 hestia-earth-orchestrator-0.6.20.tar.gz.
File metadata
- Download URL: hestia-earth-orchestrator-0.6.20.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
385f944cb7322d86f2cc31df6fda7cc38e1e8d555fdd496665bfae71873f99f8
|
|
| MD5 |
0fa4902397c4bb6ee61e3c43776ed9f1
|
|
| BLAKE2b-256 |
9b8384698e752cedecdc547df7ce80ebb0eaf655497f773af979f2ed415fb8bf
|
File details
Details for the file hestia_earth_orchestrator-0.6.20-py3-none-any.whl.
File metadata
- Download URL: hestia_earth_orchestrator-0.6.20-py3-none-any.whl
- Upload date:
- Size: 24.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
985f072d4a684e669d84f060c6d758cb508264ec3b3de15e496a66aa925cb23c
|
|
| MD5 |
1db33dafcd7d3b466da95b9139de7b55
|
|
| BLAKE2b-256 |
fe36f769214b511ae1b3dbb1f75524a9a9440305f83c60d2454470dfb56d9914
|