-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.py
More file actions
33 lines (26 loc) · 991 Bytes
/
config.py
File metadata and controls
33 lines (26 loc) · 991 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
"""
Eco Config
==========
Configuration file extension for configuring the Simvue Eco sub-module.
"""
__date__ = "2025-03-06"
import pydantic
class EcoConfig(pydantic.BaseModel):
"""Configurations for CO2 emission metrics gathering.
Parameters
----------
co2_signal_api_token: str | None, optional
the CO2 signal API token (Recommended), default is None
cpu_thermal_design_power: int | None, optional
the TDP for the CPU
gpu_thermal_design_power: int | None, optional
the TDP for each GPU
"""
co2_signal_api_token: pydantic.SecretStr | None = None
cpu_thermal_design_power: pydantic.PositiveInt | None = None
cpu_n_cores: pydantic.PositiveInt | None = None
gpu_thermal_design_power: pydantic.PositiveInt | None = None
intensity_refresh_interval: pydantic.PositiveInt | str | None = pydantic.Field(
default="1 hour", gt=2 * 60
)
co2_intensity: float | None = None