Add folder to manage
This commit is contained in:
@@ -22,7 +22,6 @@ set(CMAKE_CXX_FLAGS_DEBUG " ${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage -O
|
|||||||
|
|
||||||
# Options
|
# Options
|
||||||
# -------
|
# -------
|
||||||
option(BAYESNET_VCPKG_CONFIG "Use vcpkg version of BayesNet" ON)
|
|
||||||
option(ENABLE_TESTING "Unit testing build" OFF)
|
option(ENABLE_TESTING "Unit testing build" OFF)
|
||||||
option(CODE_COVERAGE "Collect coverage from test library" OFF)
|
option(CODE_COVERAGE "Collect coverage from test library" OFF)
|
||||||
|
|
||||||
@@ -75,29 +74,18 @@ find_package(Torch CONFIG REQUIRED)
|
|||||||
find_package(fimdlp CONFIG REQUIRED)
|
find_package(fimdlp CONFIG REQUIRED)
|
||||||
find_package(folding CONFIG REQUIRED)
|
find_package(folding CONFIG REQUIRED)
|
||||||
find_package(argparse CONFIG REQUIRED)
|
find_package(argparse CONFIG REQUIRED)
|
||||||
|
find_package(nlohmann_json CONFIG REQUIRED)
|
||||||
find_package(Boost REQUIRED COMPONENTS python)
|
find_package(Boost REQUIRED COMPONENTS python)
|
||||||
find_package(arff-files CONFIG REQUIRED)
|
find_package(arff-files CONFIG REQUIRED)
|
||||||
|
|
||||||
find_package(ZLIB REQUIRED)
|
|
||||||
find_library(LIBZIP_LIBRARY NAMES zip)
|
|
||||||
|
|
||||||
# BayesNet
|
# BayesNet
|
||||||
# if set to ON it will use the vcpkg version of BayesNet else it will use the locally installed version
|
find_library(bayesnet NAMES libbayesnet bayesnet libbayesnet.a PATHS ${Platform_SOURCE_DIR}/../lib/lib REQUIRED)
|
||||||
if (BAYESNET_VCPKG_CONFIG)
|
find_path(Bayesnet_INCLUDE_DIRS REQUIRED NAMES bayesnet PATHS ${Platform_SOURCE_DIR}/../lib/include)
|
||||||
message(STATUS "Using BayesNet vcpkg config")
|
add_library(bayesnet::bayesnet UNKNOWN IMPORTED)
|
||||||
find_package(bayesnet CONFIG REQUIRED)
|
set_target_properties(bayesnet::bayesnet PROPERTIES
|
||||||
set(BayesNet_LIBRARIES bayesnet::bayesnet)
|
IMPORTED_LOCATION ${bayesnet}
|
||||||
else(BAYESNET_VCPKG_CONFIG)
|
INTERFACE_INCLUDE_DIRECTORIES ${Bayesnet_INCLUDE_DIRS})
|
||||||
message(STATUS "Using BayesNet local library config")
|
message(STATUS "BayesNet=${bayesnet}")
|
||||||
find_library(bayesnet NAMES libbayesnet bayesnet libbayesnet.a PATHS ${Platform_SOURCE_DIR}/../lib/lib REQUIRED)
|
|
||||||
find_path(Bayesnet_INCLUDE_DIRS REQUIRED NAMES bayesnet PATHS ${Platform_SOURCE_DIR}/../lib/include)
|
|
||||||
add_library(bayesnet::bayesnet UNKNOWN IMPORTED)
|
|
||||||
set_target_properties(bayesnet::bayesnet PROPERTIES
|
|
||||||
IMPORTED_LOCATION ${bayesnet}
|
|
||||||
INTERFACE_INCLUDE_DIRECTORIES ${Bayesnet_INCLUDE_DIRS}
|
|
||||||
)
|
|
||||||
endif(BAYESNET_VCPKG_CONFIG)
|
|
||||||
message(STATUS "BayesNet_LIBRARIES=${BayesNet_LIBRARIES}")
|
|
||||||
message(STATUS "BayesNet_INCLUDE_DIRS=${Bayesnet_INCLUDE_DIRS}")
|
message(STATUS "BayesNet_INCLUDE_DIRS=${Bayesnet_INCLUDE_DIRS}")
|
||||||
|
|
||||||
# PyClassifiers
|
# PyClassifiers
|
||||||
|
19
Makefile
19
Makefile
@@ -1,6 +1,6 @@
|
|||||||
SHELL := /bin/bash
|
SHELL := /bin/bash
|
||||||
.DEFAULT_GOAL := help
|
.DEFAULT_GOAL := help
|
||||||
.PHONY: init clean coverage setup help build test clean debug release buildr buildd install dependency testp testb clang-uml debug_local release_local example
|
.PHONY: init clean coverage setup help build test clean debug release buildr buildd install dependency testp testb clang-uml example
|
||||||
|
|
||||||
f_release = build_Release
|
f_release = build_Release
|
||||||
f_debug = build_Debug
|
f_debug = build_Debug
|
||||||
@@ -80,28 +80,15 @@ debug: ## Build a debug version of the project with BayesNet from vcpkg
|
|||||||
@echo ">>> Building Debug Platform...";
|
@echo ">>> Building Debug Platform...";
|
||||||
@if [ -d ./$(f_debug) ]; then rm -rf ./$(f_debug); fi
|
@if [ -d ./$(f_debug) ]; then rm -rf ./$(f_debug); fi
|
||||||
@mkdir $(f_debug);
|
@mkdir $(f_debug);
|
||||||
@cmake -S . -B $(f_debug) -DBAYESNET_VCPKG_CONFIG=ON -D CMAKE_BUILD_TYPE=Debug -D ENABLE_TESTING=ON -D CODE_COVERAGE=ON -D CMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake
|
@cmake -S . -B $(f_debug) -D CMAKE_BUILD_TYPE=Debug -D ENABLE_TESTING=ON -D CODE_COVERAGE=ON -D CMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake
|
||||||
@echo ">>> Done";
|
|
||||||
|
|
||||||
debug_local: ## Build a debug version of the project with BayesNet local
|
|
||||||
@echo ">>> Building Debug Platform...";
|
|
||||||
@if [ -d ./$(f_debug) ]; then rm -rf ./$(f_debug); fi
|
|
||||||
@mkdir $(f_debug);
|
|
||||||
@cmake -S . -B $(f_debug) -DBAYESNET_VCPKG_CONFIG=OFF -D CMAKE_BUILD_TYPE=Debug -D ENABLE_TESTING=ON -D CODE_COVERAGE=ON -D CMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake
|
|
||||||
@echo ">>> Done";
|
@echo ">>> Done";
|
||||||
|
|
||||||
release: ## Build a Release version of the project with BayesNet from vcpkg
|
release: ## Build a Release version of the project with BayesNet from vcpkg
|
||||||
@echo ">>> Building Release Platform...";
|
@echo ">>> Building Release Platform...";
|
||||||
@if [ -d ./$(f_release) ]; then rm -rf ./$(f_release); fi
|
@if [ -d ./$(f_release) ]; then rm -rf ./$(f_release); fi
|
||||||
@mkdir $(f_release);
|
@mkdir $(f_release);
|
||||||
@cmake -S . -B $(f_release) -DBAYESNET_VCPKG_CONFIG=ON -D CMAKE_BUILD_TYPE=Release -D CMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake
|
@cmake -S . -B $(f_release) -D CMAKE_BUILD_TYPE=Release -D CMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake
|
||||||
@echo ">>> Done";
|
@echo ">>> Done";
|
||||||
release_local: ## Build a Release version of the project with BayesNet local
|
|
||||||
@echo ">>> Building Release Platform...";
|
|
||||||
@if [ -d ./$(f_release) ]; then rm -rf ./$(f_release); fi
|
|
||||||
@mkdir $(f_release);
|
|
||||||
@cmake -S . -B $(f_release) -DBAYESNET_VCPKG_CONFIG=OFF -D CMAKE_BUILD_TYPE=Release -D CMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake
|
|
||||||
@echo ">>> Done";
|
|
||||||
|
|
||||||
opt = ""
|
opt = ""
|
||||||
test: ## Run tests (opt="-s") to verbose output the tests, (opt="-c='Test Maximum Spanning Tree'") to run only that section
|
test: ## Run tests (opt="-s") to verbose output the tests, (opt="-c='Test Maximum Spanning Tree'") to run only that section
|
||||||
|
@@ -57,7 +57,7 @@ add_executable(b_main commands/b_main.cpp ${main_sources}
|
|||||||
experimental_clfs/XA1DE.cpp
|
experimental_clfs/XA1DE.cpp
|
||||||
experimental_clfs/ExpClf.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
|
# b_manage
|
||||||
set(manage_sources ManageScreen.cpp OptionsMenu.cpp ResultsManager.cpp)
|
set(manage_sources ManageScreen.cpp OptionsMenu.cpp ResultsManager.cpp)
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include "common/Paths.h"
|
||||||
#include <argparse/argparse.hpp>
|
#include <argparse/argparse.hpp>
|
||||||
#include "manage/ManageScreen.h"
|
#include "manage/ManageScreen.h"
|
||||||
#include <signal.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("-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("-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("--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("--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);
|
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() });
|
auto program = argparse::ArgumentParser("b_manage", { platform_project_version.begin(), platform_project_version.end() });
|
||||||
manageArguments(program, argc, argv);
|
manageArguments(program, argc, argv);
|
||||||
std::string model = program.get<std::string>("model");
|
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 score = program.get<std::string>("score");
|
||||||
std::string platform = program.get<std::string>("platform");
|
std::string platform = program.get<std::string>("platform");
|
||||||
bool complete = program.get<bool>("complete");
|
bool complete = program.get<bool>("complete");
|
||||||
@@ -125,7 +128,7 @@ int main(int argc, char** argv)
|
|||||||
partial = false;
|
partial = false;
|
||||||
signal(SIGWINCH, handleResize);
|
signal(SIGWINCH, handleResize);
|
||||||
auto [rows, cols] = numRowsCols();
|
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();
|
manager->doMenu();
|
||||||
auto fileName = manager->getExcelFileName();
|
auto fileName = manager->getExcelFileName();
|
||||||
delete manager;
|
delete manager;
|
||||||
|
@@ -18,8 +18,8 @@ namespace platform {
|
|||||||
const std::string STATUS_OK = "Ok.";
|
const std::string STATUS_OK = "Ok.";
|
||||||
const std::string STATUS_COLOR = Colors::GREEN();
|
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) :
|
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(model, score, platform, complete, partial))
|
rows{ rows }, cols{ cols }, complete{ complete }, partial{ partial }, compare{ compare }, didExcel(false), results(ResultsManager(path, model, score, platform, complete, partial))
|
||||||
{
|
{
|
||||||
results.load();
|
results.load();
|
||||||
openExcel = false;
|
openExcel = false;
|
||||||
|
@@ -15,7 +15,7 @@ namespace platform {
|
|||||||
};
|
};
|
||||||
class ManageScreen {
|
class ManageScreen {
|
||||||
public:
|
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;
|
~ManageScreen() = default;
|
||||||
void doMenu();
|
void doMenu();
|
||||||
void updateSize(int rows, int cols);
|
void updateSize(int rows, int cols);
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include "common/Paths.h"
|
|
||||||
#include "ResultsManager.h"
|
#include "ResultsManager.h"
|
||||||
|
|
||||||
namespace platform {
|
namespace platform {
|
||||||
ResultsManager::ResultsManager(const std::string& model, const std::string& score, const std::string& platform, bool complete, bool partial) :
|
ResultsManager::ResultsManager(const std::string& path_, 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)
|
path(path_), model(model), scoreName(score), platform(platform), complete(complete), partial(partial), maxModel(0), maxTitle(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
void ResultsManager::load()
|
void ResultsManager::load()
|
||||||
|
@@ -18,7 +18,7 @@ namespace platform {
|
|||||||
};
|
};
|
||||||
class ResultsManager {
|
class ResultsManager {
|
||||||
public:
|
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 load(); // Loads the list of results
|
||||||
void sortResults(SortField field, SortType type); // Sorts the list of results
|
void sortResults(SortField field, SortType type); // Sorts the list of results
|
||||||
void sortDate(SortType type);
|
void sortDate(SortType type);
|
||||||
|
12
vcpkg.json
12
vcpkg.json
@@ -7,9 +7,7 @@
|
|||||||
"fimdlp",
|
"fimdlp",
|
||||||
"libtorch-bin",
|
"libtorch-bin",
|
||||||
"folding",
|
"folding",
|
||||||
"bayesnet",
|
"argparse"
|
||||||
"argparse",
|
|
||||||
"libxlsxwriter"
|
|
||||||
],
|
],
|
||||||
"overrides": [
|
"overrides": [
|
||||||
{
|
{
|
||||||
@@ -24,10 +22,6 @@
|
|||||||
"name": "libtorch-bin",
|
"name": "libtorch-bin",
|
||||||
"version": "2.7.0"
|
"version": "2.7.0"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "bayesnet",
|
|
||||||
"version": "1.1.1"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "folding",
|
"name": "folding",
|
||||||
"version": "1.1.1"
|
"version": "1.1.1"
|
||||||
@@ -36,10 +30,6 @@
|
|||||||
"name": "argpase",
|
"name": "argpase",
|
||||||
"version": "3.2"
|
"version": "3.2"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "libxlsxwriter",
|
|
||||||
"version": "1.2.2"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "nlohmann-json",
|
"name": "nlohmann-json",
|
||||||
"version": "3.11.3"
|
"version": "3.11.3"
|
||||||
|
Reference in New Issue
Block a user