class_docstr: Predictor object for marked temporal point process models.
  
  TPP predictions differ from standard discrete-time models in several
  regards. First, at least for now, only sample forecasts implementing
  PointProcessSampleForecast are available. Similar to TPP Estimator
  objects, the Predictor works with :code:`prediction_interval_length`
  as opposed to :code:`prediction_length`.
  
  The predictor also accounts for the fact that the prediction network
  outputs a 2-tuple of Tensors, for the samples themselves and their
  `valid_length`.
  
  Parameters
  ----------
  prediction_interval_length
      The length of the prediction interval
class_docstr_tok: ["Predictor","object","for","marked","temporal","point","process","models",".","TPP","predictions","differ","from","standard","discrete-time","models","in","several","regards",".","First",",","at","least","for","now",",","only","sample","forecasts","implementing","PointProcessSampleForecast","are","available",".","Similar","to","TPP","Estimator","objects",",","the","Predictor","works","with",":","code",":","`","prediction_interval_length","`","as","opposed","to",":","code",":","`","prediction_length","`",".","The","predictor","also","accounts","for","the","fact","that","the","prediction","network","outputs","a","2-tuple","of","Tensors",",","for","the","samples","themselves","and","their","`","valid_length","`",".","Parameters","--","--","--","--","--","prediction_interval_length","The","length","of","the","prediction","interval"]
code: def predict(
      self,
      dataset: Dataset,
      num_samples: Optional[int] = None,
      num_workers: Optional[int] = None,
      num_prefetch: Optional[int] = None,
      **kwargs,
  ) -> Iterator[Forecast]:
      inference_data_loader = InferenceDataLoader(
          dataset,
          transform=self.input_transform,
          batch_size=self.batch_size,
          stack_fn=partial(
              batchify,
              ctx=self.ctx,
              dtype=self.dtype,
              variable_length=True,
          ),
      )
      yield from self.forecast_generator(
          inference_data_loader=inference_data_loader,
          prediction_net=self.prediction_net,
          input_names=self.input_names,
          freq=self.freq,
          output_transform=self.output_transform,
          num_samples=num_samples,
      )
  
imports: from functools import partial
  from pathlib import Path
  from typing import Iterator, List, Optional, cast, Type
  import mxnet
  import numpy
  from gluonts.dataset.common import Dataset
  from gluonts.dataset.loader import DataBatch, DataLoader, InferenceDataLoader
  from gluonts.model.forecast import Forecast
  from gluonts.model.forecast_generator import ForecastGenerator
  from gluonts.model.predictor import OutputTransform
  from gluonts.mx.batchify import batchify
  from gluonts.mx.model.predictor import GluonPredictor, SymbolBlockPredictor
  from gluonts.transform import Transformation
  from .forecast import PointProcessSampleForecast
label_desc: Use image node_id 4 for calling the PointProcessGluonPredictor obj's underlying member method code with example usage: obj.predict(dataset, num_samples, num_workers, num_prefetch) without return types