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
remove \ in cache_dir #110945
remove \ in cache_dir #110945
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/110945
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 35719b6 with merge base 2bc1378 (): This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@pytorchbot label "topic: not user facing" |
@taomiao can you explain where the backslash is coming from? Is it for win, for example? If so, should we be using os.path.join to form the path? |
81dafde
to
cfe7872
Compare
@masnesral getpass.getuser() return username like "ORG\user1", This kind of username is more common among institutional users. This happens in both windows and linux. |
Oh, ok. Thanks for explaining. In that case, probably we should apply the \ replacement only to the user string portion. And since you're changing this code, would you mind switching it to use os.path.join rather that hard-coding the front slash? |
cfe7872
to
4d91f61
Compare
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.
nit: The formatting looks weird; perhaps you can fix before landing (I would have expected the linter to fix). But the logic looks good otherwise. Thanks for the changes.
7cebbf2
to
61b08d0
Compare
ok |
@shunting314 Do you have a minute for 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.
LG!
Merge failedReason: Comment with id 1765974981 not found Details for Dev Infra teamRaised by workflow job |
@cpuhrsch ok to be merged. |
@taomiao FYI when the PR is approved by a team member, you can merge yourself by posting "@pytorchbot merge" 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.
I'm not sure I agree with this PR.
Do we really care about "ORG\user1" usernames? Then what about other symbols that can be in usernames but not in paths?
Also the current PR will map "ORG\user1" and "ORGuser1" to the same dir.
So I'm not sure if we really care about this use case.
And if we do care, this needs to be done in a more generic and robust way.
I'm not sure if there's a canonical way to sanitize the string to make it appropriate for paths. Maybe something like this is a bit more generic:
|
Some usernames do cause inductor's cache directory path "can not be found". This kind of error will make uninformed users feel baffled. Sure if there's a canonical way to sanitize the string to make it appropriate for paths would be better. |
Ok |
6e9abd7
to
bc7dc2e
Compare
You don't have permissions to rebase this PR since you are a first time contributor. If you think this is a mistake, please contact PyTorch Dev Infra. |
bc7dc2e
to
91f9353
Compare
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 2 mandatory check(s) failed. The first few are: Dig deeper by viewing the failures on hud |
91f9353
to
a585e7e
Compare
a585e7e
to
35719b6
Compare
@kit1980 changed to more generic. |
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Fixes #110933
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @aakhundov @ColinPeppler