Closed d7919 closed 2 months ago
Hi @d7919,
regarding the cause for the issue, good catch, this should indeed be fixed. Thanks for providing a PR!
side note
you raise some good points:
Choose the two colours in use -- for me the default Black is unreadable due to the colour of my terminal background.
I think it would make sense to replace Fore.BLACK
with Fore.RESET
in general. What do you think? This would probably alleviate the issue for most cases and be relatively low effort. However, if you feel strongly about making the ScreenLogger
more flexible/customizable (turning colours off or using different colours), and are willing submit a PR for this, I will gladly review and merge it :)
I will close this for now
In
_step
of logger, the colour remains active after the line is displayed, i.e. it is not reset.https://github.com/bayesian-optimization/BayesianOptimization/blob/3a5e56c7d0f96affdebfebc318b02f71f0462be3/bayes_opt/logger.py#L166
If the user's function has any output or if the system displays any output this will inherit the colour of the last output. This can also potentially cause issues if the user kills the job mid-run leaving the colour code active.
Changing this line to
is perhaps a bit "safer" and has the minor advantage of not colouring the
|
column separators.On a side note, it would be helpful if the user could: