-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Create jiterator cache dirs recursively #74425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
CI Flow Status⚛️ CI FlowRuleset - Version:
|
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit 9eaa946 (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Please report bugs/suggestions to the (internal) Dr. CI Users group. |
| dir.pop_back(); | ||
| } | ||
|
|
||
| return _r_mkdir(base+dir); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove the trailing slashes?
Doesn't base need to end with a slash if dir is appended to it like this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right that a forward slash is indeed needed and in the currently used code the dir provides it here.
However, it might be a better idea to either:
- allow two forward slashes in the path between
baseanddir(it should be ignored if it's not at the beginning of a path if I'm not mistaken) and remove the deletion inbase - check if
basecontains the/at the end ordirat the beginning and only keep one.
Let me know which approach sounds better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha, thank you. I suppose it's fine, then, and I don't know if it's interesting to try and "fix" user paths.
We should add a test that the cache is working, however. Not for this PR, necessarily, but @ngimel and I were thinking that a simple test which calls a jiterated kernel and then checks that the directory contains a file would be a good sanity check.
mruberry
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ptrblck!
|
@pytorchbot merge this please |
|
Hey @ptrblck. |
|
Had to revert change as it caused a lots of internal failures, where there are stronger Re-landing (with minimal changes) in #74592 |
|
@pytorchbot revert this |
|
Reverting PR 74425 failed due to 'nodyText' |
|
@pytorchbot revert this |
This reverts commit 6f05edd. Reverted #74425 on behalf of https://github.com/malfet
Fixes #74415 @mruberry The change expects the base directories (`HOME/TEMP`, `XDG_CACHE_HOME`, or the user-defined `PYTORCH_KERNEL_CACHE_PATH`) to exist to avoid potentially exploiting the recursive folder creation. Let me know, if this is not a concern from your side and this PR should be simplified. Pull Request resolved: #74425 Approved by: https://github.com/mruberry
Summary: Reland of #74425 with internal compilation error fixed The change expects the base directories (`HOME/TEMP`, `XDG_CACHE_HOME`, or the user-defined `PYTORCH_KERNEL_CACHE_PATH`) to exist to avoid potentially exploiting the recursive folder creation. Pull Request resolved: #74592 Reviewed By: mruberry Differential Revision: D35066710 Pulled By: malfet fbshipit-source-id: c26aff826b0a3d6ca99286b031711698a515fbbb
Summary: Reland of #74425 with internal compilation error fixed The change expects the base directories (`HOME/TEMP`, `XDG_CACHE_HOME`, or the user-defined `PYTORCH_KERNEL_CACHE_PATH`) to exist to avoid potentially exploiting the recursive folder creation. Pull Request resolved: #74592 Reviewed By: mruberry Differential Revision: D35066710 Pulled By: malfet fbshipit-source-id: c26aff826b0a3d6ca99286b031711698a515fbbb (cherry picked from commit 99479e5)
Fixes #74415 @mruberry The change expects the base directories (`HOME/TEMP`, `XDG_CACHE_HOME`, or the user-defined `PYTORCH_KERNEL_CACHE_PATH`) to exist to avoid potentially exploiting the recursive folder creation. Let me know, if this is not a concern from your side and this PR should be simplified. Pull Request resolved: #74425 Approved by: https://github.com/mruberry
This reverts commit 6f05edd. Reverted #74425 on behalf of https://github.com/malfet
Summary: Reland of #74425 with internal compilation error fixed The change expects the base directories (`HOME/TEMP`, `XDG_CACHE_HOME`, or the user-defined `PYTORCH_KERNEL_CACHE_PATH`) to exist to avoid potentially exploiting the recursive folder creation. Pull Request resolved: #74592 Reviewed By: mruberry Differential Revision: D35066710 Pulled By: malfet fbshipit-source-id: c26aff826b0a3d6ca99286b031711698a515fbbb (cherry picked from commit 99479e5)
It caused a number of internal only compilation failures, for example see: #74425 (comment) and #74542 (comment)
It caused a number of internal only compilation failures, for example see: #74425 (comment) and #74542 (comment)
It caused a number of internal only compilation failures, for example see: #74425 (comment) and #74542 (comment)
It caused a number of internal only compilation failures, for example see: #74425 (comment) and #74542 (comment)
It caused a number of internal only compilation failures, for example see: #74425 (comment) and #74542 (comment)
It caused a number of internal only compilation failures, for example see: #74425 (comment) and #74542 (comment)
It caused a number of internal only compilation failures, for example see: #74425 (comment) and #74542 (comment) [ghstack-poisoned]
It caused a number of internal only compilation failures, for example see: #74425 (comment) and #74542 (comment) [ghstack-poisoned]
It caused a number of internal only compilation failures, for example see: #74425 (comment) and #74542 (comment) [ghstack-poisoned]
It caused a number of internal only compilation failures, for example see: #74425 (comment) and #74542 (comment) ghstack-source-id: 70e3ddd Pull Request resolved: #75085
It caused a number of internal only compilation failures, for example see: #74425 (comment) and #74542 (comment) [ghstack-poisoned]
It caused a number of internal only compilation failures, for example see: #74425 (comment) and #74542 (comment) [ghstack-poisoned]
It caused a number of internal only compilation failures, for example see: #74425 (comment) and #74542 (comment) ghstack-source-id: 8db31ff Pull Request resolved: #75085
It caused a number of internal only compilation failures, for example see: #74425 (comment) and #74542 (comment) [ghstack-poisoned]
It caused a number of internal only compilation failures, for example see: #74425 (comment) and #74542 (comment) [ghstack-poisoned]
It caused a number of internal only compilation failures, for example see: #74425 (comment) and #74542 (comment) ghstack-source-id: 14889fa Pull Request resolved: #75085
It caused a number of internal only compilation failures, for example see: #74425 (comment) and #74542 (comment) Pull Request resolved: #75085 Approved by: https://github.com/ngimel, https://github.com/albanD
Summary: It caused a number of internal only compilation failures, for example see: #74425 (comment) and #74542 (comment) Pull Request resolved: #75085 Approved by: https://github.com/ngimel, https://github.com/albanD Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/90a56fc515dbac9534a1a14110f9edf089430f81 Reviewed By: b0noI Differential Revision: D35404322 Pulled By: malfet fbshipit-source-id: aaa7033d0b7cbfcc1d4b3eeff86d09eba428f068
Fixes #74415
@mruberry
The change expects the base directories (
HOME/TEMP,XDG_CACHE_HOME, or the user-definedPYTORCH_KERNEL_CACHE_PATH) to exist to avoid potentially exploiting the recursive folder creation.Let me know, if this is not a concern from your side and this PR should be simplified.