mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
cleanup tests, cross fingers that mac will pass
This commit is contained in:
parent
7d15c379cb
commit
adeab13bdf
|
@ -2,7 +2,7 @@ import logging
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
import xgboost as xgb
|
from xgboost.callback import TrainingCallback
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
@ -20,14 +20,14 @@ class BaseTensorboardLogger:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
class BaseTensorBoardCallback(xgb.callback.TrainingCallback):
|
class BaseTensorBoardCallback(TrainingCallback):
|
||||||
|
|
||||||
def __init__(self, logdir: Path, activate: bool = True):
|
def __init__(self, logdir: Path, activate: bool = True):
|
||||||
logger.warning("Tensorboard is not installed, no logs will be written."
|
logger.warning("Tensorboard is not installed, no logs will be written."
|
||||||
"Ensure torch is installed, or use the torch/RL docker images")
|
"Ensure torch is installed, or use the torch/RL docker images")
|
||||||
|
|
||||||
def after_iteration(
|
def after_iteration(
|
||||||
self, model, epoch: int, evals_log: xgb.callback.TrainingCallback.EvalsLog
|
self, model, epoch: int, evals_log: TrainingCallback.EvalsLog
|
||||||
) -> bool:
|
) -> bool:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@ def freqai_conf(default_conf, tmpdir):
|
||||||
"identifier": "uniqe-id100",
|
"identifier": "uniqe-id100",
|
||||||
"live_trained_timestamp": 0,
|
"live_trained_timestamp": 0,
|
||||||
"data_kitchen_thread_count": 2,
|
"data_kitchen_thread_count": 2,
|
||||||
|
"activate_tensorboard": False,
|
||||||
"feature_parameters": {
|
"feature_parameters": {
|
||||||
"include_timeframes": ["5m"],
|
"include_timeframes": ["5m"],
|
||||||
"include_corr_pairlist": ["ADA/BTC"],
|
"include_corr_pairlist": ["ADA/BTC"],
|
||||||
|
|
|
@ -183,7 +183,6 @@ def test_get_full_model_path(mocker, freqai_conf, model):
|
||||||
strategy.freqai_info = freqai_conf.get("freqai", {})
|
strategy.freqai_info = freqai_conf.get("freqai", {})
|
||||||
freqai = strategy.freqai
|
freqai = strategy.freqai
|
||||||
freqai.live = True
|
freqai.live = True
|
||||||
freqai.activate_tensorboard = False
|
|
||||||
freqai.dk = FreqaiDataKitchen(freqai_conf)
|
freqai.dk = FreqaiDataKitchen(freqai_conf)
|
||||||
freqai.dk.live = True
|
freqai.dk.live = True
|
||||||
timerange = TimeRange.parse_timerange("20180110-20180130")
|
timerange = TimeRange.parse_timerange("20180110-20180130")
|
||||||
|
|
|
@ -36,9 +36,6 @@ def can_run_model(model: str) -> None:
|
||||||
if is_pytorch_model and is_mac() and not is_arm():
|
if is_pytorch_model and is_mac() and not is_arm():
|
||||||
pytest.skip("Reinforcement learning / PyTorch module not available on intel based Mac OS.")
|
pytest.skip("Reinforcement learning / PyTorch module not available on intel based Mac OS.")
|
||||||
|
|
||||||
if "XGBoost" in model and is_mac():
|
|
||||||
pytest.skip("Mac github CI does not have enough memory/threads to run this test.")
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize('model, pca, dbscan, float32, can_short, shuffle, buffer', [
|
@pytest.mark.parametrize('model, pca, dbscan, float32, can_short, shuffle, buffer', [
|
||||||
('LightGBMRegressor', True, False, True, True, False, 0),
|
('LightGBMRegressor', True, False, True, True, False, 0),
|
||||||
|
@ -147,7 +144,6 @@ def test_extract_data_and_train_model_MultiTargets(mocker, freqai_conf, model, s
|
||||||
strategy.freqai_info = freqai_conf.get("freqai", {})
|
strategy.freqai_info = freqai_conf.get("freqai", {})
|
||||||
freqai = strategy.freqai
|
freqai = strategy.freqai
|
||||||
freqai.live = True
|
freqai.live = True
|
||||||
freqai.activate_tensorboard = False
|
|
||||||
freqai.dk = FreqaiDataKitchen(freqai_conf)
|
freqai.dk = FreqaiDataKitchen(freqai_conf)
|
||||||
freqai.dk.live = True
|
freqai.dk.live = True
|
||||||
timerange = TimeRange.parse_timerange("20180110-20180130")
|
timerange = TimeRange.parse_timerange("20180110-20180130")
|
||||||
|
@ -192,7 +188,6 @@ def test_extract_data_and_train_model_Classifiers(mocker, freqai_conf, model):
|
||||||
strategy.freqai_info = freqai_conf.get("freqai", {})
|
strategy.freqai_info = freqai_conf.get("freqai", {})
|
||||||
freqai = strategy.freqai
|
freqai = strategy.freqai
|
||||||
freqai.live = True
|
freqai.live = True
|
||||||
freqai.activate_tensorboard = False
|
|
||||||
freqai.dk = FreqaiDataKitchen(freqai_conf)
|
freqai.dk = FreqaiDataKitchen(freqai_conf)
|
||||||
freqai.dk.live = True
|
freqai.dk.live = True
|
||||||
timerange = TimeRange.parse_timerange("20180110-20180130")
|
timerange = TimeRange.parse_timerange("20180110-20180130")
|
||||||
|
@ -322,7 +317,6 @@ def test_start_backtesting_subdaily_backtest_period(mocker, freqai_conf):
|
||||||
strategy.freqai_info = freqai_conf.get("freqai", {})
|
strategy.freqai_info = freqai_conf.get("freqai", {})
|
||||||
freqai = strategy.freqai
|
freqai = strategy.freqai
|
||||||
freqai.live = False
|
freqai.live = False
|
||||||
freqai.activate_tensorboard = False
|
|
||||||
freqai.dk = FreqaiDataKitchen(freqai_conf)
|
freqai.dk = FreqaiDataKitchen(freqai_conf)
|
||||||
timerange = TimeRange.parse_timerange("20180110-20180130")
|
timerange = TimeRange.parse_timerange("20180110-20180130")
|
||||||
freqai.dd.load_all_pair_histories(timerange, freqai.dk)
|
freqai.dd.load_all_pair_histories(timerange, freqai.dk)
|
||||||
|
@ -442,7 +436,6 @@ def test_principal_component_analysis(mocker, freqai_conf):
|
||||||
strategy.freqai_info = freqai_conf.get("freqai", {})
|
strategy.freqai_info = freqai_conf.get("freqai", {})
|
||||||
freqai = strategy.freqai
|
freqai = strategy.freqai
|
||||||
freqai.live = True
|
freqai.live = True
|
||||||
freqai.activate_tensorboard = False
|
|
||||||
freqai.dk = FreqaiDataKitchen(freqai_conf)
|
freqai.dk = FreqaiDataKitchen(freqai_conf)
|
||||||
freqai.dk.live = True
|
freqai.dk.live = True
|
||||||
timerange = TimeRange.parse_timerange("20180110-20180130")
|
timerange = TimeRange.parse_timerange("20180110-20180130")
|
||||||
|
@ -476,7 +469,6 @@ def test_plot_feature_importance(mocker, freqai_conf):
|
||||||
strategy.freqai_info = freqai_conf.get("freqai", {})
|
strategy.freqai_info = freqai_conf.get("freqai", {})
|
||||||
freqai = strategy.freqai
|
freqai = strategy.freqai
|
||||||
freqai.live = True
|
freqai.live = True
|
||||||
freqai.activate_tensorboard = False
|
|
||||||
freqai.dk = FreqaiDataKitchen(freqai_conf)
|
freqai.dk = FreqaiDataKitchen(freqai_conf)
|
||||||
freqai.dk.live = True
|
freqai.dk.live = True
|
||||||
timerange = TimeRange.parse_timerange("20180110-20180130")
|
timerange = TimeRange.parse_timerange("20180110-20180130")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user