# Changes ## Dependencies - New extra "eval" ## Api Extension - `Experiment` and `ExperimentConfig` now have a `name`, that can however be overridden when `Experiment.run()` is called - When building an `Experiment` from an `ExperimentConfig`, the user has the option to add info about seeds to the name. - New method in `ExperimentConfig` called `build_default_seeded_experiments` - `SamplingConfig` has an explicit training seed, `test_seed` is inferred. - New `evaluation` package for repeating the same experiment with multiple seeds and aggregating the results (important extension!). Currently in alpha state. - Loggers can now restore the logged data into python by using the new `restore_logged_data` ## Breaking Changes - `AtariEnvFactory` (in examples) now receives explicit train and test seeds - `EnvFactoryRegistered` now requires an explicit `test_seed` - `BaseLogger.prepare_dict_for_logging` is now abstract --------- Co-authored-by: Maximilian Huettenrauch <m.huettenrauch@appliedai.de> Co-authored-by: Michael Panchenko <m.panchenko@appliedai.de> Co-authored-by: Michael Panchenko <35432522+MischaPanch@users.noreply.github.com>
25 lines
590 B
Python
25 lines
590 B
Python
from tianshou.highlevel.env import (
|
|
EnvFactoryRegistered,
|
|
VectorEnvType,
|
|
)
|
|
|
|
|
|
class DiscreteTestEnvFactory(EnvFactoryRegistered):
|
|
def __init__(self) -> None:
|
|
super().__init__(
|
|
task="CartPole-v0",
|
|
train_seed=42,
|
|
test_seed=1337,
|
|
venv_type=VectorEnvType.DUMMY,
|
|
)
|
|
|
|
|
|
class ContinuousTestEnvFactory(EnvFactoryRegistered):
|
|
def __init__(self) -> None:
|
|
super().__init__(
|
|
task="Pendulum-v1",
|
|
train_seed=42,
|
|
test_seed=1337,
|
|
venv_type=VectorEnvType.DUMMY,
|
|
)
|