
state (object) --   Passed to the hook to maintain any state information during
   the training process. Examples include error feedback in
   gradient compression, peers to communicate with next in
   GossipGrad, etc.

   It is locally stored by each worker and shared by all the
   gradient tensors on the worker.

 * **hook** (*Callable*) --

   Callable with the following signature: "hook(state: object,
   bucket: dist.GradBucket) ->
   torch.futures.Future[torch.Tensor]":

   This function is called once the bucket is ready. The hook
   can perform whatever processing is needed and return a
   Future indicating completion of any async work (ex:
   allreduce). If the hook doesn't perform any communication,
   it still must return a completed Future. The Future should
   hold the new value of grad bucket's tensors. Once a bucket


