Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Experimental async experiment entry points #4763

Open
wants to merge 4 commits into
base: auth
Choose a base branch
from
Open
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
8 changes: 3 additions & 5 deletions .github/workflows/python-cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Python Cron

on:
schedule:
- cron: "*/15 15-23 * * *"
- cron: "*/15 15-23 * * 1-5"
workflow_dispatch:

jobs:
Expand All @@ -22,13 +22,11 @@ jobs:
- 5432:5432
steps:
- uses: actions/checkout@v4
with:
ref: auth
- uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.9
- run: pip install tox-uv==1.11.3
- run: tox run-parallel --parallel-no-spinner -e py39-test-integration_tests
- run: tox run-parallel --parallel-no-spinner -e test-integration_tests
- uses: slackapi/slack-github-action@v1
if: failure()
env:
Expand Down
11 changes: 11 additions & 0 deletions packages/phoenix-evals/src/phoenix/evals/executors.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,18 @@ def get_executor_on_sync_context(
max_retries: int = 10,
exit_on_error: bool = True,
fallback_return_value: Union[Unset, Any] = _unset,
use_async: bool = False,
) -> Executor:
if use_async is True:
return AsyncExecutor(
async_fn,
concurrency=concurrency,
tqdm_bar_format=tqdm_bar_format,
max_retries=max_retries,
exit_on_error=exit_on_error,
fallback_return_value=fallback_return_value,
)

if threading.current_thread() is not threading.main_thread():
# run evals synchronously if not in the main thread

Expand Down
Loading
Loading