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(experiments): ability to specify concurrency in run_experiment and evaluate_experiment #4189

Merged
merged 8 commits into from
Aug 15, 2024

Conversation

anton164
Copy link
Contributor

@anton164 anton164 commented Aug 8, 2024

(#4186)

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Aug 8, 2024
Copy link
Contributor

github-actions bot commented Aug 8, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@anton164
Copy link
Contributor Author

anton164 commented Aug 8, 2024

I have read the CLA Document and I hereby sign the CLA

@anton164
Copy link
Contributor Author

anton164 commented Aug 9, 2024

This MR might be misguided as I'm not really observing any concurrency in the current implementation 🤔 .. Seems like tasks are always evaluated in sequence? Curious to get your guidance

@anticorrelator
Copy link
Contributor

Hi @anton164, this PR does correctly wire up configuring the concurrency of our experiment runners—if the tasks that are being run are async. We generate a sequence of tasks to run (concurrently if possible) then submit them to our executor.

Would it be possible to rewrite your task as a coroutine function instead and report back if the default level of concurrency works for you?

github-actions bot added a commit that referenced this pull request Aug 12, 2024
@anton164
Copy link
Contributor Author

Thanks @anticorrelator -- concurrency works in my experiments with a coroutine task, but the level of concurrency is not sufficient. I’d like to use ~20 concurrency for my batch experiments.

I’ve updated the PR to fix a typo and add docs about the task needing to be a coroutine

Copy link
Contributor

@anticorrelator anticorrelator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for the contribution @anton164!

To fully wire this up we need to add a one more thing:

On line 416 we should pass the concurrency parameter to evaluate_experiment.

Please let me know if setting the concurrency alone gives you the desired throughput. There are more things you can adjust if you run into throughput issues while using LLM evaluators too.

@anton164
Copy link
Contributor Author

To fully wire this up we need to add a one more thing:

On line 416 we should pass the concurrency parameter to evaluate_experiment.

Good catch @anticorrelator, updated! Thanks for the quick reviews

@mikeldking mikeldking changed the title feat(main): ability to specify concurrency in run_experiment and evaluate_experiment feat(experiments): ability to specify concurrency in run_experiment and evaluate_experiment Aug 13, 2024
@mikeldking
Copy link
Contributor

Thanks for your contribution @anton164 ! 💯

Copy link
Contributor

@anticorrelator anticorrelator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@anticorrelator
Copy link
Contributor

@anton164 Looks like there's a line length linting issue in the docstring before we can merge

@anton164
Copy link
Contributor Author

@anticorrelator argh, sorry about that. Hadn't set up linting in my dev environment. I set it up now and confirmed that linting for this file no longer fails after fixing the line ending.

@RogerHYang RogerHYang merged commit 8239d3a into Arize-ai:main Aug 15, 2024
8 checks passed
fjcasti1 added a commit that referenced this pull request Aug 16, 2024
* main: (58 commits)
  Update OpenAPI spec (#4260)
  Default to adding span annotations to queue (#4259)
  docs: Add human feedback notebook tutorial (#4257)
  refactor: daemon task abstraction (#4255)
  feat(auth): create system key (#4235)
  chore: add vision fixture (#4250)
  docs: fix variable name typo in run experiments doc (#4249)
  build(deps): bump certifi (#4147)
  chore(main): release arize-phoenix 4.24.0 (#4225)
  chore(main): release arize-phoenix-evals 0.15.0 (#3920)
  feat(experiments): ability to specify concurrency in run_experiment and evaluate_experiment (#4189)
  ci(evals): limit `mistralai` below version 1.0 (#4241)
  feat(auth): user / system api key resolvers (#4232)
  feat(auth): add user role, exclude system in user lists (#4229)
  docs: Add multimodal image reasoning tutorial with llama index (#4210)
  chore(main): release arize-phoenix 4.23.0 (#4216)
  docs: No subject (GITBOOK-818)
  build(deps): bump streamlit (#4214)
  fix: Propagate span annotation metadata to examples on all mutations (#4195)
  feat(auth): users table in settings (#4221)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] It should be possible to specify number of concurrent threads for running experiments
4 participants