code: def test_h2o_only_pipeline_with_h2o_frames():
      pipeline = Pipeline(
          [
              ("svd", H2OSVD(seed=seed)),
              ("estimator", H2OGradientBoostingRegressor(seed=seed)),
          ]
      )
  
      params = dict(
          svd__nv=[2, 3],
          svd__transform=["DESCALE", "DEMEAN", "NONE"],
          estimator__ntrees=[5, 10],
          estimator__max_depth=[1, 2, 3],
          estimator__learn_rate=[0.1, 0.2],
      )
      search = RandomizedSearchCV(
          pipeline,
          params,
          n_iter=5,
          random_state=seed,
          n_jobs=1,  # fails with parallel jobs
      )
      data = _get_data(format="h2o")
      assert isinstance(data.X_train, h2o.H2OFrame)
  
      search.set_params(
          scoring=make_scorer(h2o_r2_score),
          cv=H2OKFold(data.X_train, n_folds=3, seed=seed),
      )
  
      search.fit(data.X_train, data.y_train)
      preds = search.predict(data.X_test)
      assert isinstance(preds, h2o.H2OFrame)
      assert preds.dim == [len(data.X_test), 1]
  
      score = search.score(data.X_test, data.y_test)
      assert isinstance(score, float)
      skl_score = r2_score(
          data.y_test.as_data_frame().values,
          preds.as_data_frame().values,
      )
      assert (
          abs(score - skl_score) < 1e-6
      ), "score={}, skl_score={}".format(score, skl_score)
      scores["h2o_only_pipeline_with_h2o_frame"] = score
  
file_path: h2o-3/h2o-py/tests/testdir_sklearn/pyunit_sklearn_regression_search_pipeline.py
imports: import importlib, inspect, os, sys
  import numpy
  from sklearn.datasets import make_regression
  from sklearn.decomposition import TruncatedSVD
  from sklearn.metrics import r2_score, make_scorer
  from sklearn.model_selection import train_test_split, RandomizedSearchCV
  from sklearn.pipeline import Pipeline
  import h2o
  from h2o.cross_validation import H2OKFold
  from h2o.model.regression import h2o_r2_score
  from h2o.sklearn import h2o_connection, H2OGradientBoostingEstimator, H2OGradientBoostingRegressor, H2OSVD
  from h2o.sklearn.wrapper import H2OConnectionMonitorMixin
  from tests import pyunit_utils, Namespace
label_desc: Use image node_id 2 for calling a global function with example usage: test_h2o_only_pipeline_with_h2o_frames() without return types