[Fix] Conductor SIGINT, piecewise KV capture, and batched AC rollout split - #176
Merged
Conversation
…o the decode step for forward_batched
NSagan271
approved these changes
Jul 18, 2026
NSagan271
left a comment
Collaborator
There was a problem hiding this comment.
LGTM, also fixed a few other vjepa issues
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.
What does this PR do?
Three unrelated fixes found while validating #164:
_shutdown_conductor_processcalledsend_signal(SIGINT)on a multiprocessingSpawnProcess, that'ssubprocess.PopenAPI, so every shutdown raised an AttributeError (caught and logged) and the conductor was always SIGTERM'd without running its graceful path. Useos.killinstead. SIGINT-ing the api server now yields "Shutting down conductor..." and a clean tree exit.BatchedCacheManagerdirectly; it has been an ABC since [WIP] cosmos3: add generator model scaffold (+reasoner implementation) #121, so everyuses_kv_cache=Truepiecewise capture failed at startup (warn-only, easy to miss) and vjepa2_ac'sblock_loopgraphs were never captured. Route throughcreate_cache_manager()like the other call sites. All four buckets (bs=1/2/4/8) capture again.VJepa2ACRolloutPredictorSubmodule.forward_batchedsliced the output list instead of the tensor when splitting per request, so with B≥2 the first request got the whole batched tensor and the rest got an empty list. Cconcurrent AC rollouts then crashed (Per-request tensor has leading dim 2 != 1) or truncated. Slice rows like the sibling submodules do. New CPU-only regression testtest_ac_rollout_batched.pyfails on the old code.How was it tested?
Verified end-to-end on vjepa2_ac: sequential outputs bit-identical to before the change (sha-matched), and 6 concurrent rollouts at concurrency 3 all complete where they previously crashed.
Checklist
ruff check .passes