Skip to content

Commit

Permalink
Update utility.py
Browse files Browse the repository at this point in the history
Make it more generic
  • Loading branch information
zhenghh04 authored Aug 23, 2024
1 parent 9921e94 commit 20d1fc1
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions dlio_benchmark/utils/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,38 +37,38 @@
from dftracer.logger import dftracer as PerfTrace, dft_fn as Profile, DFTRACER_ENABLE as DFTRACER_ENABLE
except:
class Profile(object):
def __init__(self, cat, name=None, epoch=None, step=None, image_idx=None, image_size=None):
self.type = type
def log(self, func):
return func
def log_init(self, func):
return func
def iter(self, func, iter_name="step"):
return a
def __init__(self, **kwargs):
return
def log(self, **kwargs):
return
def log_init(self, **kwargs):
return
def iter(self, **kwargs):
return
def __enter__(self):
return
def __exit__(self, type, value, traceback):
def __exit__(self, **kwargs):
return
def update(self, epoch=None, step=None, image_idx=None, image_size=None, args={}):
def update(self, **kwargs):
return
def flush(self):
return
def reset(self):
return
def log_static(self, func):
def log_static(self, **kwargs):
return
class dftracer(object):
def __init__(self,):
self.type = None
def initialize_log(self, logfile=None, data_dir=None, process_id=-1):
def initialize_log(self, **kwargs):
return
def get_time(self):
return
def enter_event(self):
return
def exit_event(self):
return
def log_event(self, name, cat, start_time, duration, string_args=None):
def log_event(self, **kwargs):
return
def finalize(self):
return
Expand Down

0 comments on commit 20d1fc1

Please sign in to comment.