def METHOD_NAME(self):
    """Update the pixel samplers for train and eval with the dynamic number of rays per batch."""
    self.datamanager.train_pixel_sampler.set_num_rays_per_batch(self.dynamic_num_rays_per_batch)
    self.datamanager.eval_pixel_sampler.set_num_rays_per_batch(self.dynamic_num_rays_per_batch)