[wip][do not review] enable pipeline rl#549
[wip][do not review] enable pipeline rl#549casteryh wants to merge 2 commits intometa-pytorch:mainfrom
Conversation
Summary: This change adds optional parameters to Generator.update_weights() to support in-flight weight updates without waiting for pending requests to complete. The original blocking behavior is preserved as default, with new opt-in parameters: - wait_for_pending (default=True): When False, updates weights immediately without draining the request queue - reset_cache (default=True): When False, preserves KV cache during updates This enables faster weight updates during training at the cost of potential mid-generation weight switching for in-flight requests. Test Plan: - Verified Python syntax compiles successfully - Default behavior unchanged (backwards compatible) - New behavior available via explicit parameter flags
Summary: Added two new configuration fields to the Generator dataclass: - wait_for_pending_on_update (default=True): Controls whether weight updates wait for pending requests to complete - reset_cache_on_update (default=True): Controls whether to reset KV cache after weight updates The update_weights() method now uses these config values as defaults, but still allows per-call overrides via optional parameters. This enables users to configure the behavior globally via config files while maintaining flexibility for per-call customization. Test Plan: - Verified Python syntax compiles successfully - Default behavior unchanged (backwards compatible) - Config values can be set in Generator instantiation - Per-call overrides still work as before
|
Hi @casteryh! Thank you for your pull request. We require contributors to sign our Contributor License Agreement, and yours needs attention. You currently have a record in our system, but the CLA is no longer valid, and will need to be resubmitted. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
Summary
This change adds optional parameters to Generator.update_weights() to support in-flight weight updates without waiting for pending requests to complete.
Changes
wait_for_pendingandreset_cacheparameters toGenerator.update_weights()wait_for_pendingreset_cacheTest Plan