[graph_trainer] Add make_fx stack trace control (#4001)