Provides information about original request to Session.Run() function.
SessionRunHook objects can stop the loop by calling request_stop() of
run_context. In the future we may use this object to add more information
about run without changing the Hook API.
Attributes
original_args
A SessionRunArgs object holding the original arguments of run().
If user called MonitoredSession.run(fetches=a, feed_dict=b), then this
field is equal to SessionRunArgs(a, b).
session
A TensorFlow session object which will execute the run.
stop_requested
Returns whether a stop is requested or not.
If true, MonitoredSession stops iterations.
Returns:
A bool
[null,null,["Last updated 2023-10-06 UTC."],[],[],null,["# tf.estimator.SessionRunContext\n\n\u003cbr /\u003e\n\n|-----------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.13.1/tensorflow/python/training/session_run_hook.py#L210-L259) |\n\nProvides information about the `session.run()` call being made. (deprecated)\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.estimator.SessionRunContext`](https://www.tensorflow.org/api_docs/python/tf/estimator/SessionRunContext), [`tf.compat.v1.train.SessionRunContext`](https://www.tensorflow.org/api_docs/python/tf/estimator/SessionRunContext)\n\n\u003cbr /\u003e\n\n tf.estimator.SessionRunContext(\n original_args, session\n )\n\n| **Deprecated:** THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use tf.keras instead.\n\nProvides information about original request to `Session.Run()` function.\nSessionRunHook objects can stop the loop by calling `request_stop()` of\n`run_context`. In the future we may use this object to add more information\nabout run without changing the Hook API.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Attributes ---------- ||\n|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `original_args` | A `SessionRunArgs` object holding the original arguments of `run()`. \u003cbr /\u003e If user called `MonitoredSession.run(fetches=a, feed_dict=b)`, then this field is equal to SessionRunArgs(a, b). |\n| `session` | A TensorFlow session object which will execute the `run`. |\n| `stop_requested` | Returns whether a stop is requested or not. \u003cbr /\u003e If true, `MonitoredSession` stops iterations. Returns: A `bool` |\n\n\u003cbr /\u003e\n\nMethods\n-------\n\n### `request_stop`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v2.13.1/tensorflow/python/training/session_run_hook.py#L253-L259) \n\n request_stop()\n\nSets stop requested field.\n\nHooks can use this function to request stop of iterations.\n`MonitoredSession` checks whether this is called or not."]]