Browse Source

include unique id in experiment name

refactoring
sp 11 months ago
parent
commit
c387d99a6c
  1. 2
      examples/shields/rl/utils.py

2
examples/shields/rl/utils.py

@ -134,7 +134,7 @@ class MiniGridShieldHandler(ShieldHandler):
return self.__create_shield_dict() return self.__create_shield_dict()
def expname(args): 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): def create_log_dir(args):
log_dir = f"{args.log_dir}/{expname(args)}" log_dir = f"{args.log_dir}/{expname(args)}"

Loading…
Cancel
Save