-
-
Notifications
You must be signed in to change notification settings - Fork 965
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
Journal storage does not work with "A required privilege is not held by the client". #4298
Comments
It sounds like a windows-specific problem, ref https://answers.microsoft.com/en-us/windows/forum/all/how-to-fix-problem-a-required-privilege-is-not/d206b4b3-b6c2-4b0b-8629-5d4dfcb8f8d0 (so I believe that this is not the bug). According to #4151 (review), using developer mode might resolve the issue. |
Thank you for comment. However, not everyone can change permissions such as when the PC is managed by an organization, so if there is any way to improve this, please consider it. If necessary, I will create a PR with this added to the JournalStorage documentation. |
@toshihikoyanase @c-bata Do you have any opinion on #4298 (comment)? |
@hrntsm Thank you for using the beta release of Optuna 3.1!
Sounds great! I think @toshihikoyanase also ran into the similar permission issue and used the developer mode. As another workaround, you may be able to use JournalFileOpenLock like the following since it doesn't rely on import optuna
from optuna.storages import JournalStorage, JournalFileStorage, JournalFileOpenLock
file_path = "./journal.log"
lock_obj = JournalFileOpenLock(file_path)
storage =JournalStorage(JournalFileStorage(file_path, lock_obj=lock_obj)) Could you try the above code? |
@c-bata |
Thank you for your investigation. It would be great! |
Let me close this issue since #4308 was merged. Thank you again for the report! |
Expected behavior
When I tried to use journal storage with Optuna 3.1.0b0, it did not work with the error "A required privilege is not held by the client".
How can I use it?
Environment
Error messages, stack traces, or logs
Steps to reproduce
pip install optuna==3.1.0b0
Additional context (optional)
When I executed the same code in the following environment, it worked fine. Is it necessary to do something different in Windows?
The text was updated successfully, but these errors were encountered: