From 6869bae1d4264d6f7e6e04a7534fe2b36687d532 Mon Sep 17 00:00:00 2001 From: Stefan Schneider Date: Tue, 5 Oct 2021 13:31:35 +0200 Subject: [PATCH] set util func in df metadata --- deepcomp/util/cli.py | 2 +- deepcomp/util/simulation.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/deepcomp/util/cli.py b/deepcomp/util/cli.py index 2715e1c..b70332e 100644 --- a/deepcomp/util/cli.py +++ b/deepcomp/util/cli.py @@ -119,7 +119,7 @@ def setup_cli(): args.agent = 'multi' # warn for linear utility; can't change this automatically in code - if args.util == 'linear': + if args.util == 'linear' and (MIN_UTILITY != 0 or MAX_UTILITY != 1000): log.warning('Make sure to set MIN_UTILITY and MAX_UTILITY to sensible values manually!', util_func=args.util, min_utility=MIN_UTILITY, max_utility=MAX_UTILITY, suggestion=(0, 1000)) diff --git a/deepcomp/util/simulation.py b/deepcomp/util/simulation.py index f1e6598..8608c5e 100644 --- a/deepcomp/util/simulation.py +++ b/deepcomp/util/simulation.py @@ -109,6 +109,7 @@ def metadata(self): 'num_ue_slow': self.cli_args.slow_ues, 'num_ue_fast': self.cli_args.fast_ues, 'num_ue_max': self.env.max_ues, + 'util_func': self.cli_args.util, # just put arrival name here, not sequence (as dict), since a dict here leads to a Pandas error when # writing scalar results 'ue_arrival': self.cli_args.ue_arrival,