Meta Indicators
- class ixmp4.core.meta.PlatformRunMetaFacade(backend: Backend)
Used to query run meta indicators on a platform.
- tabulate(**kwargs: Unpack[FacadeRunMetaEntryFilter]) DataFrame
Tabulates metadata entries by specified criteria.
df = platform.meta.tabulate( run={ "default_only": False, "model": {"name": "Model"}, } ) #> key value model scenario version # 0 indicator 1.23 Model Scenario 1
- Parameters:
**kwargs (any) – Filter parameters as specified in
RunMetaEntryFilter.- Returns:
- A data frame with the columns:
key
value
model
scenario
version
- Return type:
- class ixmp4.core.meta.RunMetaDescriptor
Descriptor class for the ‘meta’ property of a run.
- __set__(obj: Run, value: dict[str, bool | float | int | str | generic | None]) None
Replace all meta indicators for a run.
Requires an active run lock — use
with run.transact("message"):before calling this method.with run.transact("set meta"): run.meta = {"key": "value"}
- Raises:
ixmp4.data.run.exceptions.RunLockRequired – If no run lock is held.
- __get__(obj: Run, objtype: type[Any]) RunMetaDictFacade
Retrieves the meta indicators for a run object.
run.meta #> {"key": "value"}
- Returns:
A special object that behaves like a dictionary.
- Return type:
- class ixmp4.core.meta.RunMetaDictFacade(backend: Backend, run: Run)
Bases:
BaseServiceFacade[RunMetaEntryService],UserDict[str,bool|float|int|str|None]Behaves like a dictionary with the meta indicator data for a specific run.
- __setitem__(key: str, value: bool | float | int | str | generic | None) None
Set a metadata entry for this run.
Requires an active run lock — use
with run.transact("message"):before calling this method.with run.transact("set meta"): run.meta["key"] = -1.2 run.meta["key"] #> -1.2
- Raises:
ixmp4.data.run.exceptions.RunLockRequired – If no run lock is held.
- __delitem__(key: str) None
Delete a metadata entry for this run.
Requires an active run lock — use
with run.transact("message"):before calling this method.with run.transact("delete meta"): del run.meta["key"] run.meta["key"] #> raises ``KeyError``
- Raises:
ixmp4.data.run.exceptions.RunLockRequired – If no run lock is held.