(self)
Timeout function that free GPU memory by moving the model to CPU
           or unloading it; depending on `self.on_timemout` value
Timeout function that free GPU memory by moving the model to CPU
           or unloading it; depending on `self.on_timemout` value
Timeout function that free GPU memory by moving the model to CPU or unloading it ; depending on self . on_timemout value
def do_timeout(self):
        """Timeout function that free GPU memory by moving the model to CPU
           or unloading it; depending on `self.on_timemout` value
        """
        if self.on_timeout == "unload":
            self.logger.info("Timeout: unloading model %d" % self.model_id)
            self.unload()
        if self.on_timeout == "to_cpu":
            self.logger.info("Timeout: sending model %d to CPU"
                             % self.model_id)
            self.to_cpu()
def do_timeout ( self ) : if self . on_timeout == "unload" : self . logger . info ( "Timeout: unloading model %d" % self . model_id ) self . unload ( ) if self . on_timeout == "to_cpu" : self . logger . info ( "Timeout: sending model %d to CPU" % self . model_id ) self . to_cpu ( )