Commit f1a9d2b4 authored by Marta's avatar Marta
Browse files

log_dir -> log_file for dllogger

parent 3a65a7c9
...@@ -27,8 +27,8 @@ def is_main_process(): ...@@ -27,8 +27,8 @@ def is_main_process():
class PerformanceLoggingCallback(Callback): class PerformanceLoggingCallback(Callback):
def __init__(self, log_dir, global_batch_size, warmup_steps: int = 0, profile: bool = False): def __init__(self, log_file, global_batch_size, warmup_steps: int = 0, profile: bool = False):
logger.init(backends=[JSONStreamBackend(Verbosity.VERBOSE, log_dir), StdOutBackend(Verbosity.VERBOSE)]) logger.init(backends=[JSONStreamBackend(Verbosity.VERBOSE, log_file), StdOutBackend(Verbosity.VERBOSE)])
self.warmup_steps = warmup_steps self.warmup_steps = warmup_steps
self.global_batch_size = global_batch_size self.global_batch_size = global_batch_size
self.step = 0 self.step = 0
......
...@@ -152,7 +152,7 @@ def main(args): ...@@ -152,7 +152,7 @@ def main(args):
if args.log_performance: if args.log_performance:
global_batch_size = args.num_nodes * args.gpus global_batch_size = args.num_nodes * args.gpus
perf = PerformanceLoggingCallback( perf = PerformanceLoggingCallback(
log_dir=args.output_dir, log_file=os.path.join(args.output_dir, "performance_log.json"),
global_batch_size=global_batch_size, global_batch_size=global_batch_size,
) )
callbacks.append(perf) callbacks.append(perf)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment