Add unit tests for state
What does the code in the MR do ?
Same as !137 (merged) this MR proposes to add unit tests for the State
class.
It also fixes a bug when a State
/ DAG
has no individual variable: there is an empty sum in the nll terms which returns a float zero instead of a tensor zero, which crashes later on.
Finally, it makes the LatentVaribaleInitType
enumeration a bit more convenient to use by also allowing specifying the method as a string.
Where should the reviewer start ?
How can the code be tested ?
When is the MR due for? (review deadline)
What issues are linked to the MR ?
Edited by Nicolas Gensollen