mirror of
https://github.com/open-jarvis/OpenJarvis.git
synced 2026-07-27 21:05:34 +00:00
hybrid: de-hardcode user-specific paths in scripts, defaults, docs
- Replace hardcoded /matx/u/aspark/... paths with OPENJARVIS_HYBRID_EXPERIMENTS_DIR env var defaulting to ~/.openjarvis/experiments/hybrid across runner, sweep orchestrator, report builder, backfill, and the SWE-bench dataset regression test. - run_sweep.py REPO_ROOT now inferred from __file__; VENV_PY + LOG_DIR overridable via env. - archon.py ARCHON_SRC env var no longer falls back to a personal clone; docstring points at the upstream repo. - README / docstring scrub: remove personal github link, personal install paths, '(Andrew's lane)' comment, /matx/u/aspark/CLAUDE.md spec ref. - Add minion_logs/ and oj-debug.*.json to .gitignore.
This commit is contained in:
@@ -125,3 +125,8 @@ learning.db
|
||||
**/learning/benchmarks/
|
||||
**/teacher_traces/
|
||||
*.session.json
|
||||
|
||||
# Local dev artifacts (hybrid worker logs + cli debug dumps)
|
||||
minion_logs/
|
||||
*.oj-debug.json
|
||||
oj-debug.*.json
|
||||
|
||||
@@ -53,7 +53,13 @@ from typing import Any, Dict, List, Optional, Tuple
|
||||
HYBRID_RUNS = Path(
|
||||
os.environ.get(
|
||||
"HYBRID_RUNS_DIR",
|
||||
"/matx/u/aspark/.openjarvis/experiments/hybrid/runs",
|
||||
Path(
|
||||
os.environ.get(
|
||||
"OPENJARVIS_HYBRID_EXPERIMENTS_DIR",
|
||||
Path.home() / ".openjarvis" / "experiments" / "hybrid",
|
||||
)
|
||||
)
|
||||
/ "runs",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Build /matx/u/aspark/.openjarvis/experiments/hybrid/docs/index.html
|
||||
plus a set of PNG pareto plots in the same dir. The HTML embeds the PNGs
|
||||
via <img src="..."> so the browser never has to render anything itself —
|
||||
"""Build ``$OPENJARVIS_HYBRID_EXPERIMENTS_DIR/docs/index.html`` plus a set
|
||||
of PNG pareto plots in the same dir. The HTML embeds the PNGs via
|
||||
``<img src="...">`` so the browser never has to render anything itself —
|
||||
just shows static images.
|
||||
|
||||
Re-running is idempotent: regenerates index.html + all PNGs from whatever
|
||||
@@ -11,6 +11,7 @@ from __future__ import annotations
|
||||
|
||||
import html as html_lib
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
from dataclasses import dataclass
|
||||
from datetime import datetime
|
||||
@@ -22,7 +23,12 @@ import matplotlib
|
||||
matplotlib.use("Agg")
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
HYBRID_ROOT = Path("/matx/u/aspark/.openjarvis/experiments/hybrid")
|
||||
HYBRID_ROOT = Path(
|
||||
os.environ.get(
|
||||
"OPENJARVIS_HYBRID_EXPERIMENTS_DIR",
|
||||
Path.home() / ".openjarvis" / "experiments" / "hybrid",
|
||||
)
|
||||
)
|
||||
RUNS_DIR = HYBRID_ROOT / "runs"
|
||||
DOCS_DIR = HYBRID_ROOT / "docs"
|
||||
OUT_HTML = DOCS_DIR / "index.html"
|
||||
|
||||
@@ -9,8 +9,6 @@ Drives a batch of ``openjarvis.agents.hybrid.runner`` invocations with:
|
||||
* exit-code + summary.json driven retry loop (resume mode, runner-handled)
|
||||
* incremental atomic updates of ``results-table.md`` (auto-section only)
|
||||
* Ctrl-C → SIGTERM the whole process group of each child cleanly
|
||||
|
||||
Spec: see /matx/u/aspark/CLAUDE.md and the task description.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
@@ -33,12 +31,17 @@ from typing import Dict, List, Optional, Tuple
|
||||
# Paths
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
REPO_ROOT = Path("/matx/u/aspark/OpenJarvis")
|
||||
VENV_PY = REPO_ROOT / ".venv" / "bin" / "python"
|
||||
EXPERIMENTS_DIR = Path("/matx/u/aspark/.openjarvis/experiments/hybrid")
|
||||
REPO_ROOT = Path(__file__).resolve().parents[2]
|
||||
VENV_PY = Path(os.environ.get("OPENJARVIS_VENV_PY", REPO_ROOT / ".venv" / "bin" / "python"))
|
||||
EXPERIMENTS_DIR = Path(
|
||||
os.environ.get(
|
||||
"OPENJARVIS_HYBRID_EXPERIMENTS_DIR",
|
||||
Path.home() / ".openjarvis" / "experiments" / "hybrid",
|
||||
)
|
||||
)
|
||||
RUNS_DIR = EXPERIMENTS_DIR / "runs"
|
||||
RESULTS_TABLE = EXPERIMENTS_DIR / "docs" / "results-table.md"
|
||||
LOG_DIR = Path("/tmp/hybrid-sweep-logs")
|
||||
LOG_DIR = Path(os.environ.get("HYBRID_SWEEP_LOG_DIR", "/tmp/hybrid-sweep-logs"))
|
||||
AUTO_SECTION_HEADER = "## n=100 sweep — auto-generated"
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# Hybrid local+cloud paradigm agents
|
||||
|
||||
Six paradigms ported from the legacy hybrid-local-cloud-compute harness
|
||||
([github.com/andrewparkk1/hybrid-local-cloud-compute](https://github.com/andrewparkk1/hybrid-local-cloud-compute);
|
||||
results archived at `~/.openjarvis/experiments/hybrid/`) — each is
|
||||
registered as a standard OpenJarvis agent so the rest of the platform
|
||||
(SDK, CLI, distillation, evals) can use them like any other agent.
|
||||
Six paradigms ported from the original ``hybrid-local-cloud-compute``
|
||||
harness — each is registered as a standard OpenJarvis agent so the rest
|
||||
of the platform (SDK, CLI, distillation, evals) can use them like any
|
||||
other agent. Results live under ``$OPENJARVIS_HYBRID_EXPERIMENTS_DIR``
|
||||
(defaults to ``~/.openjarvis/experiments/hybrid/``).
|
||||
|
||||
| Agent | Plan shape | Trains what? | Workers |
|
||||
|-------------------|-----------------|----------------------|---------------------------|
|
||||
@@ -46,15 +46,15 @@ structural scorer).
|
||||
## Quickstart
|
||||
|
||||
```bash
|
||||
cd /matx/u/aspark/OpenJarvis
|
||||
cd OpenJarvis
|
||||
source .env # API keys
|
||||
|
||||
# 1. Start vLLM in another shell (see CLAUDE.md for the full recipe)
|
||||
# 1. Start vLLM in another shell (see your local launch recipe)
|
||||
# CUDA_VISIBLE_DEVICES=0 .venv/bin/python -m vllm.entrypoints.openai.api_server \
|
||||
# --model Qwen/Qwen3.5-27B-FP8 --port 8001 ...
|
||||
|
||||
# 2. (Optional) for Minions: install the upstream library
|
||||
.venv/bin/uv pip install -e /matx/u/aspark/external/minions
|
||||
.venv/bin/uv pip install -e path/to/minions
|
||||
|
||||
# 3. Run a smoke cell
|
||||
.venv/bin/python -m openjarvis.agents.hybrid.runner \
|
||||
|
||||
@@ -15,9 +15,9 @@ or the bench's native formatter) and hands it in via ``run(input=...)``. Task
|
||||
metadata that the paradigm needs (a problem statement vs. a question, hints,
|
||||
etc.) goes through ``context.metadata``.
|
||||
|
||||
The hybrid harness at ``/matx/u/aspark/hybrid-local-cloud-compute`` is the
|
||||
reference implementation and stays untouched — these ports are the
|
||||
OpenJarvis-native versions of the same paradigms.
|
||||
The original ``hybrid-local-cloud-compute`` harness is the reference
|
||||
implementation and stays untouched — these ports are the OpenJarvis-native
|
||||
versions of the same paradigms.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -26,9 +26,9 @@ How the hybrid harness wires it (and what we mirror here):
|
||||
- ``ranker_model`` / ``fuser_model`` (default: ``cloud_model`` for both)
|
||||
- ``max_tokens`` (default 2048), ``temperature`` (default 0.7)
|
||||
|
||||
Requires the Archon library (cloned at
|
||||
``hybrid-local-cloud-compute/external/Archon`` — add its ``src`` to
|
||||
``PYTHONPATH`` or pip-install editable). Import is lazy.
|
||||
Requires the Archon library from https://github.com/Stanford-ILIAD/Archon
|
||||
— either pip-install editable or set ``ARCHON_SRC`` to the checkout's
|
||||
``src/`` directory. Import is lazy.
|
||||
|
||||
Ported from ``hybrid-local-cloud-compute/adapters/archon_adapter.py``.
|
||||
"""
|
||||
@@ -87,13 +87,11 @@ def _stub_archon_imports() -> None:
|
||||
|
||||
|
||||
def _add_archon_to_path() -> None:
|
||||
"""Locate Archon's ``src`` dir. The hybrid clone is the default location;
|
||||
override with ``ARCHON_SRC`` env var if Archon is installed elsewhere."""
|
||||
archon_src = os.environ.get(
|
||||
"ARCHON_SRC",
|
||||
"/matx/u/aspark/hybrid-local-cloud-compute/external/Archon/src",
|
||||
)
|
||||
if archon_src not in sys.path and os.path.isdir(archon_src):
|
||||
"""Locate Archon's ``src`` dir. Set ``ARCHON_SRC`` to point at your
|
||||
Archon checkout (``<repo>/src``); otherwise we assume ``archon`` is on
|
||||
``sys.path`` already (e.g. ``pip install`` from a local clone)."""
|
||||
archon_src = os.environ.get("ARCHON_SRC")
|
||||
if archon_src and os.path.isdir(archon_src) and archon_src not in sys.path:
|
||||
sys.path.insert(0, archon_src)
|
||||
|
||||
|
||||
|
||||
@@ -17,9 +17,9 @@ acc / $0.67 (vs $1.09).
|
||||
|
||||
Requires the ``minions`` library from
|
||||
https://github.com/HazyResearch/minions installed in the same env (e.g.
|
||||
``uv pip install -e /matx/u/aspark/hybrid-local-cloud-compute/external/minions``).
|
||||
Import is lazy — the agent class registers without ``minions`` available,
|
||||
and the import error only fires on ``run()``.
|
||||
``uv pip install -e path/to/minions``). Import is lazy — the agent class
|
||||
registers without ``minions`` available, and the import error only fires
|
||||
on ``run()``.
|
||||
|
||||
Compatibility patches applied at first ``run()`` (idempotent):
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Re-run the per-axis cloud winner on minions to check the ranking
|
||||
# isn't a skillorchestra-only artifact. Same subset, same n.
|
||||
#
|
||||
# Local is fixed at Qwen-3.5-27B-FP8 (Andrew's lane).
|
||||
# Local is fixed at Qwen-3.5-27B-FP8 (matches the n=100 sweep local lane).
|
||||
# NOTE: minions × Gemini is fully supported as of 2026-05-19 — the
|
||||
# vendored Minions library ships a GeminiClient that minion.py already
|
||||
# special-cases (Pydantic response_schema for the supervisor JSON
|
||||
|
||||
@@ -45,7 +45,7 @@ DEFAULT_REGISTRY_DIR = PACKAGE_DIR / "registry"
|
||||
DEFAULT_EXPERIMENTS_DIR = Path(
|
||||
os.environ.get(
|
||||
"OPENJARVIS_HYBRID_EXPERIMENTS_DIR",
|
||||
"/matx/u/aspark/.openjarvis/experiments/hybrid",
|
||||
Path.home() / ".openjarvis" / "experiments" / "hybrid",
|
||||
)
|
||||
)
|
||||
DEFAULT_SUBSETS_DIR = DEFAULT_EXPERIMENTS_DIR / "subsets"
|
||||
|
||||
@@ -14,14 +14,17 @@ warm on the mkt cluster.
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
from openjarvis.agents.hybrid.runner import _load_swebench_tasks
|
||||
from openjarvis.agents.hybrid.runner import DEFAULT_SUBSETS_DIR, _load_swebench_tasks
|
||||
|
||||
|
||||
SUBSET_PATH = Path(
|
||||
"/matx/u/aspark/.openjarvis/experiments/hybrid/subsets/"
|
||||
"swebench_verified_n100_seed42.json"
|
||||
os.environ.get(
|
||||
"HYBRID_SWEBENCH_N100_SUBSET",
|
||||
DEFAULT_SUBSETS_DIR / "swebench_verified_n100_seed42.json",
|
||||
)
|
||||
)
|
||||
KNOWN_FULL_TASK_ID = "pytest-dev__pytest-10081"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user