From 375ed437ed237d3ed6b94416b658c4c469311f23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Monta=C3=B1ana=20G=C3=B3mez?= Date: Wed, 10 Apr 2024 00:53:39 +0200 Subject: [PATCH] Find BayesNet and PyClassifiers in $HOME/lib folder --- CMakeLists.txt | 11 +++++++++-- README.md | 6 ------ sample/CMakeLists.txt | 3 ++- src/CMakeLists.txt | 3 ++- tests/CMakeLists.txt | 3 ++- 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a6a126..d7fffdd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -73,8 +73,15 @@ add_git_submodule("lib/mdlp") find_library(XLSXWRITER_LIB NAMES libxlsxwriter.dylib libxlsxwriter.so PATHS ${Platform_SOURCE_DIR}/lib/libxlsxwriter/lib) message("XLSXWRITER_LIB=${XLSXWRITER_LIB}") -find_library(PyClassifiers NAMES libPyClassifiers PyClassifiers libPyClassifiers.a) -find_library(BayesNet NAMES libBayesNet BayesNet libBayesNet.a) +find_library(PyClassifiers NAMES libPyClassifiers PyClassifiers libPyClassifiers.a PATHS ${Platform_SOURCE_DIR}/../lib REQUIRED) +find_path(PyClassifiers_INCLUDE_DIRS REQUIRED NAMES pyclassifiers PATHS ${Platform_SOURCE_DIR}/../lib/include) +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) + +message(STATUS "PyClassifiers=${PyClassifiers}") +message(STATUS "PyClassifiers_INCLUDE_DIRS=${PyClassifiers_INCLUDE_DIRS}") +message(STATUS "BayesNet=${BayesNet}") +message(STATUS "Bayesnet_INCLUDE_DIRS=${Bayesnet_INCLUDE_DIRS}") # Subdirectories # -------------- diff --git a/README.md b/README.md index 1c0ec04..4d89e49 100644 --- a/README.md +++ b/README.md @@ -97,8 +97,6 @@ List all the datasets and its properties. The datasets are located in the _datas where can be either the word _all_ or a list of numbers separated by commas, i.e. [0,3,6,7] -![b_list](img/blist.gif) - ### b_grid Run a grid search over the parameters of the classifiers. The parameters are defined in the file _grid.txt_ located in the grid folder of the experiments. The file has to be created with the following format: @@ -138,14 +136,10 @@ Run the main experiment. There are several hyperparameters that can set in comma - -\-title : Title of the experiment (optional if only one dataset is specificied). - -\-quiet: Don't display detailed progress and result of the experiment. -![b_main](img/bmain.gif) - ### b_manage Manage the results of the experiments. -![b_manage](img/bmanage.gif) - ### b_best Get and optionally compare the best results of the experiments. The results can be stored in an MS Excel file. diff --git a/sample/CMakeLists.txt b/sample/CMakeLists.txt index f4531ea..670f833 100644 --- a/sample/CMakeLists.txt +++ b/sample/CMakeLists.txt @@ -8,7 +8,8 @@ include_directories( ${Platform_SOURCE_DIR}/lib/folding ${Platform_SOURCE_DIR}/lib/json/include ${CMAKE_BINARY_DIR}/configured_files/include - /usr/local/include + ${PyClassifiers_INCLUDE_DIRS} + ${Bayesnet_INCLUDE_DIRS} ) add_executable(PlatformSample sample.cpp ${Platform_SOURCE_DIR}/src/main/Models.cpp) target_link_libraries(PlatformSample "${PyClassifiers}" "${BayesNet}" ArffFiles mdlp ${Python3_LIBRARIES} "${TORCH_LIBRARIES}" ${LIBTORCH_PYTHON} Boost::python Boost::numpy) \ No newline at end of file diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0de4c70..b6d2ead 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -10,7 +10,8 @@ include_directories( ${MPI_CXX_INCLUDE_DIRS} ${TORCH_INCLUDE_DIRS} ${CMAKE_BINARY_DIR}/configured_files/include - /usr/local/include + ${PyClassifiers_INCLUDE_DIRS} + ${Bayesnet_INCLUDE_DIRS} ## Platform ${Platform_SOURCE_DIR}/src ${Platform_SOURCE_DIR}/results diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 01b6d5f..1c94b52 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -8,7 +8,8 @@ if(ENABLE_TESTING) ${Platform_SOURCE_DIR}/lib/json/include ${Platform_SOURCE_DIR}/lib/folding ${CMAKE_BINARY_DIR}/configured_files/include - /usr/local/include + ${PyClassifiers_INCLUDE_DIRS} + ${Bayesnet_INCLUDE_DIRS} ) set(TEST_SOURCES_PLATFORM TestUtils.cpp TestPlatform.cpp) add_executable(${TEST_PLATFORM} ${TEST_SOURCES_PLATFORM})