From 49bec176053595975c1941cff9749c55f7203ea9 Mon Sep 17 00:00:00 2001 From: danleifeng <52735331+danleifeng@users.noreply.github.com> Date: Mon, 18 Dec 2023 14:12:57 +0800 Subject: [PATCH] fix fleetutil get_online_pass_interval bug (#60023) --- .../incubate/distributed/fleet/fleet_util.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/python/paddle/incubate/distributed/fleet/fleet_util.py b/python/paddle/incubate/distributed/fleet/fleet_util.py index afa26ab6723146..1777afffe9aaf4 100644 --- a/python/paddle/incubate/distributed/fleet/fleet_util.py +++ b/python/paddle/incubate/distributed/fleet/fleet_util.py @@ -1317,7 +1317,23 @@ def get_online_pass_interval( ... is_data_hourly_placed=False) """ + assert ( + "|" not in days + and ";" not in days + and "\\" not in days + and "/" not in days + and "(" not in days + and ")" not in days + ), r"days should not contain [|,;,\,/,(,)]" days = os.popen("echo -n " + days).read().split(" ") + assert ( + "|" not in hours + and ";" not in hours + and "\\" not in hours + and "/" not in hours + and "(" not in hours + and ")" not in days + ), r"hours should not contain [|,;,\,/,(,)]" hours = os.popen("echo -n " + hours).read().split(" ") split_interval = int(split_interval) split_per_pass = int(split_per_pass)