Skip to main content
Version: v3.0.0

Admin example

In v3, client.projects is an admin/migration-only surface. It lets an administrator search across all legacy projects and inspect their migration status into the workspace model. It does not create projects or register feature sets — use client.workspaces for that.

import h2o_featurestore

# Initialise feature store client using a user that has admin access
client = h2o_featurestore.login()

# Find all legacy projects a given user owns.
# required_permission takes a lowercase string: "owner", "editor",
# "sensitive_consumer", "consumer", "viewer", or "metadata_viewer".
page = client.projects.admin_search(
user_email="user@example.com",
required_permission="owner",
)
for project in page.projects:
print(f"{project.name} (id={project.id}, migrated={project.migrated})")

# Page through every match without handling page tokens yourself.
for project in client.projects.iter_admin_search(required_permission="owner"):
print(project.name)

# Inspect what a project migration would touch before running it.
details = client.projects.get_migration_details(project_id="<project_id>")
print(f"Workspace id: {details.workspace_id}")
print(f"Permissions: {details.project_permissions}")
print(f"Feature sets: {[fs.name for fs in details.feature_sets]}")

# Run the (idempotent) migration. Returns True if this call migrated the
# project, False if it was already migrated.
migrated = client.projects.migrate_project(project_id="<project_id>")
print(f"Migrated now: {migrated}")

# Bulk-migrate all unmigrated projects.
# Materialise the full list first so that migrating each project does not
# disturb the server-side pagination cursor.
unmigrated = list(client.projects.iter_admin_search(migrated=False))
for project in unmigrated:
client.projects.migrate_project(project_id=project.id)
print(f"Migrated: {project.name}")
# Migration is idempotent — safe to re-run if interrupted.

Deleting a legacy project

caution

delete_unmigrated_project() permanently removes the legacy project row and its associated records. For unmigrated projects this includes all project feature sets, jobs, and permissions. For migrated projects, the corresponding workspace is the source of truth and is not deleted — but confirm with your Feature Store administrator which data is affected before running this in production. This operation cannot be undone.

# Works on both migrated and unmigrated projects.
client.projects.delete_unmigrated_project(project_id="<project_id>")

Job concurrency limits

import h2o_featurestore

# Initialise feature store client using a user that has admin access
client = h2o_featurestore.login()

# View the current global and per-workspace-default limits.
# None or 0 on either field means unlimited.
limits = client.job_concurrency_limits.get()
print(f"Global max: {limits.global_max}")
print(f"Per-workspace default: {limits.per_workspace_default}")

# Set the system-wide cap (max jobs running at the same time across all workspaces).
client.job_concurrency_limits.set_global(20)

# Set the default cap that any single workspace can have.
client.job_concurrency_limits.set_per_workspace_default(5)

# Override the limit for a specific high-throughput workspace.
client.job_concurrency_limits.set_workspace_override(
name="workspaces/ws-abc123",
max_concurrent_jobs=10,
)

# List all per-workspace overrides.
for override in client.job_concurrency_limits.list_workspace_overrides():
print(f"{override.name}: {override.max_concurrent_jobs}")

# Remove a workspace override so it falls back to the per-workspace default.
client.job_concurrency_limits.delete_workspace_override(name="workspaces/ws-abc123")

Feedback