Complete correct compilation with libraries
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -38,3 +38,4 @@ cmake-build*/**
|
|||||||
.idea
|
.idea
|
||||||
puml/**
|
puml/**
|
||||||
.vscode/settings.json
|
.vscode/settings.json
|
||||||
|
*.dot
|
||||||
|
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -13,3 +13,6 @@
|
|||||||
[submodule "lib/mdlp"]
|
[submodule "lib/mdlp"]
|
||||||
path = lib/mdlp
|
path = lib/mdlp
|
||||||
url = https://github.com/rmontanana/mdlp
|
url = https://github.com/rmontanana/mdlp
|
||||||
|
[submodule "lib/PyClassifiers"]
|
||||||
|
path = lib/PyClassifiers
|
||||||
|
url = https://github.com/rmontanana/PyClassifiers
|
||||||
|
4
Makefile
4
Makefile
@@ -56,10 +56,10 @@ dependency: ## Create a dependency graph diagram of the project (build/dependenc
|
|||||||
cd $(f_debug) && cmake .. --graphviz=dependency.dot && dot -Tpng dependency.dot -o dependency.png
|
cd $(f_debug) && cmake .. --graphviz=dependency.dot && dot -Tpng dependency.dot -o dependency.png
|
||||||
|
|
||||||
buildd: ## Build the debug targets
|
buildd: ## Build the debug targets
|
||||||
cmake --build $(f_debug) -t $(app_targets) BayesNetSample $(n_procs)
|
cmake --build $(f_debug) -t $(app_targets) PlatformSample $(n_procs)
|
||||||
|
|
||||||
buildr: ## Build the release targets
|
buildr: ## Build the release targets
|
||||||
cmake --build $(f_release) -t $(app_targets) BayesNetSample $(n_procs)
|
cmake --build $(f_release) -t $(app_targets) $(n_procs)
|
||||||
|
|
||||||
clean: ## Clean the tests info
|
clean: ## Clean the tests info
|
||||||
@echo ">>> Cleaning Debug BayesNet tests...";
|
@echo ">>> Cleaning Debug BayesNet tests...";
|
||||||
|
1
lib/PyClassifiers
Submodule
1
lib/PyClassifiers
Submodule
Submodule lib/PyClassifiers added at f46f6dcbb2
@@ -1,11 +1,14 @@
|
|||||||
include_directories(
|
include_directories(
|
||||||
${Platform_SOURCE_DIR}/src/Platform
|
${Platform_SOURCE_DIR}/src/Platform
|
||||||
${Platform_SOURCE_DIR}/src/PyClassifiers
|
${Platform_SOURCE_DIR}/lib/PyClassifiers/src/PyClassifiers
|
||||||
${Python3_INCLUDE_DIRS}
|
${Python3_INCLUDE_DIRS}
|
||||||
${Platform_SOURCE_DIR}/lib/Files
|
${Platform_SOURCE_DIR}/lib/Files
|
||||||
${Platform_SOURCE_DIR}/lib/mdlp
|
|
||||||
${Platform_SOURCE_DIR}/lib/argparse/include
|
${Platform_SOURCE_DIR}/lib/argparse/include
|
||||||
${Platform_SOURCE_DIR}/lib/json/include
|
${Platform_SOURCE_DIR}/lib/PyClassifiers/lib/BayesNet/src/BayesNet
|
||||||
|
${Platform_SOURCE_DIR}/lib/PyClassifiers/lib/BayesNet/lib/folding
|
||||||
|
${Platform_SOURCE_DIR}/lib/PyClassifiers/lib/BayesNet/lib/mdlp
|
||||||
|
${Platform_SOURCE_DIR}/lib/PyClassifiers/lib/BayesNet/lib/json/include
|
||||||
|
${CMAKE_BINARY_DIR}/configured_files/include
|
||||||
)
|
)
|
||||||
add_executable(PlatformSample sample.cc ${Platform_SOURCE_DIR}/src/Platform/Models.cc)
|
add_executable(PlatformSample sample.cc ${Platform_SOURCE_DIR}/src/Platform/Models.cc)
|
||||||
target_link_libraries(PlatformSample Platform ArffFiles mdlp "${TORCH_LIBRARIES}" PyWrap)
|
target_link_libraries(PlatformSample PyClassifiers ArffFiles mdlp "${TORCH_LIBRARIES}")
|
@@ -70,7 +70,7 @@ int main(int argc, char** argv)
|
|||||||
auto valid_datasets = std::vector<std::string>();
|
auto valid_datasets = std::vector<std::string>();
|
||||||
transform(datasets.begin(), datasets.end(), back_inserter(valid_datasets),
|
transform(datasets.begin(), datasets.end(), back_inserter(valid_datasets),
|
||||||
[](const pair<std::string, bool>& pair) { return pair.first; });
|
[](const pair<std::string, bool>& pair) { return pair.first; });
|
||||||
argparse::ArgumentParser program("BayesNetSample");
|
argparse::ArgumentParser program("PlatformSample");
|
||||||
program.add_argument("-d", "--dataset")
|
program.add_argument("-d", "--dataset")
|
||||||
.help("Dataset file name")
|
.help("Dataset file name")
|
||||||
.action([valid_datasets](const std::string& value) {
|
.action([valid_datasets](const std::string& value) {
|
||||||
@@ -194,7 +194,7 @@ int main(int argc, char** argv)
|
|||||||
Xt.index_put_({ i, "..." }, torch::tensor(Xd[i], torch::kInt32));
|
Xt.index_put_({ i, "..." }, torch::tensor(Xd[i], torch::kInt32));
|
||||||
}
|
}
|
||||||
float total_score = 0, total_score_train = 0, score_train, score_test;
|
float total_score = 0, total_score_train = 0, score_train, score_test;
|
||||||
platform::Fold* fold;
|
folding::Fold* fold;
|
||||||
if (stratified)
|
if (stratified)
|
||||||
fold = new folding::StratifiedKFold(nFolds, y, seed);
|
fold = new folding::StratifiedKFold(nFolds, y, seed);
|
||||||
else
|
else
|
||||||
|
@@ -22,7 +22,7 @@ add_executable(b_main b_main.cc Experiment.cc Datasets.cc Dataset.cc Models.cc H
|
|||||||
add_executable(b_manage b_manage.cc Results.cc ManageResults.cc CommandParser.cc Result.cc ReportConsole.cc ReportExcel.cc ReportBase.cc Datasets.cc Dataset.cc ExcelFile.cc)
|
add_executable(b_manage b_manage.cc Results.cc ManageResults.cc CommandParser.cc Result.cc ReportConsole.cc ReportExcel.cc ReportBase.cc Datasets.cc Dataset.cc ExcelFile.cc)
|
||||||
|
|
||||||
target_link_libraries(b_best Boost::boost "${XLSXWRITER_LIB}" "${TORCH_LIBRARIES}" ArffFiles mdlp)
|
target_link_libraries(b_best Boost::boost "${XLSXWRITER_LIB}" "${TORCH_LIBRARIES}" ArffFiles mdlp)
|
||||||
target_link_libraries(b_grid PyClassifiers ${MPI_CXX_LIBRARIES})
|
target_link_libraries(b_grid PyClassifiers ${MPI_CXX_LIBRARIES} ArffFiles)
|
||||||
target_link_libraries(b_list ArffFiles mdlp "${TORCH_LIBRARIES}")
|
target_link_libraries(b_list ArffFiles mdlp "${TORCH_LIBRARIES}")
|
||||||
target_link_libraries(b_main PyClassifiers BayesNet ArffFiles mdlp "${TORCH_LIBRARIES}")
|
target_link_libraries(b_main PyClassifiers BayesNet ArffFiles mdlp "${TORCH_LIBRARIES}")
|
||||||
target_link_libraries(b_manage "${TORCH_LIBRARIES}" "${XLSXWRITER_LIB}" ArffFiles mdlp)
|
target_link_libraries(b_manage "${TORCH_LIBRARIES}" "${XLSXWRITER_LIB}" ArffFiles mdlp)
|
Reference in New Issue
Block a user