feat(deployments): support workload_calculator for remote functions#431
Merged
Merged
Conversation
Comment on lines
+317
to
+319
| # workload_calculator is consumed on the worker (serve mode); on the | ||
| # client/deploy side the decorator only sets up remote dispatch, so it | ||
| # is accepted here purely for signature parity. |
ce965db to
7f59b39
Compare
Contributor
Author
|
@LucasArmandVast I tested this change with two of the deployment examples. also added workload_calculator to them in |
266f329 to
ddca34d
Compare
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
28d796e to
7eb8327
Compare
LucasArmandVast
approved these changes
Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
adds an optional argworkload calculator arg to remote functions for deployments.
the workload calculator tells us the work per request. for deployments, we weren't using this calculator and defaulting to 100. so autoscaler was scoring all remote functions the same regardless of actual cost
I also added
wrap_workload_calculatorso the user can set the workload calculator as python but the request reaches the worker as json. a similar functionwrap_remote_funcalready exists but we cant use it because its async and returns serialized results (we want deserialized)