class_docstr: A predictor which serializes the network structure as an MXNet symbolic
  graph. Should be used for models deployed in production in order to ensure
  forward-compatibility as GluonTS models evolve.
  
  Used by the training shell if training is invoked with a hyperparameter
  `use_symbol_block_predictor = True`.
class_docstr_tok: ["A","predictor","which","serializes","the","network","structure","as","an","MXNet","symbolic","graph",".","Should","be","used","for","models","deployed","in","production","in","order","to","ensure","forward-compatibility","as","GluonTS","models","evolve",".","Used","by","the","training","shell","if","training","is","invoked","with","a","hyperparameter","`","use_symbol_block_predictor","=","True","`","."]
code: def deserialize(  # type: ignore
      cls, path: Path, ctx: Optional[mx.Context] = None
  ) -> "SymbolBlockPredictor":
      ctx = ctx if ctx is not None else get_mxnet_context()
  
      with mx.Context(ctx):
          # deserialize constructor parameters
          with (path / "parameters.json").open("r") as fp:
              parameters = load_json(fp.read())
  
          parameters["ctx"] = ctx
  
          # deserialize transformation chain
          with (path / "input_transform.json").open("r") as fp:
              transform = load_json(fp.read())
  
          # deserialize prediction network
          num_inputs = len(parameters["input_names"])
          prediction_net = import_symb_block(
              num_inputs, path, "prediction_net"
          )
  
          return SymbolBlockPredictor(
              input_transform=transform,
              prediction_net=prediction_net,
              **parameters,
          )
  
imports: import logging
  from functools import partial
  from pathlib import Path
  from typing import Callable, Iterator, List, Optional, Type
  import mxnet
  import numpy
  from gluonts.core.serde import dump_json, load_json
  from gluonts.dataset.common import DataEntry, Dataset
  from gluonts.dataset.loader import DataBatch, InferenceDataLoader
  from gluonts.model.forecast import Forecast
  from gluonts.model.forecast_generator import ForecastGenerator, SampleForecastGenerator, to_numpy
  from gluonts.model.predictor import OutputTransform, Predictor
  from gluonts.mx.batchify import batchify
  from gluonts.mx.component import equals
  from gluonts.mx.context import get_mxnet_context
  from gluonts.mx.util import export_repr_block, export_symb_block, get_hybrid_forward_input_names, hybrid_block_to_symbol_block, import_repr_block, import_symb_block
  from gluonts.transform import Transformation
label_desc: Use image node_id 3 for calling the SymbolBlockPredictor obj's underlying member method code with example usage: obj.deserialize(cls, path, ctx) and returns: SymbolBlockPredictor