Remove n_jobs from STree

This commit is contained in:
Ricardo Montañana Gómez 2023-11-17 10:10:31 +01:00
parent f088df14fd
commit d3cb580387
Signed by: rmontanana
GPG Key ID: 46064262FD9A7ADE
2 changed files with 3 additions and 4 deletions

View File

@ -61,7 +61,6 @@ namespace pywrap {
void PyWrap::clean(const clfId_t id)
{
// Remove Python interpreter if no more modules imported left
// std::cout << "*Cleaning module " << id << std::endl;
std::lock_guard<std::mutex> lock(mutex);
auto result = moduleClassMap.find(id);
if (result == moduleClassMap.end()) {
@ -75,11 +74,11 @@ namespace pywrap {
PyErr_Print();
errorAbort("Error cleaning module ");
}
// With boost you can't remove the interpreter
// https://www.boost.org/doc/libs/1_83_0/libs/python/doc/html/tutorial/tutorial/embedding.html#tutorial.embedding.getting_started
// if (moduleClassMap.empty()) {
// RemoveInstance();
// std::cout << "*Python interpreter cleaned" << std::endl;
// }
// std::cout << "*Module " << id << " cleaned" << std::endl;
}
void PyWrap::errorAbort(const std::string& message)
{

View File

@ -8,7 +8,7 @@ namespace pywrap {
void STree::setHyperparameters(nlohmann::json& hyperparameters)
{
// Check if hyperparameters are valid
const std::vector<std::string> validKeys = { "C", "n_jobs", "kernel", "max_iter", "max_depth", "random_state", "multiclass_strategy" };
const std::vector<std::string> validKeys = { "C", "kernel", "max_iter", "max_depth", "random_state", "multiclass_strategy" };
checkHyperparameters(validKeys, hyperparameters);
this->hyperparameters = hyperparameters;
}