Rename and move analysis_lock to data_kitchen
This commit is contained in:
@@ -3,6 +3,7 @@ import datetime
|
||||
import logging
|
||||
import shutil
|
||||
from pathlib import Path
|
||||
from threading import Lock
|
||||
from typing import Any, Dict, List, Tuple
|
||||
|
||||
import numpy as np
|
||||
@@ -70,6 +71,8 @@ class FreqaiDataKitchen:
|
||||
self.model_filename: str = ""
|
||||
self.live = live
|
||||
self.pair = pair
|
||||
self.analysis_lock = Lock()
|
||||
|
||||
self.svm_model: linear_model.SGDOneClassSVM = None
|
||||
self.keras: bool = self.freqai_config.get("keras", False)
|
||||
self.set_all_pairs()
|
||||
@@ -961,7 +964,7 @@ class FreqaiDataKitchen:
|
||||
for tf in tfs:
|
||||
if tf == tfs[-1]:
|
||||
sgi = True # doing this last allows user to use all tf raw prices in labels
|
||||
with strategy.freqai.lock:
|
||||
with self.analysis_lock:
|
||||
dataframe = strategy.populate_any_indicators(
|
||||
pair,
|
||||
dataframe.copy(),
|
||||
@@ -969,7 +972,7 @@ class FreqaiDataKitchen:
|
||||
informative=base_dataframes[tf],
|
||||
set_generalized_indicators=sgi
|
||||
)
|
||||
with strategy.freqai.lock:
|
||||
with self.analysis_lock:
|
||||
if pairs:
|
||||
for i in pairs:
|
||||
if pair in i:
|
||||
|
Reference in New Issue
Block a user