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");
|
writeString(row, 4, "Hyperparameters", "bodyHeader");
|
||||||
auto i = 0;
|
auto i = 0;
|
||||||
string hyperparameters;
|
string hyperparameters;
|
||||||
int hypSize = 0;
|
int hypSize = 22;
|
||||||
map<string, string> files; // map of files imported and their tabs
|
map<string, string> files; // map of files imported and their tabs
|
||||||
for (auto const& item : data.items()) {
|
for (auto const& item : data.items()) {
|
||||||
row++;
|
row++;
|
||||||
|
@ -22,6 +22,10 @@ namespace platform {
|
|||||||
}
|
}
|
||||||
void ManageResults::doMenu()
|
void ManageResults::doMenu()
|
||||||
{
|
{
|
||||||
|
if (results.empty()) {
|
||||||
|
cout << Colors::MAGENTA() << "No results found!" << Colors::RESET() << endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
results.sortDate();
|
results.sortDate();
|
||||||
list();
|
list();
|
||||||
menu();
|
menu();
|
||||||
@ -32,10 +36,6 @@ namespace platform {
|
|||||||
}
|
}
|
||||||
void ManageResults::list()
|
void ManageResults::list()
|
||||||
{
|
{
|
||||||
if (results.empty()) {
|
|
||||||
cout << Colors::MAGENTA() << "No results found!" << Colors::RESET() << endl;
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
auto temp = ConfigLocale();
|
auto temp = ConfigLocale();
|
||||||
string suffix = numFiles != results.size() ? " of " + to_string(results.size()) : "";
|
string suffix = numFiles != results.size() ? " of " + to_string(results.size()) : "";
|
||||||
stringstream oss;
|
stringstream oss;
|
||||||
|
@ -1,12 +1,17 @@
|
|||||||
#include "Results.h"
|
#include "Results.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
namespace platform {
|
namespace platform {
|
||||||
Results::Results(const string& path, const string& model, const string& score, bool complete, bool partial) :
|
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)
|
path(path), model(model), scoreName(score), complete(complete), partial(partial)
|
||||||
{
|
{
|
||||||
load();
|
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()
|
void Results::load()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user