Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/ui/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -8759,7 +8759,8 @@
"BackendSchedulerType": {
"type": "string",
"enum": [
"kai"
"kai",
"none"
],
"title": "BackendSchedulerType",
"description": "Defines the type of scheduler used by the backend "
Expand Down
1 change: 1 addition & 0 deletions src/ui/src/lib/api/generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ export type BackendSchedulerType = typeof BackendSchedulerType[keyof typeof Back

export const BackendSchedulerType = {
kai: 'kai',
none: 'none',
} as const;

/**
Expand Down
1 change: 1 addition & 0 deletions src/ui/src/mocks/generated-mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export type BackendSchedulerType = (typeof BackendSchedulerType)[keyof typeof Ba

export const BackendSchedulerType = {
kai: "kai",
none: "none",
} as const;

/**
Expand Down
5 changes: 5 additions & 0 deletions src/utils/connectors/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -2478,6 +2478,11 @@ def list_from_db(cls, backends: List[str] | None = None,
class BackendSchedulerType(enum.Enum):
""" Defines the type of scheduler used by the backend """
KAI = 'kai'
# No gang-scheduler integration — pods are scheduled by `scheduler_name`
# (typically the K8s default scheduler). Skips PodGroup CR creation, which
# removes the kai-scheduler dependency for workflows that don't need
# gang scheduling. See NVIDIA/OSMO#936.
NONE = 'none'


class BackendSchedulerSettings(pydantic.BaseModel):
Expand Down
8 changes: 6 additions & 2 deletions src/utils/job/kb_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,8 +608,12 @@ def get_k8s_object_factory(backend: connectors.Backend) -> K8sObjectFactory:
scheduler_type = scheduler_settings.scheduler_type
if scheduler_type == connectors.BackendSchedulerType.KAI:
return KaiK8sObjectFactory(backend)
else:
raise osmo_errors.OSMOServerError(f'Unsupported scheduler type: {scheduler_type}')
if scheduler_type == connectors.BackendSchedulerType.NONE:
# Base K8sObjectFactory does exactly what 'none' needs: no PodGroup CR,
# `scheduler_name` written to pod.spec.schedulerName, no scheduler
# CRDs (queues/topologies), no priority/topology features. See #936.
return K8sObjectFactory(scheduler_settings.scheduler_name)
raise osmo_errors.OSMOServerError(f'Unsupported scheduler type: {scheduler_type}')


class FileMount(pydantic.BaseModel):
Expand Down
Loading