You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""The backend used within a `Context` can be temporarily changed. This method changes the model's backend, while saving the current settings in the `self._backend_stack`."""
201
-
self._backend_stack.append(self.backend)
202
-
self.backend=new_backend
203
-
204
-
def_pop_model_state(self) ->bool:
205
-
"""Pops the model state.
206
-
207
-
The backend and model options used within a `Context` can be temporarily changed by pushing and popping from the model state.
208
-
This function restores the model's previous backend and model_opts from the `self._backend_stack`.
209
-
210
-
Question: should this logic be moved into context? I really want to keep `Session` as simple as possible... see true motivation in the docstring for the class.
0 commit comments