mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-04-28 13:00:13 +00:00
fix: try plotting as much info in xgboost tensorboard as possible
This commit is contained in:
@@ -46,10 +46,8 @@ class TensorBoardCallback(BaseTensorBoardCallback):
|
|||||||
for data, metric in evals_log.items():
|
for data, metric in evals_log.items():
|
||||||
for metric_name, log in metric.items():
|
for metric_name, log in metric.items():
|
||||||
score = log[-1][0] if isinstance(log[-1], tuple) else log[-1]
|
score = log[-1][0] if isinstance(log[-1], tuple) else log[-1]
|
||||||
if data == "train":
|
key = self._get_key(data, metric_name)
|
||||||
self.writer.add_scalar("train_loss", score, epoch)
|
self.writer.add_scalar(f"{key}_loss", score, epoch)
|
||||||
else:
|
|
||||||
self.writer.add_scalar("valid_loss", score, epoch)
|
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user