Show and tell: another storage format for harbor job directory

Open
#3,984 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python

Research direction

The issue presents a separate DuckDB extension as a personal-use solution; it does not identify a change requested in Harbor or name Harbor files and tests to start from. First clarify whether the project wants this capability integrated or documented, then identify its scope and acceptance criteria. Done would need to be defined by the maintainers.

Written by the indexing model from the issue text.

Description

Hi community, when I'm using harbor and accessing its trajectory and job directory, I found a few pain points, for example,

  • Cross-job questions are expensive. Answering something like "what's the pass rate of agent X on task Y across all my jobs?" means walking thousands of directories and parsing every result.json.
  • No indexing. Filtering trials by reward, model, agent, exception type, or time requires a full scan every time.
  • Implicit, evolving schema. config.json / result.json change across Harbor versions, with no typed schema or migrations, so downstream scripts break silently.
  • Trajectories are monolithic JSON. Reading one step or one field still requires parsing the whole file; there is no column projection or random access.
  • Multimodal data is loosely coupled. Images/audio are separate files referenced by relative paths, which makes moving or sharing trajectories fragile and produces lots of small files.
  • No direct path to training. Converting trajectories into a columnar format usable by SFT/RL data loaders requires custom glue code.

For my personal use case, I created a DuckDB extension to

  • Ingests Harbor job/trial metadata into DuckDB tables with typed (nested) columns, primary keys, and secondary indexes, so you can query them with SQL.
  • Converts each ATIF trajectory into a Lance dataset with media bytes embedded, giving native multimodal storage that can plug directly into training pipelines.
  • Works with local directories and S3; ingestion is transactional, and partial Lance output is cleaned up on failure.

To use the extension, you only need to

INSTALL agent_runs FROM community;
LOAD agent_runs;

-- convert harbor job directory
CALL ingest_agent_run('/data/jobs/my-job', trajectory_destination := '/data/datasets/my-job');

-- check harbor job information
SELECT job_name, config.n_attempts, result.stats.n_completed_trials FROM agent_runs.jobs;
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from harbor-framework/harbor

All issues in harbor-framework/harbor

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.