class_docstr: Example:
      >>> auto_est = AutoEstimator.from_torch(model_creator=model_creator,
                                              optimizer=get_optimizer,
                                              loss=nn.BCELoss(),
                                              logs_dir="/tmp/zoo_automl_logs",
                                              resources_per_trial={"cpu": 2},
                                              name="test_fit")
      >>> auto_est.fit(data=data,
                       validation_data=validation_data,
                       search_space=create_linear_search_space(),
                       n_sampling=4,
                       epochs=1,
                       metric="accuracy")
      >>> best_model = auto_est.get_best_model()
class_docstr_tok: ["Example",":",">",">",">","auto_est","=","AutoEstimator.from_torch","(","model_creator=model_creator",",","optimizer=get_optimizer",",","loss=nn.BCELoss","(",")",",","logs_dir=","''","\/tmp\/zoo_automl_logs","''",",","resources_per_trial=","{","``","cpu","''",":","2","}",",","name=","''","test_fit","''",")",">",">",">","auto_est.fit","(","data=data",",","validation_data=validation_data",",","search_space=create_linear_search_space","(",")",",","n_sampling=4",",","epochs=1",",","metric=","''","accuracy","''",")",">",">",">","best_model","=","auto_est.get_best_model","(",")"]
code: def _check_spark_dataframe_input(
      data: Union[Tuple["ndarray", "ndarray"], Callable, "DataFrame"],
      validation_data: Optional[
          Union[Callable, Tuple["ndarray", "ndarray"], "DataFrame"]
      ],
      feature_cols: Optional[List[str]],
      label_cols: Optional[List[str]],
  ) -> Tuple[Optional[List[str]], Optional[List[str]]]:
      def check_cols(cols, cols_name):
          if not cols:
              invalidInputError(
                  False,
                  f"You must input valid {cols_name} for Spark DataFrame"
                  f" data input",
              )
          if isinstance(cols, list):
              return cols
          if not isinstance(cols, str):
              invalidInputError(
                  False,
                  f"{cols_name} should be a string or a list of strings, "
                  f"but got {type(cols)}",
              )
          return [cols]
  
      from pyspark.sql import DataFrame
  
      if isinstance(data, DataFrame):
          feature_cols = check_cols(
              feature_cols, cols_name="feature_cols"
          )
          label_cols = check_cols(label_cols, cols_name="label_cols")
          if validation_data:
              if not isinstance(validation_data, DataFrame):
                  invalidInputError(
                      False,
                      f"data and validation_data should be both Spark DataFrame, "
                      f"but got validation_data of type {type(data)}",
                  )
      return feature_cols, label_cols
  
file_path: BigDL/python/orca/src/bigdl/orca/automl/auto_estimator.py
imports: from bigdl.orca.automl.search import SearchEngineFactory
  from bigdl.dllib.utils.log4Error import *
  from bigdl.dllib.utils.log4Error import invalidInputError
  from numpy import ndarray
  from typing import TYPE_CHECKING, Callable, Dict, List, Optional, Tuple, Union, Any
label_desc: Use image node_id 9 for calling the AutoEstimator obj's underlying member method code with example usage: obj._check_spark_dataframe_input(data, validation_data, feature_cols, label_cols) and returns: feature_cols,  label_cols, list, cols