-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Support testing during training by ParallelExecutor. #9738
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
Conversation
93c8036
to
ea31b4d
Compare
num_threads=None, | ||
allow_op_delay=False): | ||
allow_op_delay=False, | ||
share_vars_from=None): |
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.
need comments and small examples for constructor
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.
Done.
main = main if main else framework.default_main_program() | ||
scope = executor.global_scope() | ||
|
||
local_scopes = share_vars_from.executor.local_scopes( |
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.
check share_vars_from type
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.
Done.
local_scopes = share_vars_from.executor.local_scopes( | ||
) if share_vars_from else [] | ||
|
||
vars = [ |
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.
call it persistable_vars? Does this include all vars needed? Or maybe it includes more vars than necessary? We can leave a TODO here so that we can have the right var collection here in the future?
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.
Or maybe it includes more vars than necessary
Now, this case is existing. The C++ code filters the non LoDTensor.
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.
@panyx0718 Thanks. Could I merge this PR? So other people can use this function. Your comments can be fixed in next PR.
local_scopes = share_vars_from.executor.local_scopes( | ||
) if share_vars_from else [] | ||
|
||
vars = [ |
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.
Or maybe it includes more vars than necessary
Now, this case is existing. The C++ code filters the non LoDTensor.
17788f6
to
f4caef0
Compare
f4caef0
to
f522797
Compare
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.
LGTM
Related to #9656