diff --git a/python/ray/rllib/agents/a3c/a3c.py b/python/ray/rllib/agents/a3c/a3c.py index c269df2fc6e57..d320b96368810 100644 --- a/python/ray/rllib/agents/a3c/a3c.py +++ b/python/ray/rllib/agents/a3c/a3c.py @@ -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):