Skip to content

Commit

Permalink
fix warning bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kaylode committed Mar 26, 2022
1 parent 57639e0 commit a6eba3b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion theseus/utilities/cuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def get_devices_info(device_names="0"):
def get_device(name='cpu') -> torch.device:
if name.startswith('cuda'):
if not torch.cuda.is_available():
LOGGER.text("CUDA is not available. Using CPU...")
LOGGER.text("CUDA is not available. Using CPU...", level=LoggerObserver.WARN)
name = 'cpu'
return torch.device(name)

Expand Down
2 changes: 1 addition & 1 deletion theseus/utilities/loggers/stdout_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def __init__(self, name):

def log_text(self, tag, value, level=LoggerObserver.DEBUG, **kwargs):
if level == LoggerObserver.WARN:
logger.warn(value)
logger.warning(value)

if level == LoggerObserver.INFO:
logger.info(value)
Expand Down

0 comments on commit a6eba3b

Please sign in to comment.