ray.rllib.algorithms.algorithm_config.AlgorithmConfig.validate_train_batch_size_vs_rollout_fragment_length#
- AlgorithmConfig.validate_train_batch_size_vs_rollout_fragment_length() None[source]#
Detects mismatches for
train_batch_sizevsrollout_fragment_length.Only applicable for algorithms, whose train_batch_size should be directly dependent on rollout_fragment_length (synchronous sampling, on-policy PG algos).
If rollout_fragment_length != “auto”, makes sure that the product of
rollout_fragment_lengthxnum_env_runnersxnum_envs_per_env_runnerroughly (10%) matches the providedtrain_batch_size. Otherwise, errors with asking the user to set rollout_fragment_length toautoor to a matching value.- Raises:
ValueError – If there is a mismatch between user provided
rollout_fragment_lengthandtotal_train_batch_size.