class_docstr: Integration with the AutoKeras ML library.
class_docstr_tok: ["Integration","with","the","AutoKeras","ML","library","."]
docstr: Create and tune AutoKeras model using the input df.
  
  Saves the AutoKeras best model params to model storage.
docstr_tok: ["Create","and","tune","AutoKeras","model","using","the","input","df",".","Saves","the","AutoKeras","best","model","params","to","model","storage","."]
code: def create(
      self,
      target: str,
      df: Optional[pd.DataFrame] = None,
      args: Optional[dict] = None,
  ) -> None:
      """Create and tune AutoKeras model using the input df.
  
      Saves the AutoKeras best model params to model storage.
      """
      args = args["using"]  # ignore the rest of the problem definition
      args["target"] = target
      max_trials = (
          int(args["train_time"] * DEFAULT_TRIALS)
          if "train_time" in args
          else DEFAULT_TRIALS
      )
      # Save the training df in order to filter the training data based on the predict df
      args["training_df"] = df.to_json()
      args["training_data_column_count"] = (
          len(df.columns) - 1
      )  # subtract 1 for target
  
      random_string = "".join(
          random.choices(string.ascii_uppercase + string.digits, k=24)
      )
      args["folder_path"] = os.path.join("autokeras", random_string)
  
      model, args["data_column_names"] = train_model(
          df, target, max_trials
      )
      model.save(args["folder_path"])
      self.model_storage.json_set("predict_args", args)
  
file_path: mindsdb/mindsdb/integrations/handlers/autokeras_handler/autokeras_handler.py
imports: import os
  import random
  import string
  from typing import Optional
  import numpy
  import pandas
  import autokeras
  from sklearn import preprocessing
  from tensorflow.keras.models import load_model
  from mindsdb.integrations.libs.base import BaseMLEngine
label_desc: Use image node_id 1 for calling the AutokerasHandler obj's underlying member method code with example usage: obj.create(target, df, args) without return types