Mechanics-informed machine learning prediction of crack path in heterogeneous materials