tf_agents.experimental.distributed.ReverbVariableContainer

Distributed in memory tf.Variable store based on Reverb.

This is just a client. The server needs to be consructed and held separately.

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.

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.

Methods

pull

View source

Pulls values from a Reverb table and returns them as nested tensors.

push

View source

Pushes values into a Reverb table.

Args
values Nested structure of tensors.
table The name of the table.

Raises
KeyError If the table name is not provided during construction time.
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.

update

View source

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.