From 9cef22a512a63aaa1943512abcacecf061b8c16e Mon Sep 17 00:00:00 2001 From: Noam Bernstein Date: Fri, 7 Jun 2024 08:36:03 -0400 Subject: [PATCH] more digits in training validation err log --- mace/tools/train.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mace/tools/train.py b/mace/tools/train.py index 61b1dce0..9188f25e 100644 --- a/mace/tools/train.py +++ b/mace/tools/train.py @@ -56,7 +56,7 @@ def valid_err_log( error_e = eval_metrics["rmse_e_per_atom"] * 1e3 error_f = eval_metrics["rmse_f"] * 1e3 logging.info( - f"head: {valid_loader_name}, Epoch {epoch}: loss={valid_loss:.4f}, RMSE_E_per_atom={error_e:.1f} meV, RMSE_F={error_f:.1f} meV / A" + f"head: {valid_loader_name}, Epoch {epoch}: loss={valid_loss:.8f}, RMSE_E_per_atom={error_e:.2f} meV, RMSE_F={error_f:.1f} meV / A" ) elif ( log_errors == "PerAtomRMSEstressvirials" @@ -66,7 +66,7 @@ def valid_err_log( error_f = eval_metrics["rmse_f"] * 1e3 error_stress = eval_metrics["rmse_stress"] * 1e3 logging.info( - f"head: {valid_loader_name}, Epoch {epoch}: loss={valid_loss:.4f}, RMSE_E_per_atom={error_e:.1f} meV, RMSE_F={error_f:.1f} meV / A, RMSE_stress={error_stress:.1f} meV / A^3" + f"head: {valid_loader_name}, Epoch {epoch}: loss={valid_loss:.8f}, RMSE_E_per_atom={error_e:.2f} meV, RMSE_F={error_f:.1f} meV / A, RMSE_stress={error_stress:.2f} meV / A^3" ) elif ( log_errors == "PerAtomRMSEstressvirials" @@ -76,37 +76,37 @@ def valid_err_log( error_f = eval_metrics["rmse_f"] * 1e3 error_virials = eval_metrics["rmse_virials_per_atom"] * 1e3 logging.info( - f"head: {valid_loader_name}, Epoch {epoch}: loss={valid_loss:.4f}, RMSE_E_per_atom={error_e:.1f} meV, RMSE_F={error_f:.1f} meV / A, RMSE_virials_per_atom={error_virials:.1f} meV" + f"head: {valid_loader_name}, Epoch {epoch}: loss={valid_loss:.8f}, RMSE_E_per_atom={error_e:.2f} meV, RMSE_F={error_f:.1f} meV / A, RMSE_virials_per_atom={error_virials:.1f} meV" ) elif log_errors == "TotalRMSE": error_e = eval_metrics["rmse_e"] * 1e3 error_f = eval_metrics["rmse_f"] * 1e3 logging.info( - f"head: {valid_loader_name}, Epoch {epoch}: loss={valid_loss:.4f}, RMSE_E={error_e:.1f} meV, RMSE_F={error_f:.1f} meV / A" + f"head: {valid_loader_name}, Epoch {epoch}: loss={valid_loss:.8f}, RMSE_E={error_e:.1f} meV, RMSE_F={error_f:.1f} meV / A" ) elif log_errors == "PerAtomMAE": error_e = eval_metrics["mae_e_per_atom"] * 1e3 error_f = eval_metrics["mae_f"] * 1e3 logging.info( - f"head: {valid_loader_name}, Epoch {epoch}: loss={valid_loss:.4f}, MAE_E_per_atom={error_e:.1f} meV, MAE_F={error_f:.1f} meV / A" + f"head: {valid_loader_name}, Epoch {epoch}: loss={valid_loss:.8f}, MAE_E_per_atom={error_e:.2f} meV, MAE_F={error_f:.1f} meV / A" ) elif log_errors == "TotalMAE": error_e = eval_metrics["mae_e"] * 1e3 error_f = eval_metrics["mae_f"] * 1e3 logging.info( - f"head: {valid_loader_name}, Epoch {epoch}: loss={valid_loss:.4f}, MAE_E={error_e:.1f} meV, MAE_F={error_f:.1f} meV / A" + f"head: {valid_loader_name}, Epoch {epoch}: loss={valid_loss:.8f}, MAE_E={error_e:.1f} meV, MAE_F={error_f:.1f} meV / A" ) elif log_errors == "DipoleRMSE": error_mu = eval_metrics["rmse_mu_per_atom"] * 1e3 logging.info( - f"head: {valid_loader_name}, Epoch {epoch}: loss={valid_loss:.4f}, RMSE_MU_per_atom={error_mu:.2f} mDebye" + f"head: {valid_loader_name}, Epoch {epoch}: loss={valid_loss:.8f}, RMSE_MU_per_atom={error_mu:.2f} mDebye" ) elif log_errors == "EnergyDipoleRMSE": error_e = eval_metrics["rmse_e_per_atom"] * 1e3 error_f = eval_metrics["rmse_f"] * 1e3 error_mu = eval_metrics["rmse_mu_per_atom"] * 1e3 logging.info( - f"head: {valid_loader_name}, Epoch {epoch}: loss={valid_loss:.4f}, RMSE_E_per_atom={error_e:.1f} meV, RMSE_F={error_f:.1f} meV / A, RMSE_Mu_per_atom={error_mu:.2f} mDebye" + f"head: {valid_loader_name}, Epoch {epoch}: loss={valid_loss:.8f}, RMSE_E_per_atom={error_e:.2f} meV, RMSE_F={error_f:.1f} meV / A, RMSE_Mu_per_atom={error_mu:.2f} mDebye" )