Skip to content
Snippets Groups Projects
Commit e42b5757 authored by Sebastian Eibl's avatar Sebastian Eibl
Browse files

added gpu test

parent 22170794
Branches
No related tags found
No related merge requests found
......@@ -183,6 +183,17 @@ if(BUILD_EXE)
COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} 2 ${MPIEXEC_PREFLAGS} "${CMAKE_BINARY_DIR}/bin/sisso++" "${CMAKE_SOURCE_DIR}/tests/exec_test/override_sis/sisso.json" ${MPIEXEC_POSTFLAGS}
)
if(SISSO_ENABLE_CUDA)
add_test(
NAME Regression_GPU
COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} 1 ${MPIEXEC_PREFLAGS} "${CMAKE_BINARY_DIR}/bin/sisso++" "${CMAKE_SOURCE_DIR}/tests/exec_test/regression_gpu/sisso.json" ${MPIEXEC_POSTFLAGS}
)
add_test(
NAME Regression_MPI_2_RANKS_GPU
COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} 2 ${MPIEXEC_PREFLAGS} "${CMAKE_BINARY_DIR}/bin/sisso++" "${CMAKE_SOURCE_DIR}/tests/exec_test/regression_gpu/sisso.json" ${MPIEXEC_POSTFLAGS}
)
endif()
if(BUILD_PARAMS)
add_test(
NAME NL_Optimization
......
......@@ -52,7 +52,7 @@ std::shared_ptr<LossFunction> loss_function_util::get_loss_function(
prop_train, prop_test, task_sizes_train, task_sizes_test);
}
throw std::logic_error("LossFunction type was not defined.");
throw std::logic_error(fmt::format("LossFunction type ({}) was not defined.", type));
return nullptr;
}
......
from sissopp import ModelRegressor
from pathlib import Path
import numpy as np
model = ModelRegressor(
str("models/train_dim_2_model_0.dat"), str("models/test_dim_2_model_0.dat")
)
assert model.rmse < 1e-4
assert model.test_rmse < 1e-4
This diff is collapsed.
{
"calc_type": "regression_gpu",
"desc_dim": 2,
"n_sis_select": 2,
"max_rung": 2,
"n_residual": 1,
"data_file": "../data.csv",
"data_file_relatice_to_json": true,
"property_key": "Prop",
"task_key": "Task",
"leave_out_frac": 0.05,
"n_models_store": 1,
"leave_out_inds": [0, 1, 2, 60, 61],
"fix_intercept": false,
"phi_out_file": "feature_space/phi.txt"
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment