hotfix: add a switch to disable inplace pinning of tensors#68
Merged
blahgeek merged 3 commits intoDec 18, 2025
Merged
Conversation
blahgeek
approved these changes
Dec 18, 2025
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses issue #67 by adding a configuration switch to control the in-place pin memory feature for tensors stored in /dev/shm/. The feature is now opt-in rather than automatic, with use_inplace_pin_memory defaulting to False for safety.
- Added
use_inplace_pin_memoryparameter toParameterServer.register_checkpoint()method (defaults to False) - Modified
_register_checkpoint()to conditionally apply in-place pinning based on the new flag - Updated test cleanup to use
shutil.rmtree()instead ofos.removedirs()with clarifying comment
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| checkpoint_engine/ps.py | Added use_inplace_pin_memory parameter to control in-place pinning behavior, with corresponding logic changes and documentation |
| tests/test_update.py | Fixed test cleanup method from os.removedirs() to shutil.rmtree() and added comment explaining test requirement |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Anjie Hou <149605198+specture724@users.noreply.github.com>
0158e7a to
4a21b4f
Compare
blahgeek
pushed a commit
that referenced
this pull request
Dec 18, 2025
* feat: add a switch to disable inplace pinning of tensors * Update checkpoint_engine/ps.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Anjie Hou <149605198+specture724@users.noreply.github.com> * doc --------- Signed-off-by: Anjie Hou <149605198+specture724@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
issue #67
Add a switch
use_inplace_pin_memoryinParameterServer.register_checkpointto control the use of in-place pin memory feature. It isFalseby default