class_docstr: Wrapper class that wraps GBDT models as DeepChem models.
  
  This class supports LightGBM/XGBoost models.
class_docstr_tok: ["Wrapper","class","that","wraps","GBDT","models","as","DeepChem","models",".","This","class","supports","LightGBM\/XGBoost","models","."]
docstr: Fits GDBT model with valid data.
  
  Parameters
  ----------
  train_dataset: Dataset
      The `Dataset` to train this model on.
  valid_dataset: Dataset
      The `Dataset` to validate this model on.
docstr_tok: ["Fits","GDBT","model","with","valid","data",".","Parameters","--","--","--","--","--","train_dataset",":","Dataset","The","`","Dataset","`","to","train","this","model","on",".","valid_dataset",":","Dataset","The","`","Dataset","`","to","validate","this","model","on","."]
code: def fit_with_eval(
      self, train_dataset: Dataset, valid_dataset: Dataset
  ):
      """Fits GDBT model with valid data.
  
      Parameters
      ----------
      train_dataset: Dataset
          The `Dataset` to train this model on.
      valid_dataset: Dataset
          The `Dataset` to validate this model on.
      """
      X_train, X_valid = train_dataset.X, valid_dataset.X
      y_train, y_valid = np.squeeze(train_dataset.y), np.squeeze(
          valid_dataset.y
      )
  
      # GDBT doesn't support multi-output(task)
      if len(y_train.shape) != 1 or len(y_valid.shape) != 1:
          raise ValueError(
              "GDBT model doesn't support multi-output(task)"
          )
  
      self.model.fit(
          X_train,
          y_train,
          callbacks=self.callbacks,
          eval_metric=self.eval_metric,
          eval_set=[(X_valid, y_valid)],
      )
  
file_path: deepchem/deepchem/models/gbdt_models/gbdt_model.py
imports: import os
  import logging
  import tempfile
  import warnings
  from typing import Callable, Optional, Union
  import numpy
  from sklearn.base import BaseEstimator
  from sklearn.model_selection import train_test_split
  from deepchem.data import Dataset
  from deepchem.models.sklearn_models import SklearnModel
label_desc: Use image node_id 4 for calling the GBDTModel obj's underlying member method code with example usage: obj.fit_with_eval(train_dataset, valid_dataset) without return types