Add session hook for benchmark metric logging. (#3672)
* Add session hook for benchmark metric logging. Current hook is very similar as the LoggingTensorHook. Some of the function are directly copied since the original one was not exposed for import. We should seek to eventually move this code to core when it is mature enough. * Update metric_hook to use LoggingTensorHook as base. The existing hook is similar enough to LoggingTensorHook, and we should eliminate duplicate as much as possible. * Address review comment. 1. Update global step tensor handle. 2. Update tests. 3. Update document. * Update tests for py3. * Fix lint error
Showing
Please register or sign in to comment