Add folder to manage
This commit is contained in:
@@ -57,7 +57,7 @@ add_executable(b_main commands/b_main.cpp ${main_sources}
|
||||
experimental_clfs/XA1DE.cpp
|
||||
experimental_clfs/ExpClf.cpp
|
||||
)
|
||||
target_link_libraries(b_main "${PyClassifiers}" bayesnet::bayesnet fimdlp ${Python3_LIBRARIES} "${TORCH_LIBRARIES}" Boost::python Boost::numpy)
|
||||
target_link_libraries(b_main PRIVATE nlohmann_json::nlohmann_json "${PyClassifiers}" bayesnet::bayesnet fimdlp ${Python3_LIBRARIES} "${TORCH_LIBRARIES}" Boost::python Boost::numpy)
|
||||
|
||||
# b_manage
|
||||
set(manage_sources ManageScreen.cpp OptionsMenu.cpp ResultsManager.cpp)
|
||||
|
@@ -2,6 +2,7 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include <utility>
|
||||
#include <unistd.h>
|
||||
#include "common/Paths.h"
|
||||
#include <argparse/argparse.hpp>
|
||||
#include "manage/ManageScreen.h"
|
||||
#include <signal.h>
|
||||
@@ -13,6 +14,7 @@ void manageArguments(argparse::ArgumentParser& program, int argc, char** argv)
|
||||
{
|
||||
program.add_argument("-m", "--model").default_value("any").help("Filter results of the selected model)");
|
||||
program.add_argument("-s", "--score").default_value("any").help("Filter results of the score name supplied");
|
||||
program.add_argument("--folder").help("Results folder to use").default_value(platform::Paths::results());
|
||||
program.add_argument("--platform").default_value("any").help("Filter results of the selected platform");
|
||||
program.add_argument("--complete").help("Show only results with all datasets").default_value(false).implicit_value(true);
|
||||
program.add_argument("--partial").help("Show only partial results").default_value(false).implicit_value(true);
|
||||
@@ -116,6 +118,7 @@ int main(int argc, char** argv)
|
||||
auto program = argparse::ArgumentParser("b_manage", { platform_project_version.begin(), platform_project_version.end() });
|
||||
manageArguments(program, argc, argv);
|
||||
std::string model = program.get<std::string>("model");
|
||||
std::string path = program.get<std::string>("folder");
|
||||
std::string score = program.get<std::string>("score");
|
||||
std::string platform = program.get<std::string>("platform");
|
||||
bool complete = program.get<bool>("complete");
|
||||
@@ -125,7 +128,7 @@ int main(int argc, char** argv)
|
||||
partial = false;
|
||||
signal(SIGWINCH, handleResize);
|
||||
auto [rows, cols] = numRowsCols();
|
||||
manager = new platform::ManageScreen(rows, cols, model, score, platform, complete, partial, compare);
|
||||
manager = new platform::ManageScreen(path, rows, cols, model, score, platform, complete, partial, compare);
|
||||
manager->doMenu();
|
||||
auto fileName = manager->getExcelFileName();
|
||||
delete manager;
|
||||
|
@@ -18,8 +18,8 @@ namespace platform {
|
||||
const std::string STATUS_OK = "Ok.";
|
||||
const std::string STATUS_COLOR = Colors::GREEN();
|
||||
|
||||
ManageScreen::ManageScreen(int rows, int cols, const std::string& model, const std::string& score, const std::string& platform, bool complete, bool partial, bool compare) :
|
||||
rows{ rows }, cols{ cols }, complete{ complete }, partial{ partial }, compare{ compare }, didExcel(false), results(ResultsManager(model, score, platform, complete, partial))
|
||||
ManageScreen::ManageScreen(const std::string path, int rows, int cols, const std::string& model, const std::string& score, const std::string& platform, bool complete, bool partial, bool compare) :
|
||||
rows{ rows }, cols{ cols }, complete{ complete }, partial{ partial }, compare{ compare }, didExcel(false), results(ResultsManager(path, model, score, platform, complete, partial))
|
||||
{
|
||||
results.load();
|
||||
openExcel = false;
|
||||
|
@@ -15,7 +15,7 @@ namespace platform {
|
||||
};
|
||||
class ManageScreen {
|
||||
public:
|
||||
ManageScreen(int rows, int cols, const std::string& model, const std::string& score, const std::string& platform, bool complete, bool partial, bool compare);
|
||||
ManageScreen(const std::string path, int rows, int cols, const std::string& model, const std::string& score, const std::string& platform, bool complete, bool partial, bool compare);
|
||||
~ManageScreen() = default;
|
||||
void doMenu();
|
||||
void updateSize(int rows, int cols);
|
||||
|
@@ -1,10 +1,9 @@
|
||||
#include <algorithm>
|
||||
#include "common/Paths.h"
|
||||
#include "ResultsManager.h"
|
||||
|
||||
namespace platform {
|
||||
ResultsManager::ResultsManager(const std::string& model, const std::string& score, const std::string& platform, bool complete, bool partial) :
|
||||
path(Paths::results()), model(model), scoreName(score), platform(platform), complete(complete), partial(partial), maxModel(0), maxTitle(0)
|
||||
ResultsManager::ResultsManager(const std::string& path_, const std::string& model, const std::string& score, const std::string& platform, bool complete, bool partial) :
|
||||
path(path_), model(model), scoreName(score), platform(platform), complete(complete), partial(partial), maxModel(0), maxTitle(0)
|
||||
{
|
||||
}
|
||||
void ResultsManager::load()
|
||||
|
@@ -18,7 +18,7 @@ namespace platform {
|
||||
};
|
||||
class ResultsManager {
|
||||
public:
|
||||
ResultsManager(const std::string& model, const std::string& score, const std::string& platform, bool complete, bool partial);
|
||||
ResultsManager(const std::string& path_, const std::string& model, const std::string& score, const std::string& platform, bool complete, bool partial);
|
||||
void load(); // Loads the list of results
|
||||
void sortResults(SortField field, SortType type); // Sorts the list of results
|
||||
void sortDate(SortType type);
|
||||
|
Reference in New Issue
Block a user