[RLlib] Add 2 Transformer learning test cases on StatelessCartPole (PPO and IMPALA). (#8624)

This commit is contained in:
Sven Mika
2020-05-27 10:19:47 +02:00
committed by GitHub
parent b0bb0584fb
commit 0422e9c5a8
14 changed files with 133 additions and 33 deletions
+6 -3
View File
@@ -71,7 +71,8 @@ Once implemented, the model can then be registered and used in place of a built-
trainer = ppo.PPOTrainer(env="CartPole-v0", config={
"model": {
"custom_model": "my_model",
"custom_options": {}, # extra options to pass to your model
# Extra kwargs to be passed to your model's c'tor.
"custom_model_config": {},
},
})
@@ -132,7 +133,8 @@ Once implemented, the model can then be registered and used in place of a built-
"use_pytorch": True,
"model": {
"custom_model": "my_model",
"custom_options": {}, # extra options to pass to your model
# Extra kwargs to be passed to your model's c'tor.
"custom_model_config": {},
},
})
@@ -165,7 +167,8 @@ Custom preprocessors should subclass the RLlib `preprocessor class <https://gith
trainer = ppo.PPOTrainer(env="CartPole-v0", config={
"model": {
"custom_preprocessor": "my_prep",
"custom_options": {}, # extra options to pass to your preprocessor
# Extra kwargs to be passed to your model's c'tor.
"custom_model_config": {},
},
})