Resets resource containers on `target`, and close all connected sessions. A resource container is distributed across all workers in the same cluster as `target`. When a resource container on `target` is reset, resources associated with that container will be cleared. In particular,
(target, containers=None, config=None)
| 1650 | |
| 1651 | @staticmethod |
| 1652 | def reset(target, containers=None, config=None): |
| 1653 | """Resets resource containers on `target`, and close all connected sessions. |
| 1654 | |
| 1655 | A resource container is distributed across all workers in the |
| 1656 | same cluster as `target`. When a resource container on `target` |
| 1657 | is reset, resources associated with that container will be cleared. |
| 1658 | In particular, all Variables in the container will become undefined: |
| 1659 | they lose their values and shapes. |
| 1660 | |
| 1661 | NOTE: |
| 1662 | (i) reset() is currently only implemented for distributed sessions. |
| 1663 | (ii) Any sessions on the master named by `target` will be closed. |
| 1664 | |
| 1665 | If no resource containers are provided, all containers are reset. |
| 1666 | |
| 1667 | Args: |
| 1668 | target: The execution engine to connect to. |
| 1669 | containers: A list of resource container name strings, or `None` if all of |
| 1670 | all the containers are to be reset. |
| 1671 | config: (Optional.) Protocol buffer with configuration options. |
| 1672 | |
| 1673 | Raises: |
| 1674 | tf.errors.OpError: Or one of its subclasses if an error occurs while |
| 1675 | resetting containers. |
| 1676 | """ |
| 1677 | if target is not None: |
| 1678 | target = compat.as_bytes(target) |
| 1679 | if containers is not None: |
| 1680 | containers = [compat.as_bytes(c) for c in containers] |
| 1681 | else: |
| 1682 | containers = [] |
| 1683 | tf_session.TF_Reset(target, containers, config) |
| 1684 | |
| 1685 | |
| 1686 | @tf_export(v1=['InteractiveSession']) |
no outgoing calls