ensure backtesting also produces tb_logs, make sure tests are working

This commit is contained in:
robcaulk
2023-05-10 10:11:33 +00:00
parent 172b2587ab
commit b01aaa4d03
3 changed files with 3 additions and 2 deletions

View File

@@ -345,7 +345,9 @@ class IFreqaiModel(ABC):
dk.find_labels(dataframe_train)
try:
self.tb_logger = TBLogger(dk.data_path)
self.model = self.train(dataframe_train, pair, dk)
self.tb_logger.close()
except Exception as msg:
logger.warning(
f"Training {pair} raised exception {msg.__class__.__name__}. "

View File

@@ -194,3 +194,4 @@ def test_get_full_model_path(mocker, freqai_conf, model):
model_path = freqai.dk.get_full_models_path(freqai_conf)
assert model_path.is_dir() is True
shutil.rmtree(Path(freqai.dk.full_path))

View File

@@ -552,8 +552,6 @@ def test_get_state_info(mocker, freqai_conf, dp_exists, caplog, tickers):
if is_mac():
pytest.skip("Reinforcement learning module not available on intel based Mac OS")
if is_py11():
pytest.skip("Reinforcement learning currently not available on python 3.11.")
freqai_conf.update({"freqaimodel": "ReinforcementLearner"})
freqai_conf.update({"timerange": "20180110-20180130"})