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

Tasks #12

Merged
merged 10 commits into from
Dec 1, 2024
Merged

Tasks #12

merged 10 commits into from
Dec 1, 2024

Conversation

andreasjansson
Copy link
Member

@andreasjansson andreasjansson commented Dec 1, 2024

Run predictions in separate parallel tasks to speed up test runs.

Fixes #6


Important

Introduce parallel task execution and async refactoring to improve prediction performance and testing capabilities, with configuration updates and enhanced CI testing.

  • Parallel Task Execution:
    • Introduces parallel task execution using asyncio in main.py and tasks.py.
    • Adds run_tasks() in main.py to manage concurrency with a semaphore.
  • Async Refactoring:
    • Refactors boolean(), json_object(), and call() in ai.py to be async.
    • Updates outputs_match() and related functions in match_outputs.py to be async.
    • Refactors predict() and make_predict_inputs() in predict.py to be async.
  • Configuration and Defaults:
    • Adds parallel configuration option in config.py with a default of 4.
    • Removes duration from FuzzConfig in config.py.
  • Testing and CI:
    • Adds integration-test and end-to-end-test jobs in ci.yaml.
    • Updates test scripts in script/ to support new async tests.
    • Adds async test support in pytest.ini files.
  • Miscellaneous:
    • Removes retry.py and replaces its functionality with async_retry() in ai.py.
    • Refactors cog_safe_push() in main.py to use TaskContext from task_context.py.

This description was created by Ellipsis for 453c283. It will automatically update as commits are pushed.

@andreasjansson andreasjansson merged commit bdd264e into main Dec 1, 2024
4 checks passed
@andreasjansson andreasjansson deleted the tasks branch December 1, 2024 21:32
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.

Parallelize predict and train requests
1 participant