# tf_agents.utils.common.save_spec

<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/utils/common.py#L1238-L1256) |

Saves the given spec nest as a StructProto.

    tf_agents.utils.common.save_spec(
        spec, file_path
    )

> [!NOTE]
> **Note:** Currently this will convert BoundedTensorSpecs into regular TensorSpecs.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `spec` | A nested structure of TensorSpecs. |
| `file_path` | Path to save the encoded spec to. |

<br />