E-Hospital commited on
Commit
d235373
1 Parent(s): bc23f80

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +6 -3
main.py CHANGED
@@ -6,9 +6,12 @@ logger = logging.getLogger()
6
 
7
  device = torch.device("cuda" if torch.cuda.is_available() else "CPU")
8
 
9
- num_of_gpus = torch.cuda.device_count()
10
- logger.info("Getting gpus")
11
- logger.info(num_of_gpus)
 
 
 
12
 
13
 
14
  model = AutoModelForCausalLM.from_pretrained(
 
6
 
7
  device = torch.device("cuda" if torch.cuda.is_available() else "CPU")
8
 
9
+ logger.info("Getting Device")
10
+ logger.info(device)
11
+ if torch.cuda.is_available():
12
+ num_of_gpus = torch.cuda.device_count()
13
+ logger.info("Getting gpus")
14
+ logger.info(num_of_gpus)
15
 
16
 
17
  model = AutoModelForCausalLM.from_pretrained(