class_docstr: Test case: Create Report using various dataset on pillar 2
  - refer to README in sample_input for more info on dataset
  - please update the config to include other feature in p2
class_docstr_tok: ["Test","case",":","Create","Report","using","various","dataset","on","pillar","2","-","refer","to","README","in","sample_input","for","more","info","on","dataset","-","please","update","the","config","to","include","other","feature","in","p2"]
code: def test_json_generate_report(self):
      # Set seed for reproducibility
      np.random.seed(123456)
      """ Test report rendering with json config file """
      # Load the dataset and prepare training and test sets
      train_file = prepare_input_path(
          working_path="sample_input/housing_price/train.csv"
      )
      data = pd.read_csv(train_file)
      data.dropna(axis=0, subset=["SalePrice"], inplace=True)
      y = data.SalePrice
  
      X = data.drop(["SalePrice", "Id"], axis=1).select_dtypes(
          exclude=["object"]
      )
      train_X, test_X, train_y, test_y = train_test_split(
          X.values, y.values, test_size=0.25
      )
  
      my_imputer = SimpleImputer()
      train_X = my_imputer.fit_transform(train_X)
      test_X = my_imputer.transform(test_X)
  
      my_model = GradientBoostingRegressor(
          n_estimators=1000,
          max_depth=5,
          learning_rate=0.1,
          subsample=0.7,
          random_state=42,
      )
      hist = my_model.fit(train_X, train_y)
  
      X.columns.tolist()
      train_X_df = pd.DataFrame(
          data=train_X, columns=X.columns.tolist()
      )
      clf = my_model
      clf_fn = my_model.predict
      y_train = []
      feature_names = X.columns.tolist()
      target_names_list = ["SalePrice"]
  
      start_time = datetime.now().replace(microsecond=0)
      controller = Controller(config=Configuration(self.json, locals()))
      controller.render()
      end_time = datetime.now().replace(microsecond=0)
  
      # -- PDF Report --
      output = "%s/%s.pdf" % (self.out_path, self.json_writer_pdf_name)
      print("JSON-PDF report generated %s:" % output)
  
      with open(output, "rb") as f:
          pdf = PdfFileReader(f)
          info = pdf.getDocumentInfo()
          number_of_pages = pdf.getNumPages()
  
      print(info)
      self.assertEqual(info["/Title"], self.json_report_name)
  
      # print(info['/CreationDate'])
      report_time = datetime.strptime(
          info["/CreationDate"], "D:%Y%m%d%H%M%S"
      )
      print("{} {} {}".format(start_time, report_time, end_time))
      self.assertTrue(time_in_range(start_time, end_time, report_time))
  
      print(number_of_pages)
      self.assertEqual(
          number_of_pages, self.json_writer_pdf_page_number
      )
  
file_path: contextual-ai/tests/compiler/test_model_interpreter_with_tabular_lime_regression.py
imports: import sys
  import warnings
  import numpy
  import pandas
  from sklearn.model_selection import train_test_split
  from sklearn.impute import SimpleImputer
  from sklearn.ensemble import GradientBoostingRegressor
  from PyPDF2 import PdfFileReader
  from datetime import datetime
  import unittest
  from xai.compiler import Configuration, Controller
  from tests.compiler.util import prepare_template, read_json_source, prepare_input_path, prepare_output_path, time_in_range, remove_temp
label_desc: Use image node_id 3 for calling the TestModelInterpreter obj's underlying member method code with example usage: obj.test_json_generate_report() without return types