def after_run(self, run_context, run_values):
    result = (run_values.results['monitors'] if ('monitors' in run_values.results) else {})
    for m in self._monitors:
        induce_stop = m.step_end(self._last_step, result)
        if induce_stop:
            run_context.request_stop()
    for m in self._monitors:
        m.post_step(self._last_step, run_context.session)
    self._last_step = (run_values.results[self._global_step_tensor] + 1)
def after_run(self, run_context, run_values):
    result = (run_values.results['monitors'] if ('monitors' in run_values.results) else {})
    for m in self._monitors:
        induce_stop = m.step_end(self._last_step, result)
        if induce_stop:
            run_context.request_stop()
    for m in self._monitors:
        m.post_step(self._last_step, run_context.session)
    self._last_step = (run_values.results[self._global_step_tensor] + 1)