Unverified Commit ac5f5e56 authored by Nikita Titov's avatar Nikita Titov Committed by GitHub
Browse files

Revert "re-order includes (fixes #3132) (#3133)" (#3153)

This reverts commit 656d2676.
parent 675b552d
...@@ -5,15 +5,15 @@ ...@@ -5,15 +5,15 @@
#ifndef LIGHTGBM_OBJECTIVE_BINARY_OBJECTIVE_HPP_ #ifndef LIGHTGBM_OBJECTIVE_BINARY_OBJECTIVE_HPP_
#define LIGHTGBM_OBJECTIVE_BINARY_OBJECTIVE_HPP_ #define LIGHTGBM_OBJECTIVE_BINARY_OBJECTIVE_HPP_
#include <LightGBM/network.h>
#include <LightGBM/objective_function.h>
#include <string> #include <string>
#include <algorithm> #include <algorithm>
#include <cmath> #include <cmath>
#include <cstring> #include <cstring>
#include <vector> #include <vector>
#include <LightGBM/network.h>
#include <LightGBM/objective_function.h>
namespace LightGBM { namespace LightGBM {
/*! /*!
* \brief Objective function for binary classification * \brief Objective function for binary classification
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
#ifndef LIGHTGBM_OBJECTIVE_MULTICLASS_OBJECTIVE_HPP_ #ifndef LIGHTGBM_OBJECTIVE_MULTICLASS_OBJECTIVE_HPP_
#define LIGHTGBM_OBJECTIVE_MULTICLASS_OBJECTIVE_HPP_ #define LIGHTGBM_OBJECTIVE_MULTICLASS_OBJECTIVE_HPP_
#include <LightGBM/network.h>
#include <LightGBM/objective_function.h>
#include <string> #include <string>
#include <algorithm> #include <algorithm>
#include <cmath> #include <cmath>
...@@ -12,9 +15,6 @@ ...@@ -12,9 +15,6 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include <LightGBM/network.h>
#include <LightGBM/objective_function.h>
#include "binary_objective.hpp" #include "binary_objective.hpp"
namespace LightGBM { namespace LightGBM {
......
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
#ifndef LIGHTGBM_OBJECTIVE_RANK_OBJECTIVE_HPP_ #ifndef LIGHTGBM_OBJECTIVE_RANK_OBJECTIVE_HPP_
#define LIGHTGBM_OBJECTIVE_RANK_OBJECTIVE_HPP_ #define LIGHTGBM_OBJECTIVE_RANK_OBJECTIVE_HPP_
#include <LightGBM/metric.h>
#include <LightGBM/objective_function.h>
#include <algorithm> #include <algorithm>
#include <cmath> #include <cmath>
#include <cstdio> #include <cstdio>
...@@ -14,9 +17,6 @@ ...@@ -14,9 +17,6 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <LightGBM/metric.h>
#include <LightGBM/objective_function.h>
namespace LightGBM { namespace LightGBM {
/*! /*!
......
...@@ -5,14 +5,14 @@ ...@@ -5,14 +5,14 @@
#ifndef LIGHTGBM_OBJECTIVE_REGRESSION_OBJECTIVE_HPP_ #ifndef LIGHTGBM_OBJECTIVE_REGRESSION_OBJECTIVE_HPP_
#define LIGHTGBM_OBJECTIVE_REGRESSION_OBJECTIVE_HPP_ #define LIGHTGBM_OBJECTIVE_REGRESSION_OBJECTIVE_HPP_
#include <string>
#include <algorithm>
#include <vector>
#include <LightGBM/meta.h> #include <LightGBM/meta.h>
#include <LightGBM/objective_function.h> #include <LightGBM/objective_function.h>
#include <LightGBM/utils/array_args.h> #include <LightGBM/utils/array_args.h>
#include <string>
#include <algorithm>
#include <vector>
namespace LightGBM { namespace LightGBM {
#define PercentileFun(T, data_reader, cnt_data, alpha) \ #define PercentileFun(T, data_reader, cnt_data, alpha) \
......
...@@ -5,16 +5,16 @@ ...@@ -5,16 +5,16 @@
#ifndef LIGHTGBM_OBJECTIVE_XENTROPY_OBJECTIVE_HPP_ #ifndef LIGHTGBM_OBJECTIVE_XENTROPY_OBJECTIVE_HPP_
#define LIGHTGBM_OBJECTIVE_XENTROPY_OBJECTIVE_HPP_ #define LIGHTGBM_OBJECTIVE_XENTROPY_OBJECTIVE_HPP_
#include <LightGBM/meta.h>
#include <LightGBM/objective_function.h>
#include <LightGBM/utils/common.h>
#include <string> #include <string>
#include <algorithm> #include <algorithm>
#include <cmath> #include <cmath>
#include <cstring> #include <cstring>
#include <vector> #include <vector>
#include <LightGBM/meta.h>
#include <LightGBM/objective_function.h>
#include <LightGBM/utils/common.h>
/* /*
* Implements gradients and hessians for the following point losses. * Implements gradients and hessians for the following point losses.
* Target y is anything in interval [0, 1]. * Target y is anything in interval [0, 1].
......
...@@ -6,15 +6,15 @@ ...@@ -6,15 +6,15 @@
#ifndef LIGHTGBM_TREELEARNER_COL_SAMPLER_HPP_ #ifndef LIGHTGBM_TREELEARNER_COL_SAMPLER_HPP_
#define LIGHTGBM_TREELEARNER_COL_SAMPLER_HPP_ #define LIGHTGBM_TREELEARNER_COL_SAMPLER_HPP_
#include <algorithm>
#include <vector>
#include <LightGBM/dataset.h> #include <LightGBM/dataset.h>
#include <LightGBM/meta.h> #include <LightGBM/meta.h>
#include <LightGBM/utils/common.h> #include <LightGBM/utils/common.h>
#include <LightGBM/utils/openmp_wrapper.h> #include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/random.h> #include <LightGBM/utils/random.h>
#include <algorithm>
#include <vector>
namespace LightGBM { namespace LightGBM {
class ColSampler { class ColSampler {
public: public:
......
...@@ -5,13 +5,13 @@ ...@@ -5,13 +5,13 @@
#ifndef LIGHTGBM_TREELEARNER_COST_EFFECTIVE_GRADIENT_BOOSTING_HPP_ #ifndef LIGHTGBM_TREELEARNER_COST_EFFECTIVE_GRADIENT_BOOSTING_HPP_
#define LIGHTGBM_TREELEARNER_COST_EFFECTIVE_GRADIENT_BOOSTING_HPP_ #define LIGHTGBM_TREELEARNER_COST_EFFECTIVE_GRADIENT_BOOSTING_HPP_
#include <vector>
#include <LightGBM/config.h> #include <LightGBM/config.h>
#include <LightGBM/dataset.h> #include <LightGBM/dataset.h>
#include <LightGBM/utils/common.h> #include <LightGBM/utils/common.h>
#include <LightGBM/utils/log.h> #include <LightGBM/utils/log.h>
#include <vector>
#include "data_partition.hpp" #include "data_partition.hpp"
#include "serial_tree_learner.h" #include "serial_tree_learner.h"
#include "split_info.hpp" #include "split_info.hpp"
......
...@@ -5,15 +5,15 @@ ...@@ -5,15 +5,15 @@
#ifndef LIGHTGBM_TREELEARNER_DATA_PARTITION_HPP_ #ifndef LIGHTGBM_TREELEARNER_DATA_PARTITION_HPP_
#define LIGHTGBM_TREELEARNER_DATA_PARTITION_HPP_ #define LIGHTGBM_TREELEARNER_DATA_PARTITION_HPP_
#include <algorithm>
#include <cstring>
#include <vector>
#include <LightGBM/dataset.h> #include <LightGBM/dataset.h>
#include <LightGBM/meta.h> #include <LightGBM/meta.h>
#include <LightGBM/utils/openmp_wrapper.h> #include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/threading.h> #include <LightGBM/utils/threading.h>
#include <algorithm>
#include <cstring>
#include <vector>
namespace LightGBM { namespace LightGBM {
/*! /*!
* \brief DataPartition is used to store the the partition of data on tree. * \brief DataPartition is used to store the the partition of data on tree.
......
...@@ -6,6 +6,10 @@ ...@@ -6,6 +6,10 @@
#ifndef LIGHTGBM_TREELEARNER_FEATURE_HISTOGRAM_HPP_ #ifndef LIGHTGBM_TREELEARNER_FEATURE_HISTOGRAM_HPP_
#define LIGHTGBM_TREELEARNER_FEATURE_HISTOGRAM_HPP_ #define LIGHTGBM_TREELEARNER_FEATURE_HISTOGRAM_HPP_
#include <LightGBM/bin.h>
#include <LightGBM/dataset.h>
#include <LightGBM/utils/array_args.h>
#include <algorithm> #include <algorithm>
#include <cmath> #include <cmath>
#include <cstring> #include <cstring>
...@@ -13,10 +17,6 @@ ...@@ -13,10 +17,6 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include <LightGBM/bin.h>
#include <LightGBM/dataset.h>
#include <LightGBM/utils/array_args.h>
#include "monotone_constraints.hpp" #include "monotone_constraints.hpp"
#include "split_info.hpp" #include "split_info.hpp"
......
...@@ -6,12 +6,12 @@ ...@@ -6,12 +6,12 @@
#include "gpu_tree_learner.h" #include "gpu_tree_learner.h"
#include <algorithm>
#include <LightGBM/bin.h> #include <LightGBM/bin.h>
#include <LightGBM/network.h> #include <LightGBM/network.h>
#include <LightGBM/utils/array_args.h> #include <LightGBM/utils/array_args.h>
#include <algorithm>
#include "../io/dense_bin.hpp" #include "../io/dense_bin.hpp"
#define GPU_DEBUG 0 #define GPU_DEBUG 0
......
...@@ -5,6 +5,12 @@ ...@@ -5,6 +5,12 @@
#ifndef LIGHTGBM_TREELEARNER_GPU_TREE_LEARNER_H_ #ifndef LIGHTGBM_TREELEARNER_GPU_TREE_LEARNER_H_
#define LIGHTGBM_TREELEARNER_GPU_TREE_LEARNER_H_ #define LIGHTGBM_TREELEARNER_GPU_TREE_LEARNER_H_
#include <LightGBM/dataset.h>
#include <LightGBM/feature_group.h>
#include <LightGBM/tree.h>
#include <LightGBM/utils/array_args.h>
#include <LightGBM/utils/random.h>
#include <string> #include <string>
#include <cmath> #include <cmath>
#include <cstdio> #include <cstdio>
...@@ -12,12 +18,6 @@ ...@@ -12,12 +18,6 @@
#include <random> #include <random>
#include <vector> #include <vector>
#include <LightGBM/dataset.h>
#include <LightGBM/feature_group.h>
#include <LightGBM/tree.h>
#include <LightGBM/utils/array_args.h>
#include <LightGBM/utils/random.h>
#include "data_partition.hpp" #include "data_partition.hpp"
#include "feature_histogram.hpp" #include "feature_histogram.hpp"
#include "leaf_splits.hpp" #include "leaf_splits.hpp"
......
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
#ifndef LIGHTGBM_TREELEARNER_LEAF_SPLITS_HPP_ #ifndef LIGHTGBM_TREELEARNER_LEAF_SPLITS_HPP_
#define LIGHTGBM_TREELEARNER_LEAF_SPLITS_HPP_ #define LIGHTGBM_TREELEARNER_LEAF_SPLITS_HPP_
#include <LightGBM/meta.h>
#include <limits> #include <limits>
#include <vector> #include <vector>
#include <LightGBM/meta.h>
#include "data_partition.hpp" #include "data_partition.hpp"
namespace LightGBM { namespace LightGBM {
......
...@@ -5,13 +5,13 @@ ...@@ -5,13 +5,13 @@
#ifndef LIGHTGBM_TREELEARNER_PARALLEL_TREE_LEARNER_H_ #ifndef LIGHTGBM_TREELEARNER_PARALLEL_TREE_LEARNER_H_
#define LIGHTGBM_TREELEARNER_PARALLEL_TREE_LEARNER_H_ #define LIGHTGBM_TREELEARNER_PARALLEL_TREE_LEARNER_H_
#include <LightGBM/network.h>
#include <LightGBM/utils/array_args.h>
#include <cstring> #include <cstring>
#include <memory> #include <memory>
#include <vector> #include <vector>
#include <LightGBM/network.h>
#include <LightGBM/utils/array_args.h>
#include "gpu_tree_learner.h" #include "gpu_tree_learner.h"
#include "serial_tree_learner.h" #include "serial_tree_learner.h"
......
...@@ -4,16 +4,16 @@ ...@@ -4,16 +4,16 @@
*/ */
#include "serial_tree_learner.h" #include "serial_tree_learner.h"
#include <algorithm>
#include <queue>
#include <unordered_map>
#include <utility>
#include <LightGBM/network.h> #include <LightGBM/network.h>
#include <LightGBM/objective_function.h> #include <LightGBM/objective_function.h>
#include <LightGBM/utils/array_args.h> #include <LightGBM/utils/array_args.h>
#include <LightGBM/utils/common.h> #include <LightGBM/utils/common.h>
#include <algorithm>
#include <queue>
#include <unordered_map>
#include <utility>
#include "cost_effective_gradient_boosting.hpp" #include "cost_effective_gradient_boosting.hpp"
namespace LightGBM { namespace LightGBM {
......
...@@ -5,13 +5,6 @@ ...@@ -5,13 +5,6 @@
#ifndef LIGHTGBM_TREELEARNER_SERIAL_TREE_LEARNER_H_ #ifndef LIGHTGBM_TREELEARNER_SERIAL_TREE_LEARNER_H_
#define LIGHTGBM_TREELEARNER_SERIAL_TREE_LEARNER_H_ #define LIGHTGBM_TREELEARNER_SERIAL_TREE_LEARNER_H_
#include <string>
#include <cmath>
#include <cstdio>
#include <memory>
#include <random>
#include <vector>
#include <LightGBM/dataset.h> #include <LightGBM/dataset.h>
#include <LightGBM/tree.h> #include <LightGBM/tree.h>
#include <LightGBM/tree_learner.h> #include <LightGBM/tree_learner.h>
...@@ -19,6 +12,13 @@ ...@@ -19,6 +12,13 @@
#include <LightGBM/utils/json11.h> #include <LightGBM/utils/json11.h>
#include <LightGBM/utils/random.h> #include <LightGBM/utils/random.h>
#include <string>
#include <cmath>
#include <cstdio>
#include <memory>
#include <random>
#include <vector>
#include "col_sampler.hpp" #include "col_sampler.hpp"
#include "data_partition.hpp" #include "data_partition.hpp"
#include "feature_histogram.hpp" #include "feature_histogram.hpp"
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
#ifndef LIGHTGBM_TREELEARNER_SPLIT_INFO_HPP_ #ifndef LIGHTGBM_TREELEARNER_SPLIT_INFO_HPP_
#define LIGHTGBM_TREELEARNER_SPLIT_INFO_HPP_ #define LIGHTGBM_TREELEARNER_SPLIT_INFO_HPP_
#include <LightGBM/meta.h>
#include <limits> #include <limits>
#include <cmath> #include <cmath>
#include <cstdint> #include <cstdint>
...@@ -12,8 +14,6 @@ ...@@ -12,8 +14,6 @@
#include <functional> #include <functional>
#include <vector> #include <vector>
#include <LightGBM/meta.h>
namespace LightGBM { namespace LightGBM {
/*! /*!
......
...@@ -2,13 +2,12 @@ ...@@ -2,13 +2,12 @@
* Copyright (c) 2016 Microsoft Corporation. All rights reserved. * Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information. * Licensed under the MIT License. See LICENSE file in the project root for license information.
*/ */
#include <LightGBM/utils/common.h>
#include <cstring> #include <cstring>
#include <tuple> #include <tuple>
#include <vector> #include <vector>
#include <LightGBM/utils/common.h>
#include "parallel_tree_learner.h" #include "parallel_tree_learner.h"
namespace LightGBM { namespace LightGBM {
......
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