Skip to content

About

Plugin to use Pumpkin with Harbor

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

Repository files navigation

harbor-pumpkin

Run native Pumpkin .star workflows from Harbor. Harbor schedules the trials: datasets, concurrency, retries, result.json and job summaries. Pumpkin runs each trial exactly as pumpkin run would, including its sandboxes, agents, train calls, leases, runners, final call, providers and record.

Works with the Harbor on PyPI, through Harbor's import paths:

uv pip install harbor harbor-pumpkin
harbor-pumpkin-tasks ../FrontierCS-2 ./fcs-tasks --arg deadline_seconds=3600
harbor run -p ./fcs-tasks -n 8 \
  -e harbor_pumpkin.environment:PumpkinEnvironment \
  -a harbor_pumpkin.agent:PumpkinAgent \
  --ak agent=claude-code -m anthropic/claude-sonnet-5-5

New here? Start with the tutorial.

To compare several agents in one job, list one {"import_path": "harbor_pumpkin.agent:PumpkinAgent", "kwargs": {"agent": "claude-code"}} per agent in a job config's agents. Harbor's summaries tell them apart as pumpkin:<agent>.

You don't need --verifier or --skip-credential-checks. Model keys stay in Pumpkin's own ~/.config/pumpkin/pumpkin.toml, which you can change with --ek config=<path>.

A task

<task>/
├── task.toml               # timeouts; [environment] network_mode = "no-network"
├── instruction.md          # shown in Harbor's viewer
├── environment/pumpkin.toml
└── tests/test.sh           # placeholder; the environment answers it
# environment/pumpkin.toml
workflow = "/abs/or/relative/to/environment/tasks/x/task.star"
rewards = ["score"]          # optional: the final call's values to use as rewards (default: every number)
[args]                       # optional: default `--arg k=v`
agent = "claude-code"
[agents]                     # optional: aliases for --ak agent=<name> (built in: oracle = "reference")

Put rewards above [args]: a key below a TOML table header belongs to that table.

Options

Option Default Meaning
--ek config= ~/.config/pumpkin/pumpkin.toml Pumpkin's configuration (Docker, Modal, EC2, controller)
--ek binary= $PUMPKIN_BIN, then the repository's ./pumpkin launcher, then the pinned release the pumpkin to run
--ek capacity_wait_sec= 3600 how long to retry while the local provider has no room
--ak agent= the task's [args] the workflow's agent arg, passed verbatim unless aliased; agent_info.name becomes pumpkin:<agent>
-m p/model / --ak model= the workflow's model arg (-m without its provider/)
--effort / --ak effort= the workflow's effort arg
--ak args=k=v,k2=v2 any other workflow args (or a JSON object)

The args are merged in this order, and later sources win: the .star defaults, then pumpkin.toml [args], then -m, then --ak args, then --ak agent/model/effort. An empty value keeps the workflow's own default.

Timeouts

Pumpkin bounds the agents' work by the run's deadline, and the final call by its own timeout. Harbor's timeouts are only backstops:

  • With --arg deadline_seconds=<s>, harbor-pumpkin-tasks sets the agent timeout to <s> plus 300 s for image builds and startup. At run time, Harbor's effective agent timeout, minus those 300 s, becomes the workflow's deadline_seconds: with deadline_seconds=3600, --agent-timeout-multiplier 0.25 gives the agents 675 s. --ak args=deadline_seconds=<s> still wins.
  • Without it, the workflow's own deadline holds (5 hours in FrontierCS-2), and the agent timeout is 24 hours.
  • The verifier timeout is 6 hours (--verifier-timeout-sec), above FrontierCS-2's slowest final call (4 hours).

When a run starts, the environment warns in the trial log if Harbor would stop the trial before the run's own deadline or final call would.

How a trial maps onto one run

  1. PumpkinAgent.run() starts pumpkin run --wait --outcome, and returns when Pumpkin reports "the work phase ended". Harbor's agent timeout therefore covers only the agents' work.
  2. Harbor's default verifier runs tests/test.sh. The environment answers that call: it waits for the same run's final call, then writes verifier/reward.json and verifier/result.json (every value the final call returned). It also copies the final job into verifier/pumpkin/.
  3. The agents' log/ and out/ are copied to agent/[<role>/], the submission is unpacked to artifacts/, and the record stays at pumpkin/<run id>/. You can open it with pumpkin view --runs <trial>/pumpkin.
  4. stop() runs pumpkin cancel on any run that hasn't ended, such as after Ctrl-C, a timeout or --disable-verification.
Outcome Harbor
finished, verdict returned rewards
an agent's work_end is deadline AgentTimeoutError; the reward is still recorded
an agent's work_end is agent_exited with a nonzero status NonZeroAgentExitCodeError; the reward is still recorded
an agent's work_end is agent_failed, or the run is failed or interrupted PumpkinRunError
verdict no_submission no reward (RewardFileNotFoundError); verifier/test-stdout.txt says why
verdict no_result after a timeout VerifierTimeoutError

In controller mode, pumpkin cancel reads only ~/.config/pumpkin/pumpkin.toml, because Pumpkin's cancel has no --config.

About

Plugin to use Pumpkin with Harbor

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages