Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,21 @@ jobs:
uses: python-semantic-release/publish-action@v9.15.2
with:
github_token: ${{ secrets.ADMIN_TOKEN }}

# Releases failed silently for 3 months (Mar-Jun 2026) while PyPI
# went stale; see OpenAdaptAI/OpenAdapt#999. Fail loudly instead.
- name: File issue on release failure
if: failure()
env:
GH_TOKEN: ${{ secrets.ADMIN_TOKEN }}
run: |
TITLE="Release workflow failed on main"
BODY="The release workflow failed: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}

Until this is fixed, merged fix/feat commits are NOT being published to PyPI, and users install stale versions."
EXISTING=$(gh issue list --repo "${{ github.repository }}" --state open --search "in:title \"$TITLE\"" --json number --jq '.[0].number // empty')
if [ -n "$EXISTING" ]; then
gh issue comment "$EXISTING" --repo "${{ github.repository }}" --body "$BODY"
else
gh issue create --repo "${{ github.repository }}" --title "$TITLE" --body "$BODY"
fi
4 changes: 2 additions & 2 deletions openadapt_ml/cloud/azure_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,10 +424,10 @@ def main():

elif args.command == "inference-worker":
# Start inference worker
from openadapt_ml.adapters.qwen import QwenVLAdapter
from openadapt_ml.models.qwen_vl import QwenVLAdapter

print(f"Starting inference worker with model: {args.model}")
adapter = QwenVLAdapter(model_name=args.model)
adapter = QwenVLAdapter.from_pretrained(args.model)
queue.poll_and_process(adapter)

elif args.command == "inference-watch":
Expand Down
4 changes: 1 addition & 3 deletions openadapt_ml/cloud/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,9 +499,7 @@ def cmd_serve(args: argparse.Namespace) -> int:
if not args.no_regenerate:
print("Regenerating dashboard and viewer...")
try:
# Use keep_polling=True so JavaScript fetches live data from training_log.json
# This ensures the dashboard shows current data instead of stale embedded data
regenerate_local_dashboard(str(serve_dir), keep_polling=True)
regenerate_local_dashboard(str(serve_dir))
# Also regenerate viewer if comparison data exists
_regenerate_viewer_if_possible(serve_dir)
except Exception as e:
Expand Down
2 changes: 1 addition & 1 deletion openadapt_ml/evals/grounding.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
if TYPE_CHECKING:
from PIL import Image

from openadapt_ml.data.types import Episode
from openadapt_ml.grounding.base import GroundingModule, RegionCandidate
from openadapt_ml.schema import Episode


@dataclass
Expand Down
2 changes: 1 addition & 1 deletion openadapt_ml/experiments/demo_prompt/run_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ def run_experiment(
from openadapt_ml.ingest.capture import capture_to_episode

print(f"Loading demo from: {demo_capture_path}")
episode = capture_to_episode(demo_capture_path, goal=goal)
episode = capture_to_episode(demo_capture_path, instruction=goal)
print(f" Loaded {len(episode.steps)} steps, goal: {episode.goal}")

print(f"\nTest task: {test_task}")
Expand Down
12 changes: 6 additions & 6 deletions openadapt_ml/ingest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
- load_episodes(): Load Episodes from JSON files (primary entry point)
- save_episodes(): Save Episodes to JSON file
- capture_to_episode(): Converts one openadapt-capture recording → one Episode
- capture_to_session(): Converts one recording → Session containing one Episode
- load_captures_as_sessions(): Loads multiple recordings → list of Sessions
- capture_to_episodes(): Converts one recording → list of Episodes
- load_captures_as_episodes(): Loads multiple recordings → list of Episodes
- generate_synthetic_episodes(): Creates synthetic training data
"""

Expand All @@ -29,15 +29,15 @@
try:
from openadapt_ml.ingest.capture import ( # noqa: F401
capture_to_episode,
capture_to_session,
load_captures_as_sessions,
capture_to_episodes,
load_captures_as_episodes,
)

__all__.extend(
[
"capture_to_episode",
"capture_to_session",
"load_captures_as_sessions",
"capture_to_episodes",
"load_captures_as_episodes",
]
)
except ImportError:
Expand Down
25 changes: 24 additions & 1 deletion openadapt_ml/scripts/compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,29 @@ def generate_comparison_data(
return comparison_data


def generate_comparison(
capture_path: str | Path,
adapter=None,
output_path: str | Path | None = None,
) -> Path:
"""Generate a comparison HTML for a capture using a loaded adapter.

Convenience wrapper over generate_comparison_data and
generate_comparison_html for callers that hold a capture path and a
model adapter (e.g. openadapt_ml.cloud.azure_inference).
"""
from openadapt_ml.ingest.capture import capture_to_episode

capture_path = Path(capture_path)
episode = capture_to_episode(capture_path)
comparison_data = generate_comparison_data(episode, model=adapter)
if output_path is None:
output_path = capture_path / "comparison.html"
output_path = Path(output_path)
generate_comparison_html(capture_path, episode, comparison_data, output_path)
return output_path


def generate_comparison_html(
capture_path: Path,
episode: Episode,
Expand Down Expand Up @@ -804,7 +827,7 @@ def main():

# Convert capture to episode
print(f"Loading capture from: {capture_path}")
episode = capture_to_episode(capture_path, goal=args.goal)
episode = capture_to_episode(capture_path, instruction=args.goal)
print(f"Loaded {len(episode.steps)} steps")

# Load model if checkpoint provided
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ training = [
# See https://docs.unsloth.ai/get-started/installation

dev = [
"build>=1.0.0", # tests/test_packaging.py builds the wheel
"pytest>=9.0.0",
"ruff>=0.1.0",
]
Expand Down
Loading
Loading