-
Notifications
You must be signed in to change notification settings - Fork 48
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
wip: all the 20 plus PRs in one commit #226
base: main
Are you sure you want to change the base?
wip: all the 20 plus PRs in one commit #226
Conversation
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.
Added some comments. Please incorporate them when you split the PR.
kwargs["args"] = args | ||
kwargs["state"] = state | ||
kwargs["control"] = control |
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.
Do we need to construct a new kwargs for this? Isn't just passing them in _actions_on_event just enough?
"on_step_end", | ||
"on_epoch_begin", | ||
"on_epoch_end", | ||
"on_prediction_step", | ||
"on_predict", | ||
"on_log", | ||
"on_train_end", | ||
"on_train_begin", | ||
"on_evaluate", | ||
"on_save", |
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.
isn't doing this only on on_init_end
sufficient?
logger = logging.get_logger(__name__) | ||
logger.setLevel(level=logging.DEBUG) | ||
|
||
VALID_LOG_LEVELS = { |
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.
if self.log_level == logging.ERROR: | ||
logger.error(log_msg) | ||
elif self.log_level == logging.WARNING: | ||
logger.warning(log_msg) | ||
elif self.log_level == logging.INFO: | ||
logger.info(log_msg) | ||
elif self.log_level == logging.DEBUG: | ||
logger.debug(log_msg) |
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.
Can't we use a function like https://github.com/python/cpython/blob/b93386e1c4dbc871148e081ae147f7d1e8d21444/Lib/logging/__init__.py#L1594 instead?
Signed-off-by: Harikrishnan Balagopal <[email protected]>
a75e709
to
3abea36
Compare
Description of the change
Related issue number
How to verify the PR
Was the PR tested