fix tensorboard path so that users can track all historical models

This commit is contained in:
robcaulk
2022-08-31 16:50:39 +02:00
parent 2493e0c8a5
commit 240b529533
3 changed files with 6 additions and 6 deletions

View File

@@ -28,14 +28,14 @@ class ReinforcementLearner(BaseReinforcementLearningModel):
if dk.pair not in self.dd.model_dictionary or not self.continual_learning:
model = self.MODELCLASS(self.policy_type, self.train_env, policy_kwargs=policy_kwargs,
tensorboard_log=Path(dk.data_path / "tensorboard"),
tensorboard_log=Path(
dk.full_path / "tensorboard" / dk.pair.split('/')[0]),
**self.freqai_info['model_training_parameters']
)
else:
logger.info('Continual training activated - starting training from previously '
'trained agent.')
model = self.dd.model_dictionary[dk.pair]
model.tensorboard_log = Path(dk.data_path / "tensorboard")
model.set_env(self.train_env)
model.learn(

View File

@@ -31,14 +31,14 @@ class ReinforcementLearner_multiproc(BaseReinforcementLearningModel):
if dk.pair not in self.dd.model_dictionary or not self.continual_learning:
model = self.MODELCLASS(self.policy_type, self.train_env, policy_kwargs=policy_kwargs,
tensorboard_log=Path(dk.full_path / "tensorboard"),
tensorboard_log=Path(
dk.full_path / "tensorboard" / dk.pair.split('/')[0]),
**self.freqai_info['model_training_parameters']
)
else:
logger.info('Continual learning activated - starting training from previously '
'trained agent.')
model = self.dd.model_dictionary[dk.pair]
model.tensorboard_log = Path(dk.data_path / "tensorboard")
model.set_env(self.train_env)
model.learn(