Conversation
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
|
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
devin-ai-integration
Bot
force-pushed
the
devin/1790812059-execute-sample-nonpreemptible
branch
from
September 30, 2026 23:52
229e428 to
5b8cf8f
Compare
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.
Summary
execute_sampleis the CPU-only relay between the frontend and the SGLang sampler pool. It holds up to 128 in-flight sample inputs per container. Because it is a regular Modal Function, it is preemptible by default, and we see it preempted often: 8 times in one day on a single frontend, per theContainer terminated due to preemptionlog. In one sec-search-rl run, a preemption that hit mid-batch was followed by 2 sample calls that never resolved and never sent traffic to the sampler, which stalled the training batch. We haven't proven a causal link.@app.function( image=image, min_containers=0, timeout=60 * 60, retries=2, + nonpreemptible=True, secrets=[...], ) @modal.concurrent(max_inputs=128, target_inputs=16) async def execute_sample(task: dict) -> dict:nonpreemptibleonly on CPU Functions, which this is. GPU sampler and trainer Functions are unaffected.Tests:
pytestshows the same results as the base branch.tests/scoped/test_lifecycle.py::test_owned_children_stop_before_parentfails 4 times on the base branch as well, and the torch-dependent modules can't be collected withouttorch.ruff checkandruff format --checkpass on the changed file.Link to Devin session: https://modal.devinenterprise.com/sessions/f53cfabb210146de8f0338fe388d7973
Open in Devin Desktop: https://modal.devinenterprise.com/desktop/session/f53cfabb210146de8f0338fe388d7973?variant=devin
Requested by: @kevintli