From bee533c4103a4422a20f452d6895334c132b3939 Mon Sep 17 00:00:00 2001 From: daniel <1534513+dantp-ai@users.noreply.github.com> Date: Tue, 16 Apr 2024 17:08:55 +0200 Subject: [PATCH] Allow two (same/different) Batch objs to be tested for equality #1098 --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 126f81a89..786ec1691 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ - Trainers can control whether collectors should be reset prior to training. #1063 - Convenience constructor for `CollectStats` called `with_autogenerated_stats`. #1063 - `SamplingConfig` supports `batch_size=None`. #1077 +- Batch received new method: `to_numpy_`. #1098 +- `to_dict` in Batch supports also non-recursive conversion. #1098 ### Internal Improvements - `Collector`s rely less on state, the few stateful things are stored explicitly instead of through a `.data` attribute. #1063 @@ -34,6 +36,7 @@ expicitly or pass `reset_before_collect=True` . #1063 - Changed interface of `dist_fn` in `PGPolicy` and all subclasses to take a single argument in both continuous and discrete cases. #1032 - `utils.net.common.Recurrent` now receives and returns a `RecurrentStateBatch` instead of a dict. #1077 +- The method `to_numpy` in `data.utils.batch.Batch` is not in-place anymore. Instead, a new method `to_numpy_` does the conversion in-place. #1098 ### Tests - Fixed env seeding it test_sac_with_il.py so that the test doesn't fail randomly. #1081