Hardware Constraints
Module to handle hardware constraints
- class qarnot.hardware_constraint.HardwareConstraint[source]
Bases:
object
Represents a hardware constraint.
- classmethod from_json(json: Dict[str, Any])[source]
Create an hardware constraint from json.
- Parameters:
connection (qarnot.connection.Connection) – the cluster connection
json (dict) – Dictionary representing the constraint
- Returns:
The created
HardwareConstraint
.
- abstract to_json()[source]
Get a dict ready to be json packed.
- Raises:
NotImplementedError – this is an abstract method, it should be overridden in child classes
- class qarnot.hardware_constraint.MinimumCoreHardware(coreCount: int)[source]
Bases:
HardwareConstraint
Represents an hardware constraint to limit the minimum number of cores
- class qarnot.hardware_constraint.MaximumCoreHardware(coreCount: int)[source]
Bases:
HardwareConstraint
Represents an hardware constraint to limit the maximum number of cores
- class qarnot.hardware_constraint.MinimumRamCoreRatioHardware(ram: float)[source]
Bases:
HardwareConstraint
Represents an hardware constraint to limit the minimum memory core ratio
- class qarnot.hardware_constraint.MaximumRamCoreRatioHardware(ram: float)[source]
Bases:
HardwareConstraint
Represents an hardware constraint to limit the maximum memory core ratio
- class qarnot.hardware_constraint.MinimumRamHardware(ram: float)[source]
Bases:
HardwareConstraint
Represents an hardware constraint to limit the minimum memory
- class qarnot.hardware_constraint.MaximumRamHardware(ram: float)[source]
Bases:
HardwareConstraint
Represents an hardware constraint to limit the maximum memory
- class qarnot.hardware_constraint.SpecificHardware(key: str)[source]
Bases:
HardwareConstraint
Represents an hardware constraint to limit to a specific hardware
- class qarnot.hardware_constraint.GpuHardware[source]
Bases:
HardwareConstraint
Represents an hardware constraint to limit hardware with gpu
- class qarnot.hardware_constraint.SSDHardware[source]
Bases:
HardwareConstraint
Represents an hardware constraint to limit hardware with SSD
- class qarnot.hardware_constraint.NoSSDHardware[source]
Bases:
HardwareConstraint
Represents an hardware constraint to limit hardware without SSD
- class qarnot.hardware_constraint.NoGpuHardware[source]
Bases:
HardwareConstraint
Represents an hardware constraint to limit hardware without gpu
- class qarnot.hardware_constraint.CpuModelHardware(cpu_model: str)[source]
Bases:
HardwareConstraint
Represents a hardware constraint to limit with a specific CPU