code: def start_automated_run(path, automated_run_id):
      """Starts automated run. This will automatically create
      base learners until the run finishes or errors out.
  
      Args:
          path (str): Path to Xcessiv notebook
  
          automated_run_id (str): Automated Run ID
      """
      with functions.DBContextManager(path) as session:
          automated_run = (
              session.query(models.AutomatedRun)
              .filter_by(id=automated_run_id)
              .first()
          )
          if not automated_run:
              raise exceptions.UserError(
                  "Automated run {} "
                  "does not exist".format(automated_run_id)
              )
          automated_run.job_id = get_current_job().id
          automated_run.job_status = "started"
  
          session.add(automated_run)
          session.commit()
  
          try:
              if automated_run.category == "bayes":
                  automatedruns.start_naive_bayes(
                      automated_run, session, path
                  )
  
              elif automated_run.category == "tpot":
                  automatedruns.start_tpot(automated_run, session, path)
  
              elif automated_run.category == "greedy_ensemble_search":
                  automatedruns.start_greedy_ensemble_search(
                      automated_run, session, path
                  )
  
              else:
                  raise Exception(
                      "Something went wrong. Invalid category for automated run"
                  )
  
              automated_run.job_status = "finished"
              session.add(automated_run)
              session.commit()
  
          except:
              session.rollback()
              automated_run.job_status = "errored"
              automated_run.description["error_type"] = repr(
                  sys.exc_info()[0]
              )
              automated_run.description["error_value"] = repr(
                  sys.exc_info()[1]
              )
              automated_run.description[
                  "error_traceback"
              ] = traceback.format_exception(*sys.exc_info())
              session.add(automated_run)
              session.commit()
              raise
  
file_path: xcessiv/xcessiv/rqtasks.py
imports: from __future__ import absolute_import, print_function, division, unicode_literals
  from rq.decorators import job
  from rq import get_current_job
  from xcessiv import functions
  from xcessiv import exceptions
  from xcessiv import models
  from xcessiv import automatedruns
  import numpy
  import os
  import sys
  import traceback
  from sklearn.model_selection import train_test_split
  from six import iteritems
label_desc: Use image node_id 3 for calling a global function with example usage: start_automated_run(path, automated_run_id) without return types