Fix mistake when no results in manage
This commit is contained in:
parent
84cec0c1e0
commit
a8f9800631
@ -75,7 +75,7 @@ namespace platform {
|
||||
writeString(row, 4, "Hyperparameters", "bodyHeader");
|
||||
auto i = 0;
|
||||
string hyperparameters;
|
||||
int hypSize = 0;
|
||||
int hypSize = 22;
|
||||
map<string, string> files; // map of files imported and their tabs
|
||||
for (auto const& item : data.items()) {
|
||||
row++;
|
||||
|
@ -22,6 +22,10 @@ namespace platform {
|
||||
}
|
||||
void ManageResults::doMenu()
|
||||
{
|
||||
if (results.empty()) {
|
||||
cout << Colors::MAGENTA() << "No results found!" << Colors::RESET() << endl;
|
||||
return;
|
||||
}
|
||||
results.sortDate();
|
||||
list();
|
||||
menu();
|
||||
@ -32,10 +36,6 @@ namespace platform {
|
||||
}
|
||||
void ManageResults::list()
|
||||
{
|
||||
if (results.empty()) {
|
||||
cout << Colors::MAGENTA() << "No results found!" << Colors::RESET() << endl;
|
||||
exit(0);
|
||||
}
|
||||
auto temp = ConfigLocale();
|
||||
string suffix = numFiles != results.size() ? " of " + to_string(results.size()) : "";
|
||||
stringstream oss;
|
||||
|
@ -1,12 +1,17 @@
|
||||
#include "Results.h"
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
namespace platform {
|
||||
Results::Results(const string& path, const string& model, const string& score, bool complete, bool partial) :
|
||||
path(path), model(model), scoreName(score), complete(complete), partial(partial)
|
||||
{
|
||||
load();
|
||||
maxModel = (*max_element(files.begin(), files.end(), [](const Result& a, const Result& b) { return a.getModel().size() < b.getModel().size(); })).getModel().size();
|
||||
if (!files.empty()) {
|
||||
maxModel = (*max_element(files.begin(), files.end(), [](const Result& a, const Result& b) { return a.getModel().size() < b.getModel().size(); })).getModel().size();
|
||||
} else {
|
||||
maxModel = 0;
|
||||
}
|
||||
};
|
||||
void Results::load()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user