bayesian-optimization / BayesianOptimization

A Python implementation of global optimization with gaussian processes.
https://bayesian-optimization.github.io/BayesianOptimization/index.html
MIT License
7.89k stars 1.54k forks source link

Fix apply enum #505

Closed phi-friday closed 1 month ago

phi-friday commented 3 months ago

When I looked at where Events is used, I realized that it would be better to inherit from Enum.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 88.88889% with 2 lines in your changes missing coverage. Please review.

Project coverage is 96.01%. Comparing base (aed6a25) to head (89f65dc). Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
bayes_opt/event.py 90.90% 1 Missing :warning:
bayes_opt/logger.py 80.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #505 +/- ## ========================================== - Coverage 96.19% 96.01% -0.18% ========================================== Files 10 10 Lines 867 879 +12 ========================================== + Hits 834 844 +10 - Misses 33 35 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

till-m commented 1 month ago

Hey @phi-friday,

You're right that enums should be used, but the current Logger setup has deeper issues beyond that. The ScreenLogger, JSONLogger, etc., aren't working well for several reasons. I’d prefer a full overhaul, moving away from the observer pattern entirely, so from my perspective this PR isn’t worth merging as a quick fix.

phi-friday commented 1 month ago

i agree.