86e5a246bdeef14d40f40f2f6689fd67125a7cf4,mindsdb/interfaces/native/native.py,NativeInterface,predict,#NativeInterface#,68

Before Change


            if psutil.virtual_memory().available < 1.2 * pow(10,9):
                self.predictor_cache = {}

            predictor_record = Predictor.query.filter_by(company_id=self.company_id, name=name)
            if predictor_record.data["status"] == "complete":
                self.fs_store.get(name, f"predictor_{self.company_id}_{name}", self.config["paths"]["predictors"])
                self.predictor_cache[name] = {
                    "predictor": mindsdb_native.Predictor(name=name, run_env={"trigger": "mindsdb"}),

After Change


            if psutil.virtual_memory().available < 1.2 * pow(10,9):
                self.predictor_cache = {}

            predictor_record = Predictor.query.filter_by(company_id=self.company_id, name=name).first()
            if predictor_record.data["status"] == "complete":
                self.fs_store.get(name, f"predictor_{self.company_id}_{name}", self.config["paths"]["predictors"])
                self.predictor_cache[name] = {
                    "predictor": mindsdb_native.Predictor(name=name, run_env={"trigger": "mindsdb"}),
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 3

Instances


Project Name: mindsdb/mindsdb
Commit Name: 86e5a246bdeef14d40f40f2f6689fd67125a7cf4
Time: 2021-02-10
Author: george@cerebralab.com
File Name: mindsdb/interfaces/native/native.py
Class Name: NativeInterface
Method Name: predict


Project Name: mindsdb/mindsdb
Commit Name: 36709b70bc52d15f1229362af02e263d6bdc2ca0
Time: 2021-02-11
Author: george@cerebralab.com
File Name: mindsdb/interfaces/native/native.py
Class Name: NativeInterface
Method Name: delete_model


Project Name: mindsdb/mindsdb
Commit Name: 86e5a246bdeef14d40f40f2f6689fd67125a7cf4
Time: 2021-02-10
Author: george@cerebralab.com
File Name: mindsdb/interfaces/native/native.py
Class Name: NativeInterface
Method Name: get_model_data


Project Name: mindsdb/mindsdb
Commit Name: 86e5a246bdeef14d40f40f2f6689fd67125a7cf4
Time: 2021-02-10
Author: george@cerebralab.com
File Name: mindsdb/interfaces/native/native.py
Class Name: NativeInterface
Method Name: create


Project Name: mindsdb/mindsdb
Commit Name: 86e5a246bdeef14d40f40f2f6689fd67125a7cf4
Time: 2021-02-10
Author: george@cerebralab.com
File Name: mindsdb/interfaces/native/learn_process.py
Class Name: LearnProcess
Method Name: run