fix training sample to properly use config