# Path: xcessiv/models.py
# class JsonEncodedDict(TypeDecorator):
# class JsonEncodedList(TypeDecorator):
# class Extraction(Base):
# class BaseLearnerOrigin(Base):
# class AutomatedRun(Base):
# class BaseLearner(Base):
# class StackedEnsemble(Base):
#     def process_bind_param(self, value, dialect):
#     def process_result_value(self, value, dialect):
#     def process_bind_param(self, value, dialect):
#     def process_result_value(self, value, dialect):
#     def __init__(self):
#     def return_main_dataset(self):
#     def return_train_dataset(self):
#     def return_test_dataset(self):
#     def __init__(self, source='', name='Base Learner Setup',
#                  meta_feature_generator='predict_proba', metric_generators=None):
#     def serialize(self):
#     def return_estimator(self):
#     def cleanup(self, path):
#     def export_as_file(self, filepath, hyperparameters):
#     def __init__(self, source, job_status, category, base_learner_origin=None):
#     def serialize(self):
#     def __init__(self, hyperparameters, job_status, base_learner_origin):
#     def return_estimator(self):
#     def meta_features_path(self, path):
#     def serialize(self):
#     def delete_meta_features(self, path):
#     def cleanup(self, path):
#     def export_as_file(self, filepath):
#     def __init__(self, secondary_learner_hyperparameters, base_learners,
#                  base_learner_origin, job_status):
#     def return_secondary_learner(self):
#     def export_as_code(self, cv_source):
#     def export_as_file(self, file_path, cv_source):
#     def export_as_package(self, package_path, cv_source):
#     def serialize(self):


import unittest
from xcessiv import models
from sklearn.ensemble import RandomForestClassifier
            "\n",
            "\n",
            "def extract_main_dataset():\n",
            "    X, y = load_digits(return_X_y=True)\n",
            "    return X, y"
        ])
        self.extraction.test_dataset['method'] = 'split_from_main'
        self.extraction.test_dataset['split_ratio'] = 0.1
        self.extraction.test_dataset['split_seed'] = 8

    def test_split_main_for_test(self):
        X, y = self.extraction.return_test_dataset()
        assert X.shape == (180, 64)
        assert y.shape == (180,)

    def test_test_dataset_from_source(self):
        self.extraction.test_dataset["method"] = "source"
        self.extraction.test_dataset["source"] = ''.join([
            "from sklearn.datasets import load_digits\n",
            "def extract_test_dataset():\n",
            "    X, y = load_digits(return_X_y=True)\n",
            "    return X, y"
        ])
        X, y = self.extraction.return_test_dataset()
        assert X.shape == (1797, 64)
        assert y.shape == (1797,)


class TestReturnEstimator(unittest.TestCase):
    def setUp(self):

# Path: xcessiv/models.py
# class JsonEncodedDict(TypeDecorator):
# class JsonEncodedList(TypeDecorator):
# class Extraction(Base):
# class BaseLearnerOrigin(Base):
# class AutomatedRun(Base):
# class BaseLearner(Base):
# class StackedEnsemble(Base):
#     def process_bind_param(self, value, dialect):
#     def process_result_value(self, value, dialect):
#     def process_bind_param(self, value, dialect):
#     def process_result_value(self, value, dialect):
#     def __init__(self):
#     def return_main_dataset(self):
#     def return_train_dataset(self):
#     def return_test_dataset(self):
#     def __init__(self, source='', name='Base Learner Setup',
#                  meta_feature_generator='predict_proba', metric_generators=None):
#     def serialize(self):
#     def return_estimator(self):
#     def cleanup(self, path):
#     def export_as_file(self, filepath, hyperparameters):
#     def __init__(self, source, job_status, category, base_learner_origin=None):
#     def serialize(self):
#     def __init__(self, hyperparameters, job_status, base_learner_origin):
#     def return_estimator(self):
#     def meta_features_path(self, path):
#     def serialize(self):
#     def delete_meta_features(self, path):
#     def cleanup(self, path):
#     def export_as_file(self, filepath):
#     def __init__(self, secondary_learner_hyperparameters, base_learners,
#                  base_learner_origin, job_status):
#     def return_secondary_learner(self):
#     def export_as_code(self, cv_source):
#     def export_as_file(self, file_path, cv_source):
#     def export_as_package(self, package_path, cv_source):
#     def serialize(self):


# Path: xcessiv/tests/test_models.py
import unittest
from xcessiv import models
from sklearn.ensemble import RandomForestClassifier

            "\n",
            "\n",
            "def extract_main_dataset():\n",
            "    X, y = load_digits(return_X_y=True)\n",
            "    return X, y"
        ])
        self.extraction.test_dataset['method'] = 'split_from_main'
        self.extraction.test_dataset['split_ratio'] = 0.1
        self.extraction.test_dataset['split_seed'] = 8

    def test_split_main_for_test(self):
        X, y = self.extraction.return_test_dataset()
        assert X.shape == (180, 64)
        assert y.shape == (180,)

    def test_test_dataset_from_source(self):
        self.extraction.test_dataset["method"] = "source"
        self.extraction.test_dataset["source"] = ''.join([
            "from sklearn.datasets import load_digits\n",
            "def extract_test_dataset():\n",
            "    X, y = load_digits(return_X_y=True)\n",
            "    return X, y"
        ])
        X, y = self.extraction.return_test_dataset()
        assert X.shape == (1797, 64)
        assert y.shape == (1797,)


class TestReturnEstimator(unittest.TestCase):
    def setUp(self):

        self.base_learner_origin = models.BaseLearnerOrigin(