Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace colon with dash in timestamp variables #620

Merged
merged 6 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ml3d/tf/pipelines/object_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def run_test(self):
dataset = self.dataset
cfg = self.cfg

timestamp = datetime.now().strftime('%Y-%m-%d_%H:%M:%S')
timestamp = datetime.now().strftime('%Y-%m-%d_%H-%M-%S')

log_file_path = join(cfg.logs_dir, 'log_test_' + timestamp + '.txt')
log.info("Logging in file : {}".format(log_file_path))
Expand Down Expand Up @@ -111,7 +111,7 @@ def run_valid(self, epoch=0):
dataset = self.dataset
cfg = self.cfg

timestamp = datetime.now().strftime('%Y-%m-%d_%H:%M:%S')
timestamp = datetime.now().strftime('%Y-%m-%d_%H-%M-%S')

log_file_path = join(cfg.logs_dir, 'log_valid_' + timestamp + '.txt')
log.info("Logging in file : {}".format(log_file_path))
Expand Down Expand Up @@ -212,7 +212,7 @@ def run_train(self):

cfg = self.cfg

timestamp = datetime.now().strftime('%Y-%m-%d_%H:%M:%S')
timestamp = datetime.now().strftime('%Y-%m-%d_%H-%M-%S')
log_file_path = join(cfg.logs_dir, 'log_train_' + timestamp + '.txt')
log.info("Logging in file : {}".format(log_file_path))
log.addHandler(logging.FileHandler(log_file_path))
Expand Down
4 changes: 2 additions & 2 deletions ml3d/tf/pipelines/semantic_segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def run_test(self):
cfg = self.cfg

self.load_ckpt(model.cfg.ckpt_path)
timestamp = datetime.now().strftime('%Y-%m-%d_%H:%M:%S')
timestamp = datetime.now().strftime('%Y-%m-%d_%H-%M-%S')

log_file_path = join(cfg.logs_dir, 'log_test_' + timestamp + '.txt')
log.info("Logging in file : {}".format(log_file_path))
Expand Down Expand Up @@ -192,7 +192,7 @@ def run_train(self):
cfg = self.cfg

log.info(model)
timestamp = datetime.now().strftime('%Y-%m-%d_%H:%M:%S')
timestamp = datetime.now().strftime('%Y-%m-%d_%H-%M-%S')
log_file_path = join(cfg.logs_dir, 'log_train_' + timestamp + '.txt')
log.info("Logging in file : {}".format(log_file_path))
log.addHandler(logging.FileHandler(log_file_path))
Expand Down
6 changes: 3 additions & 3 deletions ml3d/torch/pipelines/object_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def run_test(self):

model.eval()

timestamp = datetime.now().strftime('%Y-%m-%d_%H:%M:%S')
timestamp = datetime.now().strftime('%Y-%m-%d_%H-%M-%S')

log.info("DEVICE : {}".format(device))
log_file_path = join(cfg.logs_dir, 'log_test_' + timestamp + '.txt')
Expand Down Expand Up @@ -145,7 +145,7 @@ def run_valid(self, epoch=0):

model.eval()

timestamp = datetime.now().strftime('%Y-%m-%d_%H:%M:%S')
timestamp = datetime.now().strftime('%Y-%m-%d_%H-%M-%S')

log.info("DEVICE : {}".format(device))
log_file_path = join(cfg.logs_dir, 'log_valid_' + timestamp + '.txt')
Expand Down Expand Up @@ -282,7 +282,7 @@ def run_train(self):

if rank == 0:
log.info("DEVICE : {}".format(device))
timestamp = datetime.now().strftime('%Y-%m-%d_%H:%M:%S')
timestamp = datetime.now().strftime('%Y-%m-%d_%H-%M-%S')

log_file_path = join(cfg.logs_dir,
'log_train_' + timestamp + '.txt')
Expand Down
4 changes: 2 additions & 2 deletions ml3d/torch/pipelines/semantic_segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def run_test(self):
model.eval()
self.metric_test = SemSegMetric()

timestamp = datetime.now().strftime('%Y-%m-%d_%H:%M:%S')
timestamp = datetime.now().strftime('%Y-%m-%d_%H-%M-%S')

log.info("DEVICE : {}".format(device))
log_file_path = join(cfg.logs_dir, 'log_test_' + timestamp + '.txt')
Expand Down Expand Up @@ -320,7 +320,7 @@ def run_train(self):
model.to(device)

log.info("DEVICE : {}".format(device))
timestamp = datetime.now().strftime('%Y-%m-%d_%H:%M:%S')
timestamp = datetime.now().strftime('%Y-%m-%d_%H-%M-%S')

log_file_path = join(cfg.logs_dir, 'log_train_' + timestamp + '.txt')
log.info("Logging in file : {}".format(log_file_path))
Expand Down