ensure backtesting also produces tb_logs, make sure tests are working
This commit is contained in:
@@ -345,7 +345,9 @@ class IFreqaiModel(ABC):
|
|||||||
dk.find_labels(dataframe_train)
|
dk.find_labels(dataframe_train)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
self.tb_logger = TBLogger(dk.data_path)
|
||||||
self.model = self.train(dataframe_train, pair, dk)
|
self.model = self.train(dataframe_train, pair, dk)
|
||||||
|
self.tb_logger.close()
|
||||||
except Exception as msg:
|
except Exception as msg:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
f"Training {pair} raised exception {msg.__class__.__name__}. "
|
f"Training {pair} raised exception {msg.__class__.__name__}. "
|
||||||
|
|||||||
@@ -194,3 +194,4 @@ def test_get_full_model_path(mocker, freqai_conf, model):
|
|||||||
|
|
||||||
model_path = freqai.dk.get_full_models_path(freqai_conf)
|
model_path = freqai.dk.get_full_models_path(freqai_conf)
|
||||||
assert model_path.is_dir() is True
|
assert model_path.is_dir() is True
|
||||||
|
shutil.rmtree(Path(freqai.dk.full_path))
|
||||||
|
|||||||
@@ -552,8 +552,6 @@ def test_get_state_info(mocker, freqai_conf, dp_exists, caplog, tickers):
|
|||||||
|
|
||||||
if is_mac():
|
if is_mac():
|
||||||
pytest.skip("Reinforcement learning module not available on intel based Mac OS")
|
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({"freqaimodel": "ReinforcementLearner"})
|
||||||
freqai_conf.update({"timerange": "20180110-20180130"})
|
freqai_conf.update({"timerange": "20180110-20180130"})
|
||||||
|
|||||||
Reference in New Issue
Block a user