code: def test_pipeline3(self):
      iris = load_iris()
      features = [
          "sepal_length",
          "sepal_width",
          "petal_length",
          "petal_width",
      ]
  
      pd_df = pd.DataFrame(
          data=np.c_[iris["data"], iris["target"]],
          columns=features + ["label"],
      )
      df = sql.createDataFrame(pd_df)
  
      quantile1 = QuantileDiscretizer(
          inputCol="sepal_length",
          outputCol="sepal_length_bucket",
          numBuckets=2,
      )
      quantile2 = QuantileDiscretizer(
          inputCol="sepal_width",
          outputCol="sepal_width_bucket",
          numBuckets=2,
      )
      features = [
          "sepal_length_bucket",
          "sepal_width_bucket",
      ] + features
      assembler = VectorAssembler(
          inputCols=features, outputCol="features"
      )
      pipeline = Pipeline(
          stages=[quantile1, quantile2, assembler, LogisticRegression()]
      )
      model = pipeline.fit(df)
  
      df = df.select(
          ["sepal_length", "sepal_width", "petal_length", "petal_width"]
      )
      pd_df = pd_df[
          ["sepal_length", "sepal_width", "petal_length", "petal_width"]
      ]
      torch_model = convert(model, "torch", df)
      self.assertTrue(torch_model is not None)
  
      np.testing.assert_allclose(
          np.array(
              model.transform(df).select("prediction").collect()
          ).reshape(-1),
          torch_model.predict(pd_df),
          rtol=1e-06,
          atol=1e-06,
      )
  
      np.testing.assert_allclose(
          np.array(
              model.transform(df).select("probability").collect()
          ).reshape(-1, 3),
          torch_model.predict_proba(pd_df),
          rtol=1e-06,
          atol=1e-05,
      )
  
file_path: hummingbird/tests/test_sparkml_pipeline.py
imports: import unittest
  import warnings
  import numpy
  import torch
  from sklearn.datasets import load_iris
  from hummingbird.ml._utils import sparkml_installed, pandas_installed
  from hummingbird.ml import convert
label_desc: Use image node_id 3 for calling the TestSparkMLPipeline obj's underlying member method code with example usage: obj.test_pipeline3() without return types