Consolidate train-test job production code
Further train-test graph building refactors