# tf_agents.system.multiprocessing.OpenAIGymStateSaver

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/agents/blob/v0.19.0/tf_agents/system/system_multiprocessing.py#L296-L309) |

Sets and restores OpenAI gym registry.

Inherits From: [`StateSaver`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/system/default/multiprocessing_core/StateSaver)

#### View aliases


**Main aliases**

[`tf_agents.system.system_multiprocessing.OpenAIGymStateSaver`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/system/multiprocessing/OpenAIGymStateSaver)

<br />

## Methods

### `collect_state`

[View source](https://github.com/tensorflow/agents/blob/v0.19.0/tf_agents/system/system_multiprocessing.py#L299-L300)

    collect_state()

### `restore_state`

[View source](https://github.com/tensorflow/agents/blob/v0.19.0/tf_agents/system/system_multiprocessing.py#L302-L309)

    restore_state(
        state
    )