Thread local storage for the eager context.
| 172 | |
| 173 | |
| 174 | class _ThreadLocalData(threading.local): |
| 175 | """Thread local storage for the eager context.""" |
| 176 | |
| 177 | def __init__(self): |
| 178 | super(_ThreadLocalData, self).__init__() |
| 179 | self.device_spec = _starting_device_spec |
| 180 | self.device_name = "" |
| 181 | self.mode = default_execution_mode |
| 182 | self.is_eager = default_execution_mode == EAGER_MODE |
| 183 | self.scope_name = "" |
| 184 | self.summary_writer = None |
| 185 | self.summary_recording = None |
| 186 | self.summary_recording_distribution_strategy = True |
| 187 | self.summary_step = None |
| 188 | self.function_call_options = None |
| 189 | self.executor = None |
| 190 | |
| 191 | |
| 192 | ContextSwitch = collections.namedtuple( |