Commit 2a8d38c5 authored by Qiwei Ye's avatar Qiwei Ye
Browse files

Merge branches 'master' and 'master' of https://github.com/Microsoft/LightGBM

parents 351b3d7e ed958eb2
This diff is collapsed.
...@@ -77,7 +77,7 @@ Linkers::~Linkers() { ...@@ -77,7 +77,7 @@ Linkers::~Linkers() {
} }
void Linkers::ParseMachineList(const char * filename) { void Linkers::ParseMachineList(const char * filename) {
TextReader<size_t> machine_list_reader(filename); TextReader<size_t> machine_list_reader(filename, false);
machine_list_reader.ReadAllLines(); machine_list_reader.ReadAllLines();
if (machine_list_reader.Lines().size() <= 0) { if (machine_list_reader.Lines().size() <= 0) {
Log::Fatal("Machine list file:%s doesn't exist", filename); Log::Fatal("Machine list file:%s doesn't exist", filename);
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
namespace LightGBM { namespace LightGBM {
// static member defination // static member definition
int Network::num_machines_; int Network::num_machines_;
int Network::rank_; int Network::rank_;
Linkers* Network::linkers_; Linkers* Network::linkers_;
...@@ -141,7 +141,7 @@ void Network::ReduceScatter(char* input, int input_size, int* block_start, int* ...@@ -141,7 +141,7 @@ void Network::ReduceScatter(char* input, int input_size, int* block_start, int*
// send local data to neighbor first // send local data to neighbor first
linkers_->Send(recursive_halving_map_.neighbor, input, input_size); linkers_->Send(recursive_halving_map_.neighbor, input, input_size);
} else if (recursive_halving_map_.type == RecursiveHalvingNodeType::GroupLeader) { } else if (recursive_halving_map_.type == RecursiveHalvingNodeType::GroupLeader) {
// recieve neighbor data first // receive neighbor data first
int need_recv_cnt = input_size; int need_recv_cnt = input_size;
linkers_->Recv(recursive_halving_map_.neighbor, output, need_recv_cnt); linkers_->Recv(recursive_halving_map_.neighbor, output, need_recv_cnt);
// reduce // reduce
......
...@@ -155,7 +155,7 @@ public: ...@@ -155,7 +155,7 @@ public:
pAdapter = pAdapter->Next; pAdapter = pAdapter->Next;
} }
} else { } else {
Log::Error("GetAdaptersinfo error: code %d ", dwRetVal); Log::Fatal("GetAdaptersinfo error: code %d ", dwRetVal);
} }
if (pAdapterInfo) if (pAdapterInfo)
FREE(pAdapterInfo); FREE(pAdapterInfo);
......
This diff is collapsed.
This diff is collapsed.
...@@ -2,16 +2,19 @@ ...@@ -2,16 +2,19 @@
#include "regression_objective.hpp" #include "regression_objective.hpp"
#include "binary_objective.hpp" #include "binary_objective.hpp"
#include "rank_objective.hpp" #include "rank_objective.hpp"
#include "multiclass_objective.hpp"
namespace LightGBM { namespace LightGBM {
ObjectiveFunction* ObjectiveFunction::CreateObjectiveFunction(const std::string& type, const ObjectiveConfig& config) { ObjectiveFunction* ObjectiveFunction::CreateObjectiveFunction(const std::string& type, const ObjectiveConfig& config) {
if (type == "regression") { if (type == std::string("regression")) {
return new RegressionL2loss(config); return new RegressionL2loss(config);
} else if (type == "binary") { } else if (type == std::string("binary")) {
return new BinaryLogloss(config); return new BinaryLogloss(config);
} else if (type == "lambdarank") { } else if (type == std::string("lambdarank")) {
return new LambdarankNDCG(config); return new LambdarankNDCG(config);
} else if (type == std::string("multiclass")) {
return new MulticlassLogloss(config);
} }
return nullptr; return nullptr;
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -77,9 +77,9 @@ private: ...@@ -77,9 +77,9 @@ private:
int* block_start_; int* block_start_;
/*! \brief Block size for reduce scatter */ /*! \brief Block size for reduce scatter */
int* block_len_; int* block_len_;
/*! \brief Write positions for feature histgrams */ /*! \brief Write positions for feature histograms */
int* buffer_write_start_pos_; int* buffer_write_start_pos_;
/*! \brief Read positions for local feature histgrams */ /*! \brief Read positions for local feature histograms */
int* buffer_read_start_pos_; int* buffer_read_start_pos_;
/*! \brief Size for reduce scatter */ /*! \brief Size for reduce scatter */
int reduce_scatter_size_; int reduce_scatter_size_;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment