EC2: choose the instance type from each task's resource requests, including GPUs
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 18/100
Research direction
Start with the EC2 environment's instance_type option and its RunInstances call, then the existing check of the storage request against root_volume_size_gb. Compare with the Docker environment's GPU device reservation and the GPU rejection message. The work is design-heavy: choosing types with DescribeInstanceTypes, a GPU-ready image and the bootstrap change are open questions. Done means the maintainers agree on a design, after which per-task selection and an early error can be built.
Written by the indexing model from the issue text.
Description
Summary
The EC2 environment uses one fixed instance_type for every task in a job and does not support GPU tasks. It would help if it could pick an instance type per task from the task's cpus, memory_mb and gpus requests, the way the Modal environment sizes each sandbox.
Checked on Harbor 0.25.0 and on main as of 2026-11-13.
Current behaviour
instance_typeis a single option, defaulting tom7i-flex.large, and is passed toRunInstancesunchanged. The task'scpusandmemory_mbare applied only as limits on the container inside the VM.- Nothing checks a task's CPU or memory request against the chosen instance before launch (only the storage request is checked, against
root_volume_size_gb). An under-sized instance can therefore fail partway through a trial, which looks like an agent failure. - A task with
gpus > 0is rejected before launch with "Task requires N GPU(s) but ec2 environment does not support GPU allocation", because the EC2 environment does not declare GPU capability. - The bootstrap installs plain Docker, so even a GPU instance type would not expose the GPU to the task container.
Why it matters
Benchmarks often mix task sizes, and some include a few GPU tasks. On EC2 today the options are to size every sandbox for the largest task, or to split the dataset by hand into several jobs with task_names and exclude_task_names and send GPU tasks to another provider. Results then span jobs and providers.
Possible approach
Happy to hear a different preference; this is only a sketch.
- Per-task sizing. Accept an ordered list of allowed instance types (for example
instance_types: [m7i-flex.large, m7i-flex.2xlarge, g5.xlarge]). For each trial, pick the first type whose vCPUs, memory and GPUs cover the task's request, usingDescribeInstanceTypes. Keep today's behaviour when onlyinstance_typeis set. - GPU support. When the chosen type has a GPU, use a GPU-ready image (a separate
gpu_ami_id, or install the NVIDIA container toolkit during bootstrap), pass the task's GPU request to Compose as a device reservation as the Docker environment does, and declare the capability. - Fail early when nothing fits. If no allowed type covers a task's request, raise a clear error before launch instead of running it under-sized.
Workaround in use
One job per size class, selected with task_names / exclude_task_names, launched together, with GPU tasks on Modal.
- Dominant language
- Python
- Stars
- 5.6k
- Forks
- 1.9k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 156
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from harbor-framework/harbor
-
Trial runs the agent's `populate_context_post_run` on the event loop, so trials that end together stall the orchestrator for secondsPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
harbor-framework/harbor#4652 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
harbor-framework/harbor#4494 · 1 comment ·
Maintainers usually reply within 1 day
-
step workdir upload resets the work folder's owner and permissions in ModalPossibly taken @Sauvi72 claimed this 8 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
harbor-framework/harbor#4487 · 3 comments ·
Maintainers usually reply within 1 day
-
Docker: verifier log mounts are chmod 777 (no sticky), so rewardkit sandboxed graders die before writing a rewardPossibly taken @yuyz-cyber claimed this 6 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
harbor-framework/harbor#4469 · 1 comment ·
Maintainers usually reply within 1 day
-
Compare and Pareto hide total token usage when the cached token count is missingPossibly taken @Aafimalek claimed this 10 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
harbor-framework/harbor#4448 ·
Maintainers usually reply within 1 day
All issues in harbor-framework/harbor
Similar issues
-
soup prune-prompt exits 1 after writing its output on a file over 100,000 rows, and reports a capped row count otherwisePossibly taken @abdulwaarith0 claimed this today. Openneeds-triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
MakazhanAlpamys/Soup#3690 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug data-types native-format
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
ClickHouse/clickhouse-connect#1320 ·
Maintainers usually reply within 1 day
-
accepted
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
future-agi/future-agi#6392 ·
Maintainers usually reply within 1 day