class_docstr: This table contains StackedEnsembles created in the xcessiv notebook
class_docstr_tok: ["This","table","contains","StackedEnsembles","created","in","the","xcessiv","notebook"]
docstr: Export the ensemble as a single Python file and saves it to `file_path`.
  
  This is EXPERIMENTAL as putting different modules together would probably wreak havoc
  especially on modules that make heavy use of global variables.
  
  Args:
      file_path (str, unicode): Absolute/local path of place to save file in
  
      cv_source (str, unicode): String containing actual code for base learner
          cross-validation used to generate secondary meta-features.
docstr_tok: ["Export","the","ensemble","as","a","single","Python","file","and","saves","it","to","`","file_path","`",".","This","is","EXPERIMENTAL","as","putting","different","modules","together","would","probably","wreak","havoc","especially","on","modules","that","make","heavy","use","of","global","variables",".","Args",":","file_path","(","str",",","unicode",")",":","Absolute\/local","path","of","place","to","save","file","in","cv_source","(","str",",","unicode",")",":","String","containing","actual","code","for","base","learner","cross-validation","used","to","generate","secondary","meta-features","."]
code: def export_as_file(self, file_path, cv_source):
      """Export the ensemble as a single Python file and saves it to `file_path`.
  
      This is EXPERIMENTAL as putting different modules together would probably wreak havoc
      especially on modules that make heavy use of global variables.
  
      Args:
          file_path (str, unicode): Absolute/local path of place to save file in
  
          cv_source (str, unicode): String containing actual code for base learner
              cross-validation used to generate secondary meta-features.
      """
      if os.path.exists(file_path):
          raise exceptions.UserError(
              "{} already exists".format(file_path)
          )
  
      with open(file_path, "wb") as f:
          f.write(self.export_as_code(cv_source).encode("utf8"))
  
imports: from __future__ import absolute_import, print_function, division, unicode_literals
  import random
  import string
  from sqlalchemy.ext.declarative import declarative_base
  from sqlalchemy import Column, Text, Integer, Boolean, TypeDecorator, ForeignKey, Table, UniqueConstraint
  from sqlalchemy.orm import relationship
  from sqlalchemy.ext import mutable
  import numpy
  import json
  import os
  from sklearn.model_selection import train_test_split
  from xcessiv import constants
  from xcessiv import exceptions
  from xcessiv import functions
  from xcessiv import app
label_desc: Use image node_id 4 for calling the StackedEnsemble obj's underlying member method code with example usage: obj.export_as_file(file_path, cv_source) without return types