H2O Engine profiles
H2O Engine profiles extend the common profile fields with node count constraints for distributed processing across multiple H2O-3 nodes. For background on how profiles work, see Engine profiles.
Profile fields
The following table lists the fields specific to H2O Engine profiles. For shared fields (CPU, GPU, memory, timeouts, and OIDC roles), see the shared profile fields table.
| Field | Required | Type | Description |
|---|---|---|---|
node_count_constraint | Required | Numeric constraint | Allowed range for the number of H2O-3 nodes in a distributed cluster |
Node count constraint
H2O-3 supports distributed processing across multiple nodes. The node_count_constraint field defines how many nodes a user can allocate. CPU, GPU, and memory are allocated per node, so total resources equal per-node values multiplied by the node count.
When sizing the node count constraint, consider cluster capacity. A profile that allows up to 5 nodes with 16 CPUs each consumes 80 CPUs per engine. Pair the node count maximum with max_running_engines to prevent resource exhaustion.
Manage H2O Engine profiles with the Python client
For installation instructions, see Python client installation.
List available profiles
To list profiles assigned to you based on your OIDC roles:
import h2o_engine_manager
aiem = h2o_engine_manager.login()
h2o_engine_profile_client = aiem.h2o_engine_profile_client
profiles = h2o_engine_profile_client.list_all_assigned_h2o_engine_profiles(
parent="workspaces/global"
)
for profile in profiles:
print(f"{profile.name}: {profile.display_name}")
Create a profile (administrator)
from h2o_engine_manager.clients.h2o_engine_profile.h2o_engine_profile import H2OEngineProfile
from h2o_engine_manager.clients.constraint.profile_constraint_numeric import ProfileConstraintNumeric
from h2o_engine_manager.clients.constraint.profile_constraint_duration import ProfileConstraintDuration
profile = H2OEngineProfile(
display_name="ML Engineering - Multi-node",
priority=1,
enabled=True,
assigned_oidc_roles_enabled=True,
assigned_oidc_roles=["ml-engineering"],
max_running_engines=2,
node_count_constraint=ProfileConstraintNumeric(minimum="1", default="1", maximum="5"),
cpu_constraint=ProfileConstraintNumeric(minimum="1", default="4", maximum="16"),
gpu_constraint=ProfileConstraintNumeric(minimum="0", default="0", maximum="2"),
memory_bytes_constraint=ProfileConstraintNumeric(
minimum="4Gi", default="16Gi", maximum="64Gi"
),
max_idle_duration_constraint=ProfileConstraintDuration(
minimum="30m", default="1h", maximum="8h"
),
max_running_duration_constraint=ProfileConstraintDuration(
minimum="1h", default="8h", maximum="1d"
),
)
created = h2o_engine_profile_client.create_h2o_engine_profile(
parent="workspaces/global",
h2o_engine_profile=profile,
h2o_engine_profile_id="ml-eng-multinode",
)
print(f"Created profile: {created.name}")
Update a profile (administrator)
To update specific fields of an existing profile, retrieve it first, modify the fields, and pass an update_mask specifying which fields to update:
profile = h2o_engine_profile_client.get_h2o_engine_profile(
name="workspaces/global/h2oEngineProfiles/ml-eng-multinode"
)
profile.max_running_engines = 4
updated = h2o_engine_profile_client.update_h2o_engine_profile(
h2o_engine_profile=profile,
update_mask="max_running_engines",
)
print(f"Updated profile: {updated.name}")
Pass update_mask="*" to update all fields at once.
Delete a profile (administrator)
h2o_engine_profile_client.delete_h2o_engine_profile(
name="workspaces/global/h2oEngineProfiles/ml-eng-multinode"
)
Create an engine with a profile
CPU, GPU, and memory values are per node. With node_count=3 and cpu=8, the engine uses 24 total CPU units.
profiles = h2o_engine_profile_client.list_all_assigned_h2o_engine_profiles(
parent="workspaces/global"
)
selected_profile = profiles[0]
engine = aiem.h2o_engine_client.create_engine(
workspace_id="default",
engine_id="my-h2o-engine",
display_name="My H2O Engine",
profile=selected_profile.name,
h2o_engine_version="workspaces/global/h2oEngineVersions/3.46.0.6",
cpu=8, # per node
gpu=0, # per node
memory_bytes="16Gi", # per node
node_count=1,
max_idle_duration="1h",
max_running_duration="8h",
)
Related topics
- Submit and view feedback for this page
- Send feedback about AI Engine Manager to cloud-feedback@h2o.ai