From e1307794c7c30ed679f8832f1e25d073937ca7ee Mon Sep 17 00:00:00 2001 From: fwiebe Date: Thu, 11 Jan 2024 17:58:54 +0100 Subject: [PATCH] workaround for argparse boolean variable --- leaderboard/real_hardware/acrobot/create_leaderboard.py | 4 ++-- leaderboard/real_hardware/pendubot/create_leaderboard.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/leaderboard/real_hardware/acrobot/create_leaderboard.py b/leaderboard/real_hardware/acrobot/create_leaderboard.py index d7cf7143..c8a4b20e 100644 --- a/leaderboard/real_hardware/acrobot/create_leaderboard.py +++ b/leaderboard/real_hardware/acrobot/create_leaderboard.py @@ -28,7 +28,7 @@ help="Whether to force the recomputation of the leaderboard even without new data.", default=False, required=False, - type=bool, + type=int, ) parser.add_argument( "--link-base", @@ -41,7 +41,7 @@ data_dir = parser.parse_args().data_dir save_to = parser.parse_args().save_to -recompute_leaderboard = parser.parse_args().recompute +recompute_leaderboard = bool(parser.parse_args().recompute) link_base = parser.parse_args().link if not os.path.exists(save_to): diff --git a/leaderboard/real_hardware/pendubot/create_leaderboard.py b/leaderboard/real_hardware/pendubot/create_leaderboard.py index d7cf7143..c8a4b20e 100644 --- a/leaderboard/real_hardware/pendubot/create_leaderboard.py +++ b/leaderboard/real_hardware/pendubot/create_leaderboard.py @@ -28,7 +28,7 @@ help="Whether to force the recomputation of the leaderboard even without new data.", default=False, required=False, - type=bool, + type=int, ) parser.add_argument( "--link-base", @@ -41,7 +41,7 @@ data_dir = parser.parse_args().data_dir save_to = parser.parse_args().save_to -recompute_leaderboard = parser.parse_args().recompute +recompute_leaderboard = bool(parser.parse_args().recompute) link_base = parser.parse_args().link if not os.path.exists(save_to):