class_docstr: IODataset
docstr: Creates an `GraphIODataset` from a prometheus endpoint.
  
  Args:
    query: A string, the query string for prometheus.
    length: An integer, the length of the query (in seconds).
    offset: An integer, the a millisecond-precision timestamp, by default
      the time when graph runs.
    endpoint: A string, the server address of prometheus, by default
      `http://localhost:9090`.
    spec: A structured tf.TensorSpec of the dataset.
      The format should be {"job": {"instance": {"name": tf.TensorSpec}}}.
      In graph mode, spec is needed. In eager mode,
      spec is probed automatically.
    name: A name prefix for the IODataset (optional).
  
  Returns:
    A `IODataset`.
docstr_tok: ["Creates","an","`","GraphIODataset","`","from","a","prometheus","endpoint",".","Args",":","query",":","A","string",",","the","query","string","for","prometheus",".","length",":","An","integer",",","the","length","of","the","query","(","in","seconds",")",".","offset",":","An","integer",",","the","a","millisecond-precision","timestamp",",","by","default","the","time","when","graph","runs",".","endpoint",":","A","string",",","the","server","address","of","prometheus",",","by","default","`","http",":","\/\/localhost:9090","`",".","spec",":","A","structured","tf.TensorSpec","of","the","dataset",".","The","format","should","be","{","``","job","''",":","{","``","instance","''",":","{","``","name","''",":","tf.TensorSpec","}","}","}",".","In","graph","mode",",","spec","is","needed",".","In","eager","mode",",","spec","is","probed","automatically",".","name",":","A","name","prefix","for","the","IODataset","(","optional",")",".","Returns",":","A","`","IODataset","`","."]
code: def from_prometheus(
      cls, query, length, offset=None, endpoint=None, spec=None
  ):
      """Creates an `GraphIODataset` from a prometheus endpoint.
  
      Args:
        query: A string, the query string for prometheus.
        length: An integer, the length of the query (in seconds).
        offset: An integer, the a millisecond-precision timestamp, by default
          the time when graph runs.
        endpoint: A string, the server address of prometheus, by default
          `http://localhost:9090`.
        spec: A structured tf.TensorSpec of the dataset.
          The format should be {"job": {"instance": {"name": tf.TensorSpec}}}.
          In graph mode, spec is needed. In eager mode,
          spec is probed automatically.
        name: A name prefix for the IODataset (optional).
  
      Returns:
        A `IODataset`.
      """
      from tensorflow_io.python.ops import (  # pylint: disable=import-outside-toplevel
          prometheus_dataset_ops,
      )
  
      return prometheus_dataset_ops.PrometheusIODataset(
          query, length, offset=offset, endpoint=endpoint, spec=spec
      )
  
imports: import tensorflow
  from tensorflow_io.python.ops import io_dataset
  from tensorflow_io.python.experimental import libsvm_dataset_ops
  from tensorflow_io.python.experimental import image_dataset_ops
  from tensorflow_io.python.experimental import kinesis_dataset_ops
  from tensorflow_io.python.experimental import pubsub_dataset_ops
  from tensorflow_io.python.experimental import grpc_dataset_ops
  from tensorflow_io.python.experimental import file_dataset_ops
  from tensorflow_io.python.experimental import numpy_dataset_ops
  from tensorflow_io.python.experimental import sql_dataset_ops
  from tensorflow_io.python.experimental import video_dataset_ops
label_desc: Use image node_id 7 for calling the IODataset obj's underlying member method code with example usage: obj.from_prometheus(cls, query, length, offset, endpoint, spec) and returns: prometheus_dataset_ops