-
Notifications
You must be signed in to change notification settings - Fork 376
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
On Windows, prevent long trial directory names #735
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Hey @tg2k, are you still interested in moving this forward? The argument should either be a function or |
Thanks @jmoralez, I hadn't realized. I pushed another change that may help. |
@jmoralez It's been about 3 months since I made a stab at a Windows environment, so my memory in this is a little fuzzy, and I don't have a reproducible example. I believe my Windows-side directory path was 21 characters long. As an example of a Windows path that could be created, from #526 (comment) you can see a path like
which is about 279 characters long. Windows maxes out at 260 characters unless you enable extended-length paths (as shown on that page), but for the most part support for those long paths is weak in Windows. You can see from the example above that the default behavior encodes a lot of parameters into the path. If you have a long enough base path, or enough parameters (such as exogenous variables), you'll push the path over the limit (unless Ray-Tune has changed how it creates paths on Windows in the meantime). |
I can reproduce too long filenames on Windows 11, but it doesn't error on my machine - Ray gives a warning that the filename exceeds 260 characters. The code to give Ray >260 character file dir names is a bit hacky, @jose-moralez do you want me to give an example for that? It's basically the below code, inserted at this point. This ensures that the file directory of the notebook/file that is ran is used to write Ray's results rather than the default Ray results directory, resulting in excessive file dir path lengths:
Subsequently, I can confirm the fix proposed in this PR does reduce the file dir name and shows that the file dir name will be correctly reduced on my machine. Ray also no longer provides a warning that the file dir name is too long. So it does 'fix' the long file dir name, but I could not reproduce the error before applying the fix, although I could (with the code above) reproduce the 'too long file dir name' on Windows with Ray. A potential issue with the fix of this PR is that I'd propose to apply the PR, it seems to fix the issue. |
On Windows, prevent long trial directory names (ray-project/ray#29586, #526).