class_docstr: Specifies a predetermined grid of values to search through.
class_docstr_tok: ["Specifies","a","predetermined","grid","of","values","to","search","through","."]
code: def __init__(self, paramValues):
      ctx = SparkContext.getOrCreate()
      self.jvm = ctx.getOrCreate()._jvm
      hyperparamBuilder = (
          self.jvm.org.apache.spark.ml.tuning.ParamGridBuilder()
      )
      for k, (est, hyperparam) in paramValues:
          javaParam = est._java_obj.getParam(k.name)
  
          if not isinstance(hyperparam, DiscreteHyperParam):
              raise ValueError(
                  "GridSpace only supports DiscreteHyperParam, but hyperparam {} is of type {}".format(
                      k,
                      type(hyperparam),
                  ),
              )
  
          values = hyperparam.get().getValues()
          hyperparamBuilder.addGrid(
              javaParam, self.jvm.PythonUtils.toList(values)
          )
  
      self.gridSpace = (
          self.jvm.com.microsoft.azure.synapse.ml.automl.GridSpace(
              hyperparamBuilder.build(),
          )
      )
  
imports: import sys
  import pyspark
  from pyspark import SparkContext
  from pyspark.ml.common import inherit_doc
  from pyspark.sql.types import *
label_desc: Use image node_id 1 to create a new GridSpace object from inherited base classes: object with example: obj = GridSpace(paramValues)