class_docstr: Helper class to simplify the handling of buckets, which unify the underlying storage of multiple tensors
class_docstr_tok: ["Helper","class","to","simplify","the","handling","of","buckets",",","which","unify","the","underlying","storage","of","multiple","tensors"]
docstr: Move the underlying buffer
docstr_tok: ["Move","the","underlying","buffer"]
code: def to(  # type: ignore
      self,
      device: Optional[Union[int, torch.device]],
      dtype: Optional[torch.dtype] = None,
      non_blocking: bool = False,
      keep_param_alignment: bool = True,
  ) -> "ParamBucket":
      """
      Move the underlying buffer
      """
      assert (
          self.buffer is not None
      ), "Cannot move a collapsed bucket, please rebuild it"
      self.buffer = self.buffer.to(device, dtype, non_blocking)
  
imports: from typing import Any, Callable, List, Optional, Union
  import torch
label_desc: Use image node_id 2 for calling the Bucket obj's underlying member method code with example usage: obj.to(device, dtype, non_blocking, keep_param_alignment) without return types