refactor setup trainer so we can add more hooks (#773) 6c81c61 unverified winglian commited on Oct 23, 2023