Add offline Phoenix recorded-score example - #30
Conversation
thangldw
left a comment
There was a problem hiding this comment.
Reviewed at 880a3b1. The implementation satisfies issue #23: it stays offline, preserves producer-owned scores, joins through explicit case IDs, rejects incomplete coverage, and keeps the external-metrics schema unchanged. Local verification passed: ruff check, full test suite (200 passed), targeted tests on Python 3.11 and 3.13, and git diff --check.
Non-blocking follow-up: catch PhoenixAnnotationError and output OSError at the CLI boundary and report them with parser.exit(2, ...). Invalid or incomplete exports currently produce a full traceback even though they are expected user-facing validation failures. Please add a CLI-level negative test when addressing this.
Signed-off-by: Ruiming Zhao <uuzzrm@gmail.com>
|
Addressed the non-blocking CLI follow-up in The Phoenix example now catches Added CLI-level regression coverage for:
Validation:
Thanks for the specific follow-up. |
|
The PR is approved and CLEAN at head |
thangldw
left a comment
There was a problem hiding this comment.
Re-reviewed current head 69be8994 (follow-up to the approval at 880a3b1). The follow-up is correctly scoped to the CLI boundary: PhoenixAnnotationError and input/output OSError now exit with code 2 and a concise error: line without a traceback, while convert_annotations keeps raising PhoenixAnnotationError for library callers. The added CLI tests cover invalid/incomplete Phoenix input and an output I/O failure.
Local verification on 69be8994:
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 .venv/bin/pytest -q tests/test_phoenix_recorded_scores.py: 12 passedPYTEST_DISABLE_PLUGIN_AUTOLOAD=1 .venv/bin/pytest -q: 202 passed.venv/bin/ruff check .: passedgit diff --check origin/main...HEAD: passed
No blocking findings. Approved for merge.
|
Thank you, @uuzzrm, for contributing this implementation. The offline Phoenix recorded-score adapter is now merged into I appreciate the careful fail-closed validation, explicit case-ID mapping, preservation of producer-owned score semantics, and the prompt follow-up on CLI error handling and regression coverage. GitHub now recognizes your contribution on the repository's Contributors page. |
Summary
Closes #23.
This adds a small offline example for converting already-recorded Phoenix trace annotations into RAGOps' existing external-metrics envelope.
The input shape follows Phoenix's trace-annotation REST model and annotation concepts:
Verification
AI assistance
This patch was developed with AI assistance and reviewed against the repository contribution guidance and the Phoenix sources linked above. The implementation is intentionally limited to local, deterministic conversion and does not claim equivalence between Phoenix and RAGOps metrics.