mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 03:34:48 +08:00
[rllib] Give error if sample_async is used with pytorch for A3C (#5000)
* give error if sample_async is used with pytorch * update * Update a3c.py
This commit is contained in:
committed by
Eric Liang
parent
bb8e75b532
commit
bbe3e5b4ed
@@ -48,6 +48,10 @@ def get_policy_class(config):
|
||||
def validate_config(config):
|
||||
if config["entropy_coeff"] < 0:
|
||||
raise DeprecationWarning("entropy_coeff must be >= 0")
|
||||
if config["sample_async"] and config["use_pytorch"]:
|
||||
raise ValueError(
|
||||
"The sample_async option is not supported with use_pytorch: "
|
||||
"Multithreading can be lead to crashes if used with pytorch.")
|
||||
|
||||
|
||||
def make_async_optimizer(workers, config):
|
||||
|
||||
Reference in New Issue
Block a user