class_docstr: A wrapper that kills the process if no progress is made within a given
  *timeout*. The timer is reset every time :func:`forward` is called.
  
  Usage::
  
      module = DistributedTimeoutWrapper(module, timeout=30)
      x = module(input)
      time.sleep(20)  # safe
      x = module(input)
      time.sleep(45)  # job will be killed before this returns
  
  Args:
      module (nn.Module): module to wrap
      timeout (int): number of seconds before killing the process
          (set to a value <= 0 to disable the timeout)
      signal (Optional): signal to send once timeout is triggered
class_docstr_tok: ["A","wrapper","that","kills","the","process","if","no","progress","is","made","within","a","given","*","timeout","*",".","The","timer","is","reset","every","time",":","func",":","`","forward","`","is","called",".","Usage",":",":","module","=","DistributedTimeoutWrapper","(","module",",","timeout=30",")","x","=","module","(","input",")","time.sleep","(","20",")","#","safe","x","=","module","(","input",")","time.sleep","(","45",")","#","job","will","be","killed","before","this","returns","Args",":","module","(","nn.Module",")",":","module","to","wrap","timeout","(","int",")",":","number","of","seconds","before","killing","the","process","(","set","to","a","value","<","=","0","to","disable","the","timeout",")","signal","(","Optional",")",":","signal","to","send","once","timeout","is","triggered"]
code: def load_state_dict(self, *args, **kwargs):
      return self.module.load_state_dict(*args, **kwargs)
  
file_path: fairseq/fairseq/distributed/distributed_timeout_wrapper.py
imports: import logging
  import os
  import signal
  import threading
  from torch import nn
label_desc: Use image node_id 6 for calling the DistributedTimeoutWrapper obj's underlying member method code with example usage: obj.load_state_dict() and returns: self