From 080eddf9cdd6814af43293c7f1c3d79e01388319 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Monta=C3=B1ana=20G=C3=B3mez?= Date: Fri, 20 Oct 2023 22:52:48 +0200 Subject: [PATCH] Fix hyperparameters output in b_best --- src/Platform/BestResults.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Platform/BestResults.cc b/src/Platform/BestResults.cc index 4a967a1..5ba6e8d 100644 --- a/src/Platform/BestResults.cc +++ b/src/Platform/BestResults.cc @@ -157,7 +157,7 @@ namespace platform { auto datasets = getDatasets(data); int maxDatasetName = (*max_element(datasets.begin(), datasets.end(), [](const string& a, const string& b) { return a.size() < b.size(); })).size(); int maxFileName = 0; - int maxHyper = 0; + int maxHyper = 15; for (auto const& item : data.items()) { maxHyper = max(maxHyper, (int)item.value().at(1).dump().size()); maxFileName = max(maxFileName, (int)item.value().at(2).get().size()); @@ -167,7 +167,7 @@ namespace platform { oss << Colors::GREEN() << "Best results for " << model << " as of " << date << endl; cout << oss.str(); cout << string(oss.str().size() - 8, '-') << endl; - cout << Colors::GREEN() << " # " << setw(maxDatasetName + 1) << left << string("Dataset") << "Score File Hyperparameters" << endl; + cout << Colors::GREEN() << " # " << setw(maxDatasetName + 1) << left << "Dataset" << "Score " << setw(maxFileName) << "File" << " Hyperparameters" << endl; cout << "=== " << string(maxDatasetName, '=') << " =========== " << string(maxFileName, '=') << " " << string(maxHyper, '=') << endl; auto i = 0; bool odd = true;