Skip to main content

Module clients.notebook_engine_profile.profile

Functions

from_api_object

def from_api_object(api_object: h2o_engine_manager.gen.model.v1_notebook_engine_profile.V1NotebookEngineProfile) ‑> NotebookEngineProfile

Classes

NotebookEngineProfile

class NotebookEngineProfile(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 = '')

NotebookEngineProfile represents a set of values that are used for NotebookEngine.

NotebookEngineProfile represents a set of values that are used for NotebookEngine.

Args
cpu_constraint
Constraint for each NotebookEngine's cpu that uses this profile.
gpu_constraint
Constraint for each NotebookEngine's gpu that uses this profile.
memory_bytes_constraint
Constraint for each NotebookEngine's memory_bytes that uses this profile.
storage_bytes_constraint
Constraint for each NotebookEngine's storage_bytes that uses this profile.
max_idle_duration_constraint
Constraint for each NotebookEngine's max_idle_duration that uses this profile.
max_running_duration_constraint
Constraint for each NotebookEngine's max_running_duration that uses this profile.
name
Resource name. Format "workspaces//notebookEngineProfiles/".
display_name
Human-readable name.
priority
Priority of the NotebookEngineProfile. Lower value means higher priority. Priority is NOT a unique value (any two NotebookEngineProfiles can have the same priority value).
enabled
When set to true, the NotebookEngineProfile is enabled and can be used in NotebookEngine. When set to false, the NotebookEngineProfile is disabled and cannot be used in any NotebookEngine.
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 NotebookEngineProfile. 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 NotebookEngines per user that can be running when using this NotebookEngineProfile.
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 NotebookEngine that uses this profile. PodTemplateSpec describes what will be applied on top of a regular Notebook pod before it is created. This template is merged into Notebook 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/
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 NotebookEngine that uses this profile. GPUTolerations sets Notebook's pod.spec.tolerations in case NotebookEngine has GPU > 0. This will override any tolerations defined in yaml_pod_template_spec.PodSpec.Tolerations field.
create_time
Time when the NotebookEngineProfile was created.
update_time
Time when the NotebookEngineProfile was last updated.
creator
Name of entity that created the NotebookEngineProfile.
updater
Name of entity that last updated the NotebookEngineProfile.
creator_display_name
Human-readable name of entity that created the NotebookEngineProfile.
updater_display_name
Human-readable name of entity that last updated the NotebookEngineProfile.

Methods

to_api_object

def to_api_object(self) ‑> h2o_engine_manager.gen.model.v1_notebook_engine_profile.V1NotebookEngineProfile

to_resource

def to_resource(self) ‑> h2o_engine_manager.gen.model.required_notebook_engine_profile_resource.RequiredNotebookEngineProfileResource

Feedback