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

Update log extension #420

Merged

Conversation

bwheelz36
Copy link
Collaborator

This is a fix for #325. For a small issue it turned out to be quite a lot of work!

This is quite a "hard" change: any time logs are written, the code will always use the "log" extension, regardless of what the user entered.
Reading the logs functions as before, which means the code will still be able to read in old log files.

@bwheelz36 bwheelz36 requested a review from till-m May 11, 2023 07:48
@codecov-commenter
Copy link

codecov-commenter commented May 11, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.36 ⚠️

Comparison is base (698ca60) 98.58% compared to head (6a17ba4) 98.23%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #420      +/-   ##
==========================================
- Coverage   98.58%   98.23%   -0.36%     
==========================================
  Files           8        8              
  Lines         565      566       +1     
  Branches       83       83              
==========================================
- Hits          557      556       -1     
- Misses          4        5       +1     
- Partials        4        5       +1     
Impacted Files Coverage Δ
bayes_opt/util.py 96.42% <100.00%> (-1.42%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@bwheelz36
Copy link
Collaborator Author

I can't really understand this failed codecov test...

Copy link
Member

@till-m till-m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I never got around to reading the original issue before, but imo it is not necessary to force a specific file extension. That being said, if we want to force .log (which is a reasonable extension to use), then the PR looks good to me.

I wouldn't worry about the minor change in coverage, personally.

@bwheelz36
Copy link
Collaborator Author

you are probably right, forcing it is probably over the top.

so you think we could just leave it to the user to handle the extension? or perhaps put a keyword variable in the JSONLogger.__init__ extension=log?

@till-m
Copy link
Member

till-m commented May 12, 2023

so you think we could just leave it to the user to handle the extension?

In my opinion, yes. I think most storing API's in python handle it like that, e.g. np.savetxt or pickle.

IMO, the best thing would be to make all our examples/documentation use .log, but otherwise let the user decide based on the input string.

@bwheelz36
Copy link
Collaborator Author

Ok, I've made it now so it will simply call the log file exactly what the user calls it, and (I think) I've updated all docs such that .log extension is used...

@bwheelz36 bwheelz36 merged commit 0d5105d into bayesian-optimization:master May 15, 2023
4 checks passed
@bwheelz36 bwheelz36 deleted the update_log_extension branch May 15, 2023 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants