Skip to content

Commit

Permalink
Removed assert on OrderedDict (clashes with gymnasium 1), Changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Panchenko committed Aug 14, 2024
1 parent b2e1ae0 commit 94e097b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
23 changes: 20 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## Release 1.2.0

### Changes/Improvements

- trainer:
- Custom scoring now supported for selecting the best model. #1202

### Breaking Changes

- data:
- stats:
- `InfoStats` has a new non-optional field `best_score` which is used
for selecting the best model. #1202

## Release 1.1.0

### Highlights
Expand Down Expand Up @@ -89,9 +103,12 @@ A detailed list of changes can be found below.
correctly). #1074 #1131
- Add class `ExperimentCollection` for the convenient execution of
multiple experiment runs #1131
- The `World` object, containing all low-level objects needed for experimentation,
can now be extracted from an `Experiment` instance. This enables customizing
the experiment prior to its execution, bridging the low and high-level interfaces. #1187
- The `World` object, containing all low-level objects needed for
experimentation,
can now be extracted from an `Experiment` instance. This enables
customizing
the experiment prior to its execution, bridging the low and high-level
interfaces. #1187
- `ExperimentBuilder`:
- Add method `build_seeded_collection` for the sound creation of
multiple
Expand Down
2 changes: 0 additions & 2 deletions tianshou/env/worker/subproc.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import ctypes
import multiprocessing
import time
from collections import OrderedDict
from collections.abc import Callable
from multiprocessing import connection
from multiprocessing.context import BaseContext
Expand Down Expand Up @@ -68,7 +67,6 @@ def get(self) -> np.ndarray:

def _setup_buf(space: gym.Space, ctx: BaseContext) -> dict | tuple | ShArray:
if isinstance(space, gym.spaces.Dict):
assert isinstance(space.spaces, OrderedDict)
return {k: _setup_buf(v, ctx) for k, v in space.spaces.items()}
if isinstance(space, gym.spaces.Tuple):
assert isinstance(space.spaces, tuple)
Expand Down

0 comments on commit 94e097b

Please sign in to comment.