From 4ae1907ad2df7a208986da9c1ca6708713802dbc Mon Sep 17 00:00:00 2001 From: BoYanZh Date: Thu, 19 Jun 2025 07:12:37 -0400 Subject: [PATCH] fix: empty penalty --- joint_teapot/utils/joj3.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/joint_teapot/utils/joj3.py b/joint_teapot/utils/joj3.py index c5014e8..d61ac8a 100644 --- a/joint_teapot/utils/joj3.py +++ b/joint_teapot/utils/joj3.py @@ -291,6 +291,8 @@ def get_title_prefix( def parse_penalty_config(penalty_config: str) -> List[Tuple[float, float]]: res = [] for penalty in penalty_config.split(","): + if not penalty.strip(): + continue hour, factor = map(float, penalty.split("=")) res.append((hour, factor)) res.sort(key=lambda x: x[0])