bugfix: skip empty safetensors file in inplace_pin_memory#79
Merged
blahgeek merged 2 commits intoMoonshotAI:mainfrom Jan 20, 2026
Merged
bugfix: skip empty safetensors file in inplace_pin_memory#79blahgeek merged 2 commits intoMoonshotAI:mainfrom
blahgeek merged 2 commits intoMoonshotAI:mainfrom
Conversation
a9ad301 to
855adfa
Compare
blahgeek
reviewed
Jan 20, 2026
checkpoint_engine/ps.py
Outdated
Comment on lines
285
to
290
| if use_inplace_pin_memory is None: | ||
| env_str = os.getenv("PS_USE_INPLACE_PIN_MEMORY", "true") | ||
| use_inplace_pin_memory = env_str.lower() in ["true", "1", "yes", "y"] | ||
| logger.info( | ||
| f"[rank{self._rank}] use_inplace_pin_memory set to {use_inplace_pin_memory} by environment variable PS_USE_INPLACE_PIN_MEMORY={env_str}" | ||
| ) |
Collaborator
There was a problem hiding this comment.
I think we should properly add this option in RegisterRequest struct. Mixing function arguments and environment variables is not a good practice.
blahgeek
reviewed
Jan 20, 2026
| # We assume files in /dev/shm/ are temporary files. So it's safe to remove them after loading. | ||
| os.remove(file_path) | ||
| if not metas: | ||
| # TODO: should we still return this buffer? |
Collaborator
There was a problem hiding this comment.
Yeah skipping this buffer seems to be a better idea, to prevent future bugs. (not a hard requirement
855adfa to
5637572
Compare
5637572 to
b4bed4b
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.
No description provided.