Add cancel training functionality