Skip to content

Commit

Permalink
fixed logger formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Aman Chadha authored and Aman Chadha committed Nov 30, 2019
1 parent e800759 commit dbef686
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions DatasetFetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
try:
os.mkdir(DATA_FOLDER)
except OSError:
logger.info("Creation of the directory %s failed" % path)
logger.info("Creation of the directory %s failed", DATA_FOLDER)
else:
logger.debug("Successfully created the directory %s " % path)
logger.debug("Successfully created the directory: %s", DATA_FOLDER)

class downloadProgressBar(tqdm):
def update_to(self, b=1, bsize=1, tsize=None):
Expand All @@ -63,7 +63,7 @@ def downloadURL(url, output_path):
downloadURL(DATASET_URL, os.path.join(DATA_FOLDER, DATASET_FILE))

# Extract it
logger.info("Extracting", os.path.join(DATA_FOLDER, DATASET_FILE))
logger.info("Extracting: %s", os.path.join(DATA_FOLDER, DATASET_FILE))

try:
with zipfile.ZipFile(os.path.join(DATA_FOLDER, DATASET_FILE), 'r') as zipObj:
Expand Down Expand Up @@ -96,5 +96,5 @@ def downloadURL(url, output_path):
count += 1
new_frames_name = count
des = os.path.join(DEST_PATH, str(new_frames_name))
logger.info("Creating: ", des)
logger.info("Creating: %s", des)
shutil.copytree(frames_path, des)
6 changes: 3 additions & 3 deletions FRSRGAN_Train.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@

if torch.cuda.is_available():
def printCUDAStats():
logger.info("# of CUDA devices detected:", torch.cuda.device_count())
logger.info("Using CUDA device #:", torch.cuda.current_device())
logger.info("CUDA device name:", torch.cuda.get_device_name(torch.cuda.current_device()))
logger.info("# of CUDA devices detected: %s", torch.cuda.device_count())
logger.info("Using CUDA device #: %s", torch.cuda.current_device())
logger.info("CUDA device name: %s", torch.cuda.get_device_name(torch.cuda.current_device()))

printCUDAStats()

Expand Down

0 comments on commit dbef686

Please sign in to comment.