diff --git a/libs/utils/energy_model.py b/libs/utils/energy_model.py index d5fbb2ec9cb6ac48e4bd689b8c416a404516f1cf..7517dd24c69a9bb0dcdf0811b386bcd6e19dfed2 100644 --- a/libs/utils/energy_model.py +++ b/libs/utils/energy_model.py @@ -192,13 +192,18 @@ class PowerDomain(_CpuTree): not store power data - these names are used as keys into the ``idle_states`` field of :class:`EnergyModelNode` objects. + :type idle_states: list(str) :param cpu: The CPU this node represents. If provided, this is a leaf node. + :type cpu: int :param children: Non-empty list of child :class:`PowerDomain` objects + :type children: list(PowerDomain) :ivar cpus: CPUs contained in this node. Includes those of child nodes. :type cpus: tuple(int) """ def __init__(self, idle_states, cpu=None, children=None): + if idle_states is None: + raise ValueError('idle_states cannot be None (but may be empty)') super(PowerDomain, self).__init__(cpu, children) self.idle_states = idle_states