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

Warn if concurrent_batches config is set to True, but the available adapter doesn't support it #11145

Conversation

QMalcolm
Copy link
Contributor

Resolves #11122

Problem

Batches of microbatch models can be executed sequentially or concurrently. We try to figure out which to do intelligently. As part of that, we implemented an override, the model config concurrent_batches, to allow the user to bypass some of our automatic detection. However, a user cannot for batches to run concurrently if the adapter doesn't support concurrent batches (declaring support is opt in). Thus, if an adapter doesn't support running batches concurrently, and a user tries to force concurrent execution via concurrent_batches, then we need to warn the user that that isn't happening.

Solution

After parse/load of manifest, check for whether the adapter supports concurrent batch execution and whether there are any microbatch models setting concurrent_batches=True. If the adapter doesn't support concurrent batches and if there are any models with concurrent_batches=True, fire a warning.

Example:
Screenshot 2024-12-12 at 14 39 35

Checklist

  • I have read the contributing guide and understand what's expected of me.
  • I have run this code in development, and it appears to resolve the stated issue.
  • This PR includes tests, or tests are not required or relevant for this PR.
  • This PR has no interface changes (e.g., macros, CLI, logs, JSON artifacts, config files, adapter interface, etc.) or this PR has already received feedback and approval from Product or DX.
  • This PR includes type annotations for new and modified functions.

…ithout adapter support

Batches of microbatch models can be executed sequentially or concurrently. We try to figure out which to do intellegently. As part of that, we implemented an override, the model config `concurrent_batches`, to allow the user to bypass _some_ of our automatic detection. However a user _cannot_ for batches to run concurrently if theadapter doesn't support concurrent batches (declaring support is opt in). Thus if an adapter _doesn't_ suppor trunning batches concurrently, and a user tries to force concurrent execution via `concurrent_batches`, then we need to warn the user that that isn't happening.
@QMalcolm QMalcolm requested a review from a team as a code owner December 12, 2024 20:42
@cla-bot cla-bot bot added the cla:yes label Dec 12, 2024
Copy link

codecov bot commented Dec 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.85%. Comparing base (6621015) to head (6f3d911).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11145      +/-   ##
==========================================
- Coverage   88.91%   88.85%   -0.06%     
==========================================
  Files         183      187       +4     
  Lines       23937    24001      +64     
==========================================
+ Hits        21284    21327      +43     
- Misses       2653     2674      +21     
Flag Coverage Δ
integration 86.17% <100.00%> (-0.13%) ⬇️
unit 61.99% <94.73%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Unit Tests 61.99% <94.73%> (+0.04%) ⬆️
Integration Tests 86.17% <100.00%> (-0.13%) ⬇️

@QMalcolm QMalcolm force-pushed the qmalcolm--11122-warn-if-concurrent-batches-config-true-but-no-adapter-support branch from 27e7719 to 263fd3e Compare December 12, 2024 21:42
Copy link
Contributor

@MichelleArk MichelleArk left a comment

Choose a reason for hiding this comment

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

small nit, otherwise LGTM!

@QMalcolm QMalcolm merged commit 6c61cb7 into main Dec 16, 2024
55 of 56 checks passed
@QMalcolm QMalcolm deleted the qmalcolm--11122-warn-if-concurrent-batches-config-true-but-no-adapter-support branch December 16, 2024 16:35
github-actions bot pushed a commit that referenced this pull request Dec 16, 2024
…le adapter doesn't support it (#11145)

* Begin producing warning when attempting to force concurrent batches without adapter support

Batches of microbatch models can be executed sequentially or concurrently. We try to figure out which to do intelligently. As part of that, we implemented an override, the model config `concurrent_batches`, to allow the user to bypass _some_ of our automatic detection. However, a user _cannot_ for batches to run concurrently if the adapter doesn't support concurrent batches (declaring support is opt in). Thus, if an adapter _doesn't_ support running batches concurrently, and a user tries to force concurrent execution via `concurrent_batches`, then we need to warn the user that that isn't happening.

* Add custom event type for warning about invalid `concurrent_batches` config

* Fire `InvalidConcurrentBatchesConfig` warning via `warn_or_error` so it can be silenced

(cherry picked from commit 6c61cb7)
QMalcolm added a commit that referenced this pull request Dec 16, 2024
…le adapter doesn't support it (#11145) (#11154)

* Begin producing warning when attempting to force concurrent batches without adapter support

Batches of microbatch models can be executed sequentially or concurrently. We try to figure out which to do intelligently. As part of that, we implemented an override, the model config `concurrent_batches`, to allow the user to bypass _some_ of our automatic detection. However, a user _cannot_ for batches to run concurrently if the adapter doesn't support concurrent batches (declaring support is opt in). Thus, if an adapter _doesn't_ support running batches concurrently, and a user tries to force concurrent execution via `concurrent_batches`, then we need to warn the user that that isn't happening.

* Add custom event type for warning about invalid `concurrent_batches` config

* Fire `InvalidConcurrentBatchesConfig` warning via `warn_or_error` so it can be silenced

(cherry picked from commit 6c61cb7)

Co-authored-by: Quigley Malcolm <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants