Skip to main content

Module clients.ide_engine_profile.profile

Functions​

from_api_object ​

def from_api_object(api_object: h2o_engine_manager.gen.model.v1_ide_engine_profile.V1IDEEngineProfile) ‑> IDEEngineProfile

Classes​

IDEEngineProfile​

class IDEEngineProfile(cpu_constraint: h2o_engine_manager.clients.constraint.profile_constraint_numeric.ProfileConstraintNumeric, gpu_constraint: h2o_engine_manager.clients.constraint.profile_constraint_numeric.ProfileConstraintNumeric, memory_bytes_constraint: h2o_engine_manager.clients.constraint.profile_constraint_numeric.ProfileConstraintNumeric, storage_bytes_constraint: h2o_engine_manager.clients.constraint.profile_constraint_numeric.ProfileConstraintNumeric, max_idle_duration_constraint: h2o_engine_manager.clients.constraint.profile_constraint_duration.ProfileConstraintDuration, max_running_duration_constraint: h2o_engine_manager.clients.constraint.profile_constraint_duration.ProfileConstraintDuration, name: str = '', display_name: str = '', priority: int = 0, enabled: bool = True, assigned_oidc_roles_enabled: bool = True, assigned_oidc_roles: Optional[List[str]] = None, max_running_engines: Optional[int] = None, yaml_pod_template_spec: str = '', yaml_gpu_tolerations: str = '', create_time: Optional[datetime.datetime] = None, update_time: Optional[datetime.datetime] = None, creator: str = '', updater: str = '', creator_display_name: str = '', updater_display_name: str = '', storage_class_name: str = '', gpu_resource_name: str = '')

IDEEngineProfile represents a set of values that are used for IDEEngine.

IDEEngineProfile represents a set of values that are used for IDEEngine.

Args​
cpu_constraint
Constraint for each IDEEngine's cpu that uses this profile.
gpu_constraint
Constraint for each IDEEngine's gpu that uses this profile.
memory_bytes_constraint
Constraint for each IDEEngine's memory_bytes that uses this profile.
storage_bytes_constraint
Constraint for each IDEEngine's storage_bytes that uses this profile.
max_idle_duration_constraint
Constraint for each IDEEngine's max_idle_duration that uses this profile.
max_running_duration_constraint
Constraint for each IDEEngine's max_running_duration that uses this profile.
name
Resource name. Format "workspaces//ideEngineProfiles/".
display_name
Human-readable name.
priority
Priority of the IDEEngineProfile. Lower value means higher priority. Priority is NOT a unique value (any two IDEEngineProfiles can have the same priority value).
enabled
When set to true, the IDEEngineProfile is enabled and can be used in IDEEngine. When set to false, the IDEEngineProfile is disabled and cannot be used in any IDEEngine.
assigned_oidc_roles_enabled
When set to true, the assigned_oidc_roles field is verified when a user uses this profile.
assigned_oidc_roles
List of OIDC roles assigned to this IDEEngineProfile. When profile has assigned some OIDC roles and verification of this list is enabled (assigned_oidc_roles_enabled=true), then this profile can be used only by users who have assigned at least one role from this list.
max_running_engines
Maximum number of IDEEngines per user that can be running when using this IDEEngineProfile.
yaml_pod_template_spec
YAML representation of custom PodTemplateSpec. Definition of PodTemplateSpec: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#podtemplatespec-v1-coreWhen specified, then it is applied for each IDEEngine that uses this profile. PodTemplateSpec describes what will be applied on top of a regular IDE pod before it is created. This template is merged into IDE default pod using StrategicMergePatch method (it overrides the default pod). More info about StrategicMergePatch: https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/An empty string "" means unset (no PodTemplateSpec is applied).
yaml_gpu_tolerations
YAML representation of custom GPU Tolerations. Definition of one Toleration: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#toleration-v1-coreWhen specified, then it is applied for each IDEEngine that uses this profile. GPUTolerations sets IDE's pod.spec.tolerations in case IDEEngine has GPU > 0. This will override any tolerations defined in yaml_pod_template_spec.PodSpec.Tolerations field. An empty string "" means unset: the pod's tolerations are left untouched. An empty list "[]" explicitly clears the pod's tolerations. The literal "null" is not allowed.
create_time
Time when the IDEEngineProfile was created.
update_time
Time when the IDEEngineProfile was last updated.
creator
Name of entity that created the IDEEngineProfile.
updater
Name of entity that last updated the IDEEngineProfile.
creator_display_name
Human-readable name of entity that created the IDEEngineProfile.
updater_display_name
Human-readable name of entity that last updated the IDEEngineProfile.
storage_class_name
Name of the storage class used by IDEEngine when using this profile.
gpu_resource_name
K8s GPU resource name. For example: nvidia.com/gpu or amd.com/gpu. When unset on create, server sets nvidia.com/gpu.

Methods​

to_api_object ​

def to_api_object(self) ‑> h2o_engine_manager.gen.model.v1_ide_engine_profile.V1IDEEngineProfile

to_resource ​

def to_resource(self) ‑> h2o_engine_manager.gen.model.required_ide_engine_profile_resource.RequiredIDEEngineProfileResource

Feedback