mirror of
https://github.com/wassname/ray.git
synced 2026-07-18 12:40:56 +08:00
[RLlib] Add 2 Transformer learning test cases on StatelessCartPole (PPO and IMPALA). (#8624)
This commit is contained in:
@@ -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": {},
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user