-
Notifications
You must be signed in to change notification settings - Fork 45
Add logger for hiopbbpy #739
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
base: develop
Are you sure you want to change the base?
Conversation
here is one example of the log: hiopbbpy Problem name: LpNormProblem |
|
||
y_train_virtual = y_train.copy() # old training + batch_size num of virtual points | ||
for j in range(self.batch_size): | ||
# Get a new sample point | ||
self.logger.scalars(f"In batch {j+1}/{self.batch_size}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not the batch number but rather the j
th point of a given batch. In batch {j+1}/{self.batch_size}
is misleading.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get this point. j in range(self.batch_size)
--> should j mean the batch number? in my example above, this line prints the lines of
hiopbbpy In batch 1/2
hiopbbpy In batch 2/2
self.logger.critical("===================================") | ||
self.logger.critical("Bayesian Optimization completed") | ||
self.logger.critical(f"Total evaluations: {len(self.y_hist)}") | ||
self.logger.critical(f"Optimal at BO iteration: {self.idx_opt//self.batch_size+1} ") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the batch_size is self.y_hist
are obtained in the first BO iteration and so self.idx_opt being
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get this.
if batch_size = 5, and idx_opt = 2, it means the optimal point was obtained in the 1st BO iteration, doesn't it?
The equation used here is a floor division, and hence {self.idx_opt//self.batch_size+1} = 2//5+1 = 0+1 = 1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See inline comments below for requests of more descriptive logging messages. Overall great addition!
4a0faee
to
95014bf
Compare
implement a logger using the code from https://docs.python.org/3/library/logging.html
CLOSE #717