Closed sebimarkgraf closed 2 years ago
Thanks for the proposed fix! Can you change it so that it uses namedtuple still before 3.9? I tried to namedtuple for every case where things are getting created & destroyed in each iteration, and ideally would benefit from the lighter wrapper (of namedtuple compared to dataclass).
I've changed it to use the NamedTuple from typing extensions. In 3.11 this will be officially supported: https://github.com/python/cpython/pull/92027
I am not sure about the performance benefits, this strongly depends on the use case and would probably need profiling here.
Thanks!
This fixes https://github.com/facebookresearch/denoised_mdp/issues/4 by changing the namedtuple to a dataclass.