              else:
                  try:
                      pynvml.nvmlInit()
                  except pynvml.NVMLError_LibraryNotFound:
                      self.initialized = True
                      return
              self.initialized = True
 
</s> remove             if is_macos:
 </s> add             if IS_MACOS:
                if self.logger:
                    self.logger.debug("macOS Detected. Using pynvx") </s> remove         if is_macos:
 </s> add         if IS_MACOS: </s> remove     import pynvx
    is_macos = True
 </s> add     import pynvx  # pylint: disable=import-error
    IS_MACOS = True </s> remove             if not is_macos:
 </s> add             if not IS_MACOS: </s> remove     is_macos = False
 </s> add     IS_MACOS = False
                    if self.logger:
                        self.logger.debug("OS is not macOS. Using pynvml")
              else:
                  try:
                    if self.logger:
                        self.logger.debug("OS is not macOS. Using pynvml")
                      pynvml.nvmlInit()
                  except pynvml.NVMLError_LibraryNotFound:
                      self.initialized = True
                      return
              self.initialized = True
keep add keep keep keep keep keep
 Logging (#541)

* Convert prints to logger. Further logging improvements. Tidy  up

* Fix system verbosity. Allow SystemExit

* Fix reload extract bug

* Child Traceback handling

* Safer shutdown procedure

* Add shutdown event to queue manager

* landmarks_as_xy > property. GUI notes + linting. Aligner bugfix

* fix FaceFilter. Enable nFilter when no Filter is supplied

* Fix blurry face filter

* Continue on IO error. Better error handling

* Explicitly print stack trace tocrash log

* Windows Multiprocessing bugfix

* Add git info and conda version to crash log

* Windows/Anaconda mp bugfix

* Logging fixes for training 
lib/gpu_stats.py