class_docstr: Manages a PyTorch model for training.
class_docstr_tok: ["Manages","a","PyTorch","model","for","training","."]
docstr: Loads a bytes object the training state dict.
docstr_tok: ["Loads","a","bytes","object","the","training","state","dict","."]
code: def load_state_stream(self, byte_obj):
      """Loads a bytes object the training state dict."""
      _buffer = io.BytesIO(byte_obj)
      state_dict = torch.load(_buffer)
      return self.load_state_dict(state_dict)
  
imports: from filelock import FileLock
  import logging
  import io
  import itertools
  import os
  import tempfile
  import torch
  import torch.nn
  from torch.utils.data import DataLoader
  from torch.utils.data.distributed import DistributedSampler
  import ray
  from zoo.orca import OrcaContext
  from zoo.orca.learn.pytorch.constants import SCHEDULER_STEP, NUM_STEPS
  from zoo.orca.learn.pytorch.training_operator import TrainingOperator
  from zoo.orca.learn.pytorch import utils
  from zoo.orca.learn.pytorch.utils import find_free_port
label_desc: Use image node_id 23 for calling the TorchRunner obj's underlying member method code with example usage: obj.load_state_stream(byte_obj) and returns: self