This is just a client. The server needs to be consructed and held separately.
Args
server_address
The address of the Reverb server.
table_names
Table names. By default, it is assumed that only a single
table is used with the name variables. Each table assumed to exist in
the server, has signature defined, and set the capacity to 1.
Raises
KeyError
If a table is not defined in the server, but listed in tables.
TypeError
If no signature is provided for a table.
ValueError
If the max_size of the table corresponding to table_name(s)
on the server is not equal to 1.
If the nested structure of the variable
does not match the signature of the table. This includes structural
differences (excluding the type differences of sequences in nest), and
type differences.
Updates variables using values pulled from a Reverb table.
Args
variables
Nested structure of variables.
table
The name of the table.
Raises
KeyError
If the table name is not provided during construction time.
ValueError
If the nested structure of the variable does not match the
signature of the table. This includes structural differences (excluding
the type differences of sequences in nest), and type differences.
[null,null,["Last updated 2024-04-26 UTC."],[],[],null,["# tf_agents.experimental.distributed.ReverbVariableContainer\n\n\u003cbr /\u003e\n\n|-----------------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/agents/blob/v0.19.0/tf_agents/experimental/distributed/reverb_variable_container.py#L41-L154) |\n\nDistributed in memory tf.Variable store based on Reverb.\n\n#### View aliases\n\n\n**Main aliases**\n\n[`tf_agents.experimental.distributed.reverb_variable_container.ReverbVariableContainer`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/experimental/distributed/ReverbVariableContainer)\n\n\u003cbr /\u003e\n\n tf_agents.experimental.distributed.ReverbVariableContainer(\n server_address: Text, table_names: Iterable[Text] = (DEFAULT_TABLE,)\n )\n\nThis is just a client. The server needs to be consructed and held separately.\n| **Note:** The container stores nests of variables in dedicated tables in a Reverb server. It is assumed that the server is running, the tables for variable container exist and are configured properly (i.e. it have signature defined and the `max_size=1`).\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `server_address` | The address of the Reverb server. |\n| `table_names` | Table names. By default, it is assumed that only a single table is used with the name `variables`. Each table assumed to exist in the server, has signature defined, and set the capacity to 1. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ------ ||\n|--------------|------------------------------------------------------------------------------------------------|\n| `KeyError` | If a table is not defined in the server, but listed in tables. |\n| `TypeError` | If no signature is provided for a table. |\n| `ValueError` | If the `max_size` of the table corresponding to table_name(s) on the server is not equal to 1. |\n\n\u003cbr /\u003e\n\nMethods\n-------\n\n### `pull`\n\n[View source](https://github.com/tensorflow/agents/blob/v0.19.0/tf_agents/experimental/distributed/reverb_variable_container.py#L117-L122) \n\n pull(\n table: Text = DEFAULT_TABLE\n ) -\u003e ../../../tf_agents/typing/types/NestedTensor\n\nPulls values from a Reverb table and returns them as nested tensors.\n\n### `push`\n\n[View source](https://github.com/tensorflow/agents/blob/v0.19.0/tf_agents/experimental/distributed/reverb_variable_container.py#L85-L115) \n\n push(\n values: ../../../tf_agents/typing/types/NestedTensor,\n table: Text = DEFAULT_TABLE\n ) -\u003e None\n\nPushes values into a Reverb table.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ||\n|----------|------------------------------|\n| `values` | Nested structure of tensors. |\n| `table` | The name of the table. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ||\n|---------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `KeyError` | If the table name is not provided during construction time. |\n| [`tf.errors.InvalidArgumentError`](https://www.tensorflow.org/api_docs/python/tf/errors/InvalidArgumentError) | If the nested structure of the variable does not match the signature of the table. This includes structural differences (excluding the type differences of sequences in nest), and type differences. |\n\n\u003cbr /\u003e\n\n### `update`\n\n[View source](https://github.com/tensorflow/agents/blob/v0.19.0/tf_agents/experimental/distributed/reverb_variable_container.py#L124-L139) \n\n update(\n variables: ../../../tf_agents/typing/types/NestedVariable,\n table: Text = DEFAULT_TABLE\n ) -\u003e None\n\nUpdates variables using values pulled from a Reverb table.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ||\n|-------------|--------------------------------|\n| `variables` | Nested structure of variables. |\n| `table` | The name of the table. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ||\n|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `KeyError` | If the table name is not provided during construction time. |\n| `ValueError` | If the nested structure of the variable does not match the signature of the table. This includes structural differences (excluding the type differences of sequences in nest), and type differences. |\n\n\u003cbr /\u003e"]]