Skip to content

fix: wrap async tasks for sync Phoenix client - #5

Merged
zurfjereluhmie merged 1 commit into
mainfrom
fix/async-task-and-bare-string-evaluator
Mar 30, 2026
Merged

fix: wrap async tasks for sync Phoenix client#5
zurfjereluhmie merged 1 commit into
mainfrom
fix/async-task-and-bare-string-evaluator

Conversation

@zurfjereluhmie

Copy link
Copy Markdown
Owner

No description provided.

…expected_output

- runner.py: detect async task callables with inspect.iscoroutinefunction and
  wrap them in asyncio.run() so Phoenix's sync client can invoke them without
  receiving an unawaited coroutine (RuntimeError: Task is async...)
- evaluators.py: guard ast.literal_eval in both top_k and is_in with
  try/except (ValueError, SyntaxError), falling back to treating a plain
  string as a single-item list — fixes crash on bare identifiers like
  'elasticsearch' stored directly in the expected_output CSV column
- tests: add covering tests for both fixes
@zurfjereluhmie
zurfjereluhmie merged commit 9d370cc into main Mar 30, 2026
1 check passed
@zurfjereluhmie
zurfjereluhmie deleted the fix/async-task-and-bare-string-evaluator branch March 30, 2026 11:32
This was referenced Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant