View source on GitHub |
Distributed in memory tf.Variable store based on Reverb.
tf_agents.experimental.distributed.ReverbVariableContainer(
server_address: Text, table_names: Iterable[Text] = (DEFAULT_TABLE,)
)
This is just a client. The server needs to be consructed and held separately.
Methods
pull
pull(
table: Text = DEFAULT_TABLE
) -> tf_agents.typing.types.NestedTensor
Pulls values from a Reverb table and returns them as nested tensors.
push
push(
values: tf_agents.typing.types.NestedTensor
,
table: Text = DEFAULT_TABLE
) -> None
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
update(
variables: tf_agents.typing.types.NestedVariable
,
table: Text = DEFAULT_TABLE
) -> None
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. |