Publish harbor.models as a standalone `harbor-models` package
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 18/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- python
- Domain
- build-system, release
Research direction
Start with the open questions: read src/harbor/models and list what it imports from the rest of harbor, then check how packages/harbor-langsmith and packages/harbor-atif2otel consume harbor.models.job.result and harbor.models.job.plugin. The publishing side lives in scripts/publish.sh and the nightly workflow. Done means a packages/harbor-models member installable with only the five listed dependencies, with harbor.models.* imports still working and a test keeping any alias modules in sync. The author already has a branch, so the decision comes before the code.
Written by the indexing model from the issue text.
Description
Proposal: publish harbor.models as a standalone harbor-models package
Problem
The Pydantic models in harbor.models (task config, TrialResult, JobResult, JobConfig, ATIF trajectories, registry and package models) are Harbor's data contract. Other tools read and write them: result dashboards, training pipelines that consume rollouts, trajectory converters, and services that submit jobs to a Harbor runner.
Today the only way to get those models is pip install harbor, which pulls in the full CLI and runtime: litellm, supabase, fastapi, uvicorn, fastmcp, cryptography and more. For a consumer that only wants to parse a result.json or build a JobConfig, that is a heavy install and a source of version conflicts (see #3340 for litellm vs. openai>=3). Importing harbor.models.job.lock and harbor.models.dataset also loads other parts of harbor at import time.
The plugin packages in this repo already show the coupling: harbor-langsmith and harbor-atif2otel import harbor.models.job.result and harbor.models.job.plugin.
Proposal
Add a packages/harbor-models workspace member and publish it as harbor-models:
- Contents: everything now under
src/harbor/models, plus the small stdlib-only helpers it uses (the constants it needs, and theenv,file_selection,path_safetyandscriptsutils). - Runtime dependencies: only
pydantic,pyyaml,toml,shortuuidandpathspec. - Backward compatibility: every
harbor.models.*import keeps working. - Import hygiene: the few model modules that reach into the runtime (
Packager, skills, bridges and the registry client) import them lazily, so importing the models never loads the rest ofharbor.
Users who install harbor see no change. Users who only need the schema can run pip install harbor-models without the CLI and its dependencies.
Open questions
- How should
harbor-modelsbe versioned? One option is lockstep:harborpinsharbor-models==<same version>, and the nightly workflow andscripts/publish.shpublishharbor-modelsfirst. The other is its own semver, so the models can stay stable while the CLI changes quickly. - What import path should the package use?
- Install into the
harbornamespace asharbor.models. This keeps one import path with no alias modules. However, two distributions then write intoharbor/, editable installs needharbor/__init__.pyto extend__path__, and installingharbor-modelsalone leaves a partialharborpackage. - Ship a separate top-level
harbor_modelspackage. This installs and imports cleanly withoutharbor. To keepharbor.models.*working, each module undersrc/harbor/modelsbecomes an alias that replaces itself insys.moduleswith the matchingharbor_modelsmodule, so both names refer to the same module object. The aliases add one file per module, and a unit test would keep them in sync. If we go this way, should the aliases be permanent, or deprecated after a few releases in favour ofharbor_models?
- Install into the
- Should the plugin packages (
harbor-langsmith,harbor-atif2otel) switch to depending onharbor-modelswhere they only need the types?
I have a branch that implements this and can open it as a PR if maintainers are open to the direction.
- 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 9 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