From c567a3712633093093b78d9fe4a5b4539a5b33b6 Mon Sep 17 00:00:00 2001 From: Joseph Viviano Date: Wed, 17 Jul 2024 17:57:36 -0400 Subject: [PATCH] return values fixed --- tutorials/examples/train_hypergrid_multinode.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tutorials/examples/train_hypergrid_multinode.py b/tutorials/examples/train_hypergrid_multinode.py index 98e1e4ff..f4b9c934 100644 --- a/tutorials/examples/train_hypergrid_multinode.py +++ b/tutorials/examples/train_hypergrid_multinode.py @@ -355,7 +355,11 @@ def main(args): # noqa: C901 print ("total_time, sample_time, to_train_samples_time, loss_time, loss_backward_time, opt_time, rest_time") print (total_time, sample_time, to_train_samples_time, loss_time, loss_backward_time, opt_time, rest_time) - return validation_info["l1_dist"] + try: + return validation_info["l1_dist"] + except KeyError: + print(validation_info.keys()) + return validation_info["n_modes_found"] def validate_hypergrid(