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
59 changes: 46 additions & 13 deletions .github/workflows/benchmark-multinode-tmpl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
runner:
required: true
type: string
node-count:
description: "Total Slurm nodes required by this benchmark"
required: true
type: string
priority:
description: "Higher-is-sooner CI priority score"
required: true
Expand Down Expand Up @@ -254,22 +258,51 @@ jobs:
${{ fromJSON(
vars.PRIORITY_SCHEDULER_ENABLED == 'true' &&
(
inputs.skip-queue-pr != '' &&
format(
'["self-hosted",{0},{1},{2},{3}]',
toJSON(inputs.runner),
toJSON(format('ci-job-{0}-{1}', inputs.priority, inputs.queue-token)),
toJSON(format('ci-attempt-{0}', github.run_attempt)),
toJSON(format('ci-skip-queue-pr-{0}', inputs.skip-queue-pr))
vars.NODE_SLOT_SCHEDULER_ENABLED == 'true' &&
(
inputs.skip-queue-pr != '' &&
format(
'["self-hosted",{0},{1},{2},{3},{4}]',
toJSON(inputs.runner),
toJSON(format('nodes:{0}', inputs.node-count)),
toJSON(format('ci-job-{0}-{1}', inputs.priority, inputs.queue-token)),
toJSON(format('ci-attempt-{0}', github.run_attempt)),
toJSON(format('ci-skip-queue-pr-{0}', inputs.skip-queue-pr))
) ||
format(
'["self-hosted",{0},{1},{2},{3}]',
toJSON(inputs.runner),
toJSON(format('nodes:{0}', inputs.node-count)),
toJSON(format('ci-job-{0}-{1}', inputs.priority, inputs.queue-token)),
toJSON(format('ci-attempt-{0}', github.run_attempt))
)
) ||
format(
'["self-hosted",{0},{1},{2}]',
toJSON(inputs.runner),
toJSON(format('ci-job-{0}-{1}', inputs.priority, inputs.queue-token)),
toJSON(format('ci-attempt-{0}', github.run_attempt))
(
inputs.skip-queue-pr != '' &&
format(
'["self-hosted",{0},{1},{2},{3}]',
toJSON(inputs.runner),
toJSON(format('ci-job-{0}-{1}', inputs.priority, inputs.queue-token)),
toJSON(format('ci-attempt-{0}', github.run_attempt)),
toJSON(format('ci-skip-queue-pr-{0}', inputs.skip-queue-pr))
) ||
format(
'["self-hosted",{0},{1},{2}]',
toJSON(inputs.runner),
toJSON(format('ci-job-{0}-{1}', inputs.priority, inputs.queue-token)),
toJSON(format('ci-attempt-{0}', github.run_attempt))
)
)
) ||
format('[{0}]', toJSON(inputs.runner))
(
vars.NODE_SLOT_SCHEDULER_ENABLED == 'true' &&
format(
'[{0},{1}]',
toJSON(inputs.runner),
toJSON(format('nodes:{0}', inputs.node-count))
) ||
format('[{0}]', toJSON(inputs.runner))
)
) }}
timeout-minutes: 480
name: >-
Expand Down
51 changes: 38 additions & 13 deletions .github/workflows/benchmark-tmpl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,22 +202,47 @@ jobs:
${{ fromJSON(
vars.PRIORITY_SCHEDULER_ENABLED == 'true' &&
(
inputs.skip-queue-pr != '' &&
format(
'["self-hosted",{0},{1},{2},{3}]',
toJSON(inputs.runner),
toJSON(format('ci-job-{0}-{1}', inputs.priority, inputs.queue-token)),
toJSON(format('ci-attempt-{0}', github.run_attempt)),
toJSON(format('ci-skip-queue-pr-{0}', inputs.skip-queue-pr))
vars.NODE_SLOT_SCHEDULER_ENABLED == 'true' &&
(
inputs.skip-queue-pr != '' &&
format(
'["self-hosted",{0},{1},{2},{3},{4}]',
toJSON(inputs.runner),
toJSON('nodes:1'),
toJSON(format('ci-job-{0}-{1}', inputs.priority, inputs.queue-token)),
toJSON(format('ci-attempt-{0}', github.run_attempt)),
toJSON(format('ci-skip-queue-pr-{0}', inputs.skip-queue-pr))
) ||
format(
'["self-hosted",{0},{1},{2},{3}]',
toJSON(inputs.runner),
toJSON('nodes:1'),
toJSON(format('ci-job-{0}-{1}', inputs.priority, inputs.queue-token)),
toJSON(format('ci-attempt-{0}', github.run_attempt))
)
) ||
format(
'["self-hosted",{0},{1},{2}]',
toJSON(inputs.runner),
toJSON(format('ci-job-{0}-{1}', inputs.priority, inputs.queue-token)),
toJSON(format('ci-attempt-{0}', github.run_attempt))
(
inputs.skip-queue-pr != '' &&
format(
'["self-hosted",{0},{1},{2},{3}]',
toJSON(inputs.runner),
toJSON(format('ci-job-{0}-{1}', inputs.priority, inputs.queue-token)),
toJSON(format('ci-attempt-{0}', github.run_attempt)),
toJSON(format('ci-skip-queue-pr-{0}', inputs.skip-queue-pr))
) ||
format(
'["self-hosted",{0},{1},{2}]',
toJSON(inputs.runner),
toJSON(format('ci-job-{0}-{1}', inputs.priority, inputs.queue-token)),
toJSON(format('ci-attempt-{0}', github.run_attempt))
)
)
) ||
format('[{0}]', toJSON(inputs.runner))
(
vars.NODE_SLOT_SCHEDULER_ENABLED == 'true' &&
format('[{0},{1}]', toJSON(inputs.runner), toJSON('nodes:1')) ||
format('[{0}]', toJSON(inputs.runner))
)
) }}
timeout-minutes: 500
name: >-
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ jobs:
osl: ${{ matrix.config.osl }}
max-model-len: ${{ matrix.config.max-model-len }}
runner: ${{ matrix.config.runner }}
node-count: ${{ matrix.config.node-count }}
priority: ${{ matrix.config.priority }}
queue-token: ${{ matrix.config['queue-token'] }}
image: ${{ matrix.config.image }}
Expand Down Expand Up @@ -203,6 +204,7 @@ jobs:
osl: ${{ matrix.config.osl }}
max-model-len: ${{ matrix.config.max-model-len }}
runner: ${{ matrix.config.runner }}
node-count: ${{ matrix.config.node-count }}
priority: ${{ matrix.config.priority }}
queue-token: ${{ matrix.config['queue-token'] }}
image: ${{ matrix.config.image }}
Expand Down Expand Up @@ -342,6 +344,7 @@ jobs:
osl: '0'
max-model-len: '0'
runner: ${{ matrix.config.runner }}
node-count: ${{ matrix.config.node-count }}
priority: ${{ matrix.config.priority }}
queue-token: ${{ matrix.config['queue-token'] }}
image: ${{ matrix.config.image }}
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run-sweep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ jobs:
osl: ${{ matrix.config.osl }}
max-model-len: ${{ matrix.config.max-model-len }}
runner: ${{ matrix.config.runner }}
node-count: ${{ matrix.config.node-count }}
priority: ${{ matrix.config.priority }}
queue-token: ${{ matrix.config['queue-token'] }}
skip-queue-pr: ${{ matrix.config['skip-queue-pr'] || '' }}
Expand Down Expand Up @@ -651,6 +652,7 @@ jobs:
osl: '0'
max-model-len: '0'
runner: ${{ matrix.config.runner }}
node-count: ${{ matrix.config.node-count }}
priority: ${{ matrix.config.priority }}
queue-token: ${{ matrix.config['queue-token'] }}
skip-queue-pr: ${{ matrix.config['skip-queue-pr'] || '' }}
Expand Down Expand Up @@ -817,6 +819,7 @@ jobs:
osl: ${{ matrix.config.osl }}
max-model-len: ${{ matrix.config.max-model-len }}
runner: ${{ matrix.config.runner }}
node-count: ${{ matrix.config.node-count }}
priority: ${{ matrix.config.priority }}
queue-token: ${{ matrix.config['queue-token'] }}
skip-queue-pr: ${{ matrix.config['skip-queue-pr'] || '' }}
Expand Down
3 changes: 3 additions & 0 deletions configs/ci-priority.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ version: 1
base-score: 1.0

adjustments:
# Preserve business priority as the primary key, then prefer smaller Slurm
# allocations within an otherwise identical class.
additional-node: -0.001
event:
push: 2.0
multi-node: 1.25
Expand Down
10 changes: 10 additions & 0 deletions utils/ci_priority.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ def _entry_from_criteria(
)
else ""
),
"node-count": entry.get("node-count", 1),
}


Expand Down Expand Up @@ -141,6 +142,15 @@ def calculate_priority(
score = _decimal(policy["base-score"])
score += _decimal(adjustments.get("event", {}).get(context.event_name, 0))

node_count = entry.get("node-count", 1)
if (
not isinstance(node_count, int)
or isinstance(node_count, bool)
or node_count < 1
):
raise ValueError(f"node-count must be a positive integer, got {node_count!r}")
score += _decimal(adjustments.get("additional-node", 0)) * (node_count - 1)

if entry.get("prefill") is not None:
score += _decimal(adjustments.get("multi-node", 0))
if entry.get("scenario-type") == "agentic-coding":
Expand Down
Loading