-
Notifications
You must be signed in to change notification settings - Fork 3.1k
[AutoNLP]optimize log #5021
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
[AutoNLP]optimize log #5021
Changes from all commits
42af879
d4aa35e
842ee68
9010358
5ee48d6
4858d7d
c8af907
5091ee1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -156,25 +156,6 @@ def on_evaluate(self, args, state, control, **kwargs): | |
if self.tune.is_session_enabled() and metrics is not None and isinstance(metrics, dict): | ||
self.session.report(metrics) | ||
|
||
# report session metrics to Ray to track trial progress | ||
def on_epoch_end(self, args, state, control, **kwargs): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 输入并没有metrics There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. on_epoch_end 应该会返回一些训练方面的东西,例如loss, iter/s之类的训练指标,可以再看看 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 看起来trainer.py中on_epoch_end没有传入metrics,所以这个函数无法report任何东西 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 不过那些信息没什么用,不要也ok,可以删 |
||
if not state.is_world_process_zero: | ||
return | ||
|
||
metrics = kwargs.get("metrics", None) | ||
if self.tune.is_session_enabled() and metrics is not None and isinstance(metrics, dict): | ||
self.session.report(metrics) | ||
|
||
# forward trainer logs | ||
def on_log(self, args, state, control, logs=None, **kwargs): | ||
if not state.is_world_process_zero: | ||
return | ||
|
||
if logs is not None: | ||
# In AutoNLP's Ray setup, we pipe stdout to a stdout file for logging purposes | ||
# TODO: find a better way for this | ||
print(logs) | ||
|
||
|
||
INTEGRATION_TO_CALLBACK = { | ||
"visualdl": VisualDLCallback, | ||
|
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.
这样子能把所有的log都显示出来吗?如果可以的话,就太好了
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.
可以,并且可以区分info error warning
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.
赞
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.
再确认以下几个case:
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.
确认没有问题。