Uh oh!
There was an error while loading. Please reload this page.
read file in read mode - #1338
Conversation
PGijsbers
left a comment
There was a problem hiding this comment.
Thanks for catching this issue and setting up a pull request! There is an issue with casting avoid_duplicate_runs into a boolean, but otherwise it looks good! Would you be able to resolve that? Something like config.get("avoid_duplicate_runs", "").lower() == "true" is good enough for now I think.
Uh oh!
There was an error while loading. Please reload this page.
… boolean after reading it from config_file
BrunoBelucci
commented
May 13, 2024
@PGijsbers it is done =) |
Thanks! Found I had missed something, so I changed it a little after all. Also added a test. @LennartPurucker I know this isn't very pretty. But I don't think it will be without overwriting more of the config module which I would be in favor of but shouldn't be in this PR. Since I touched this PR now, could you sign off on it if you agree that we should apply the patch? |
PGijsbers
left a comment
There was a problem hiding this comment.
Changing my review status to indicate my earlier concerns are addressed and to make sure it can be merged later. Still need approval of a 2nd reviewer before merging as I now contributed to this PR.
LennartPurucker
commented
May 14, 2024
The tests seem to be failing due to a (test) server error. |
PGijsbers
commented
May 15, 2024
Yes this was deliberate. |
LennartPurucker
commented
May 15, 2024
I agree, feel free to merge! |
PGijsbers
commented
May 15, 2024
Thanks again @BrunoBelucci 👏 |
LennartPurucker
commented
May 15, 2024
Thank you @BrunoBelucci! |
Reference Issue
Fixes#1337
What does this PR implement/fix? Explain your changes.
It changes the mode that config_file is being opened, so it will not be overwritten. It also casts the variables of the config_file to the expected types, otherwise, everything is read as str.
How should this PR be tested?
1 - Create a new config file .../.config/openml/config
2 - do
import openml3 - check that the config file is preserved