mirror of
https://github.com/deepspeedai/DeepSpeed.git
synced 2025-10-20 15:33:51 +08:00
fix typo s/1014 /1024 (#7528)
fix typo s/1014 /1024 s/was_interruptted /was_interrupted detail info modified: deepspeed/autotuning/scheduler.py modified: deepspeed/autotuning/utils.py Co-authored-by: Olatunji Ruwase <tunji.ruwase@snowflake.com>
This commit is contained in:
@ -18,7 +18,7 @@ from tqdm import tqdm
|
||||
|
||||
from ..utils import logger
|
||||
from .constants import AUTOTUNING, AUTOTUNING_METRIC_PATH, BUFSIZE
|
||||
from .utils import get_val_by_key, search_error, was_interruptted
|
||||
from .utils import get_val_by_key, search_error, was_interrupted
|
||||
"""
|
||||
thread-0: loop over experiment queue dispatching experiments if they become available
|
||||
thread-N: start each experiment in its own thread
|
||||
@ -76,7 +76,7 @@ class ResourceManager:
|
||||
|
||||
# skip existing experiments (except for the ones that were interrupted)
|
||||
if os.path.exists(result_dir) and os.path.exists(stderr_file):
|
||||
if not was_interruptted(stderr_file):
|
||||
if not was_interrupted(stderr_file):
|
||||
err = search_error(stderr_file)
|
||||
exp_id = exp["exp_id"]
|
||||
self.finished_experiments[exp_id] = (exp, err)
|
||||
|
@ -26,7 +26,7 @@ def search_error(filename):
|
||||
return None
|
||||
|
||||
|
||||
def was_interruptted(filename):
|
||||
def was_interrupted(filename):
|
||||
if not os.path.exists(filename):
|
||||
return "stderr.log does not exist"
|
||||
with open(filename) as f:
|
||||
@ -422,7 +422,7 @@ def memory_to_string(n, postfix="", units=None, precision=2):
|
||||
elif n // 10**6 > 0:
|
||||
return str(round(n / 1024**2, precision)) + " M" + postfix
|
||||
elif n // 10**3 > 0:
|
||||
return str(round(n / 1014, precision)) + " K" + postfix
|
||||
return str(round(n / 1024, precision)) + " K" + postfix
|
||||
else:
|
||||
return str(n) + " "
|
||||
else:
|
||||
|
Reference in New Issue
Block a user