training code of ci framework