Skip to content
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

Ray.tune.impl.tuner_internal.py #28402

Closed
ChVo24 opened this issue Sep 9, 2022 · 3 comments · Fixed by #28404
Closed

Ray.tune.impl.tuner_internal.py #28402

ChVo24 opened this issue Sep 9, 2022 · 3 comments · Fixed by #28404
Assignees
Labels
bug Something that is supposed to be working; but isn't P1 Issue that should be fixed within a few weeks

Comments

@ChVo24
Copy link

ChVo24 commented Sep 9, 2022

What happened + What you expected to happen

Restoring the Tuner Trials on Windows yields FileExistsError. Solution would be in _restore_from_path_or_uri():

Adding in file tuner_internal.py, in function _restore_from_path_or_uri after line 217 within the loop:
if os.path.isfile(new_exp_path / file_dir.name):
os.remove(new_exp_path / file_dir.name)

Versions / Dependencies

OS: Windows 10
Python: 3.8
Ray: 2.0.0

Reproduction script

Solution is already available in Bug description. This is an OS dependent error caused by rename(), because it works different on OS's.

Issue Severity

No response

@ChVo24 ChVo24 added bug Something that is supposed to be working; but isn't triage Needs triage (eg: priority, bug/not-bug, and owning component) labels Sep 9, 2022
@krfricke
Copy link
Contributor

krfricke commented Sep 9, 2022

I think we can just use file_dir.replace instead of file_dir.rename. Do you want to file a quick PR for that? Otherwise I'm happy to do it.

@krfricke krfricke added P1 Issue that should be fixed within a few weeks and removed triage Needs triage (eg: priority, bug/not-bug, and owning component) labels Sep 9, 2022
@ChVo24
Copy link
Author

ChVo24 commented Sep 9, 2022

Indeed replace would also work! Great, would be nice if you could do that :)

@krfricke
Copy link
Contributor

krfricke commented Sep 9, 2022

Sure thing! Here we go: #28404 - will be merged later today. And thanks for raising this issue!

@krfricke krfricke self-assigned this Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is supposed to be working; but isn't P1 Issue that should be fixed within a few weeks
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants