multi-resource-allocation-validation
Agent skill frombenchflow-ai/skillsbench
Validate and repair proposed resource allocations by replaying them against temporary capacity. Use when actions consume several resource dimensions such as CPU, memory, GPUs, or accelerators.
How to install multi-resource-allocation-validation
install multi-resource-allocation-validation
# install the skillsbench pack with the skills CLI
npx skills add benchflow-ai/skillsbench# or add only this skill to Claude Code: copy the folder
tasks-extra/gpu-cluster-online-scheduling/environment/skills/multi-resource-allocation-validation/
# into
~/.claude/skills/multi-resource-allocation-validation/ (all projects)
.claude/skills/multi-resource-allocation-validation/ (one project)
tasks-extra/gpu-cluster-online-scheduling/environment/skills/multi-resource-allocation-validation/SKILL.md
Apache-2.0Full file1# Multi-Resource Allocation Validation23Use this skill before returning a batch of resource allocation actions, and after building a feasible schedule to make small objective improvements.45## Core Workflow67Replay every proposed action against a temporary resource state. A placement is valid only if each required resource remains non-negative after applying all earlier placements in the same batch. Do not validate each placement only against the original observation.89Example field names vary by task, but common reminders include `cpu_free`, `memory_free`, and `gpu_slots[*].free_gpu_units`.1011## Replay Skeleton1213Use replay validation as the final gate before returning actions:1415```text16temporary_state = copy_resources(original_observation)17repaired_actions = []1819for action in actions:20 if action is not a placement:21 repaired_actions.append(action)22 continue2324 find the work item, target machine, and target slot/resource25 check compatibility26 check every required resource is available2728 if any check fails:29 action = repair_or_replace_with_defer_or_reject(action, temporary_state)3031 if action is still a placement:32 subtract consumed resources from temporary_state3334 repaired_actions.append(action)35```3637The combined action list must be feasible after all earlier actions in the same batch have consumed resources. Each work item should appear in at most one action, and deferred or rejected work should not consume resources.3839## Repair Order40…
Excerpt shown under the repository's Apache-2.0 license.
