ray.rllib.algorithms.algorithm_config.AlgorithmConfig.validate_train_batch_size_vs_rollout_fragment_length
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_rollout_workersxnum_envs_per_workerroughly (10%) matches the providedtrain_batch_size. Otherwise, errors with asking the user to set rollout_fragment_length toautoor to a matching value.Also, only checks this if
train_batch_size> 0 (DDPPO sets this to -1 to auto-calculate the actual batch size later).- Raises
ValueError – If there is a mismatch between user provided
rollout_fragment_length –