From c387d99a6cce22fc8b1872471ee51a9d87083980 Mon Sep 17 00:00:00 2001 From: sp Date: Mon, 15 Jan 2024 17:50:59 +0100 Subject: [PATCH] include unique id in experiment name --- examples/shields/rl/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/shields/rl/utils.py b/examples/shields/rl/utils.py index 4ffcd89..39e7338 100644 --- a/examples/shields/rl/utils.py +++ b/examples/shields/rl/utils.py @@ -134,7 +134,7 @@ class MiniGridShieldHandler(ShieldHandler): return self.__create_shield_dict() def expname(args): - return f"{datetime.datetime.now().strftime('%Y%m%dT%H%M%S')}_{args.env}_{args.shielding}_{args.shield_comparison}_{args.shield_value}" + return f"{datetime.datetime.now().strftime('%Y%m%dT%H%M%S')}_{args.env}_{args.shielding}_{args.shield_comparison}_{args.shield_value}_{next(tempfile._get_candidate_names())}" def create_log_dir(args): log_dir = f"{args.log_dir}/{expname(args)}"