Some games might require additional (possibly non-tensor) data to be passed to the agents. This PR supports this by using a custom Batch class that incapsulates the existing elements of a batch + a dictionary of arbitrary data.
Backwards compatibility is provided with a function that generates a Batch element from a tuple of tensors, as this is the current format for batched data in EGG.
Please note that in this implementation a label parameter is now made optional as it is not always needed e.g. in reconstruction games.
How Has This Been Tested?
doctest pass. UTs are failing as a change in EGG games and agents (+ existing implementations in egg/zoo) should be added
TODO:
[x] handle concatenating the aux field of a batch when batch interactions are aggregated at the end of each epoch
[x] change signature of games and agents forward pass
Description
Add support for custom batches.
Related Issue (if any)
159
Motivation and Context
Some games might require additional (possibly non-tensor) data to be passed to the agents. This PR supports this by using a custom Batch class that incapsulates the existing elements of a batch + a dictionary of arbitrary data.
Backwards compatibility is provided with a function that generates a Batch element from a tuple of tensors, as this is the current format for batched data in EGG.
Please note that in this implementation a label parameter is now made optional as it is not always needed e.g. in reconstruction games.
How Has This Been Tested?
doctest pass. UTs are failing as a change in EGG games and agents (+ existing implementations in egg/zoo) should be added
TODO: