"src/vscode:/vscode.git/clone" did not exist on "41c0370b5359aa97e3e9c25ac1ed63c336b67692"
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
...@@ -6,14 +6,14 @@ ...@@ -6,14 +6,14 @@
#ifndef LIGHTGBM_UTILS_THREADING_H_ #ifndef LIGHTGBM_UTILS_THREADING_H_
#define LIGHTGBM_UTILS_THREADING_H_ #define LIGHTGBM_UTILS_THREADING_H_
#include <algorithm>
#include <functional>
#include <vector>
#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 <algorithm>
#include <functional>
#include <vector>
namespace LightGBM { namespace LightGBM {
class Threading { class Threading {
......
...@@ -2,15 +2,6 @@ ...@@ -2,15 +2,6 @@
* 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 <string>
#include <chrono>
#include <cstdio>
#include <ctime>
#include <fstream>
#include <sstream>
#include <utility>
#include <LightGBM/application.h> #include <LightGBM/application.h>
#include <LightGBM/boosting.h> #include <LightGBM/boosting.h>
...@@ -24,6 +15,14 @@ ...@@ -24,6 +15,14 @@
#include <LightGBM/utils/openmp_wrapper.h> #include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/text_reader.h> #include <LightGBM/utils/text_reader.h>
#include <string>
#include <chrono>
#include <cstdio>
#include <ctime>
#include <fstream>
#include <sstream>
#include <utility>
#include "predictor.hpp" #include "predictor.hpp"
namespace LightGBM { namespace LightGBM {
......
...@@ -5,6 +5,12 @@ ...@@ -5,6 +5,12 @@
#ifndef LIGHTGBM_PREDICTOR_HPP_ #ifndef LIGHTGBM_PREDICTOR_HPP_
#define LIGHTGBM_PREDICTOR_HPP_ #define LIGHTGBM_PREDICTOR_HPP_
#include <LightGBM/boosting.h>
#include <LightGBM/dataset.h>
#include <LightGBM/meta.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/text_reader.h>
#include <string> #include <string>
#include <cstdio> #include <cstdio>
#include <cstring> #include <cstring>
...@@ -15,12 +21,6 @@ ...@@ -15,12 +21,6 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include <LightGBM/boosting.h>
#include <LightGBM/dataset.h>
#include <LightGBM/meta.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/text_reader.h>
namespace LightGBM { namespace LightGBM {
/*! /*!
......
...@@ -5,14 +5,14 @@ ...@@ -5,14 +5,14 @@
#ifndef LIGHTGBM_BOOSTING_DART_H_ #ifndef LIGHTGBM_BOOSTING_DART_H_
#define LIGHTGBM_BOOSTING_DART_H_ #define LIGHTGBM_BOOSTING_DART_H_
#include <LightGBM/boosting.h>
#include <string> #include <string>
#include <algorithm> #include <algorithm>
#include <cstdio> #include <cstdio>
#include <fstream> #include <fstream>
#include <vector> #include <vector>
#include <LightGBM/boosting.h>
#include "gbdt.h" #include "gbdt.h"
#include "score_updater.hpp" #include "score_updater.hpp"
......
...@@ -2,13 +2,8 @@ ...@@ -2,13 +2,8 @@
* 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 "gbdt.h" #include "gbdt.h"
#include <chrono>
#include <ctime>
#include <sstream>
#include <LightGBM/metric.h> #include <LightGBM/metric.h>
#include <LightGBM/network.h> #include <LightGBM/network.h>
#include <LightGBM/objective_function.h> #include <LightGBM/objective_function.h>
...@@ -16,6 +11,10 @@ ...@@ -16,6 +11,10 @@
#include <LightGBM/utils/common.h> #include <LightGBM/utils/common.h>
#include <LightGBM/utils/openmp_wrapper.h> #include <LightGBM/utils/openmp_wrapper.h>
#include <chrono>
#include <ctime>
#include <sstream>
namespace LightGBM { namespace LightGBM {
GBDT::GBDT() GBDT::GBDT()
......
...@@ -5,6 +5,12 @@ ...@@ -5,6 +5,12 @@
#ifndef LIGHTGBM_BOOSTING_GBDT_H_ #ifndef LIGHTGBM_BOOSTING_GBDT_H_
#define LIGHTGBM_BOOSTING_GBDT_H_ #define LIGHTGBM_BOOSTING_GBDT_H_
#include <LightGBM/boosting.h>
#include <LightGBM/objective_function.h>
#include <LightGBM/prediction_early_stop.h>
#include <LightGBM/utils/json11.h>
#include <LightGBM/utils/threading.h>
#include <string> #include <string>
#include <algorithm> #include <algorithm>
#include <cstdio> #include <cstdio>
...@@ -16,12 +22,6 @@ ...@@ -16,12 +22,6 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include <LightGBM/boosting.h>
#include <LightGBM/objective_function.h>
#include <LightGBM/prediction_early_stop.h>
#include <LightGBM/utils/json11.h>
#include <LightGBM/utils/threading.h>
#include "score_updater.hpp" #include "score_updater.hpp"
namespace LightGBM { namespace LightGBM {
......
...@@ -2,17 +2,16 @@ ...@@ -2,17 +2,16 @@
* Copyright (c) 2017 Microsoft Corporation. All rights reserved. * Copyright (c) 2017 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 <string>
#include <sstream>
#include <vector>
#include <LightGBM/config.h> #include <LightGBM/config.h>
#include <LightGBM/metric.h> #include <LightGBM/metric.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 <string>
#include <sstream>
#include <vector>
#include "gbdt.h" #include "gbdt.h"
namespace LightGBM { namespace LightGBM {
......
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
* Copyright (c) 2017 Microsoft Corporation. All rights reserved. * Copyright (c) 2017 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 "gbdt.h"
#include <LightGBM/objective_function.h> #include <LightGBM/objective_function.h>
#include <LightGBM/prediction_early_stop.h> #include <LightGBM/prediction_early_stop.h>
#include <LightGBM/utils/openmp_wrapper.h> #include <LightGBM/utils/openmp_wrapper.h>
#include "gbdt.h"
namespace LightGBM { namespace LightGBM {
void GBDT::PredictRaw(const double* features, double* output, const PredictionEarlyStopInstance* early_stop) const { void GBDT::PredictRaw(const double* features, double* output, const PredictionEarlyStopInstance* early_stop) const {
......
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
#ifndef LIGHTGBM_BOOSTING_GOSS_H_ #ifndef LIGHTGBM_BOOSTING_GOSS_H_
#define LIGHTGBM_BOOSTING_GOSS_H_ #define LIGHTGBM_BOOSTING_GOSS_H_
#include <LightGBM/boosting.h>
#include <LightGBM/utils/array_args.h>
#include <LightGBM/utils/log.h>
#include <string> #include <string>
#include <algorithm> #include <algorithm>
#include <chrono> #include <chrono>
...@@ -12,10 +16,6 @@ ...@@ -12,10 +16,6 @@
#include <fstream> #include <fstream>
#include <vector> #include <vector>
#include <LightGBM/boosting.h>
#include <LightGBM/utils/array_args.h>
#include <LightGBM/utils/log.h>
#include "gbdt.h" #include "gbdt.h"
#include "score_updater.hpp" #include "score_updater.hpp"
......
...@@ -2,16 +2,15 @@ ...@@ -2,16 +2,15 @@
* Copyright (c) 2017 Microsoft Corporation. All rights reserved. * Copyright (c) 2017 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/prediction_early_stop.h>
#include <LightGBM/utils/log.h>
#include <limits> #include <limits>
#include <algorithm> #include <algorithm>
#include <cmath> #include <cmath>
#include <vector> #include <vector>
#include <LightGBM/prediction_early_stop.h>
#include <LightGBM/utils/log.h>
namespace LightGBM { namespace LightGBM {
PredictionEarlyStopInstance CreateNone(const PredictionEarlyStopConfig&) { PredictionEarlyStopInstance CreateNone(const PredictionEarlyStopConfig&) {
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
#ifndef LIGHTGBM_BOOSTING_RF_H_ #ifndef LIGHTGBM_BOOSTING_RF_H_
#define LIGHTGBM_BOOSTING_RF_H_ #define LIGHTGBM_BOOSTING_RF_H_
#include <LightGBM/boosting.h>
#include <LightGBM/metric.h>
#include <string> #include <string>
#include <cstdio> #include <cstdio>
#include <fstream> #include <fstream>
...@@ -12,9 +15,6 @@ ...@@ -12,9 +15,6 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include <LightGBM/boosting.h>
#include <LightGBM/metric.h>
#include "gbdt.h" #include "gbdt.h"
#include "score_updater.hpp" #include "score_updater.hpp"
......
...@@ -5,15 +5,15 @@ ...@@ -5,15 +5,15 @@
#ifndef LIGHTGBM_BOOSTING_SCORE_UPDATER_HPP_ #ifndef LIGHTGBM_BOOSTING_SCORE_UPDATER_HPP_
#define LIGHTGBM_BOOSTING_SCORE_UPDATER_HPP_ #define LIGHTGBM_BOOSTING_SCORE_UPDATER_HPP_
#include <cstring>
#include <vector>
#include <LightGBM/dataset.h> #include <LightGBM/dataset.h>
#include <LightGBM/meta.h> #include <LightGBM/meta.h>
#include <LightGBM/tree.h> #include <LightGBM/tree.h>
#include <LightGBM/tree_learner.h> #include <LightGBM/tree_learner.h>
#include <LightGBM/utils/openmp_wrapper.h> #include <LightGBM/utils/openmp_wrapper.h>
#include <cstring>
#include <vector>
namespace LightGBM { namespace LightGBM {
/*! /*!
* \brief Used to store and update score for data * \brief Used to store and update score for data
......
...@@ -2,15 +2,6 @@ ...@@ -2,15 +2,6 @@
* 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 <string>
#include <cstdio>
#include <functional>
#include <memory>
#include <mutex>
#include <stdexcept>
#include <vector>
#include <LightGBM/c_api.h> #include <LightGBM/c_api.h>
#include <LightGBM/boosting.h> #include <LightGBM/boosting.h>
...@@ -27,6 +18,14 @@ ...@@ -27,6 +18,14 @@
#include <LightGBM/utils/random.h> #include <LightGBM/utils/random.h>
#include <LightGBM/utils/threading.h> #include <LightGBM/utils/threading.h>
#include <string>
#include <cstdio>
#include <functional>
#include <memory>
#include <mutex>
#include <stdexcept>
#include <vector>
#include "application/predictor.hpp" #include "application/predictor.hpp"
namespace LightGBM { namespace LightGBM {
......
...@@ -2,18 +2,17 @@ ...@@ -2,18 +2,17 @@
* 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 <algorithm>
#include <cmath>
#include <cstdint>
#include <cstring>
#include <LightGBM/bin.h> #include <LightGBM/bin.h>
#include <LightGBM/utils/array_args.h> #include <LightGBM/utils/array_args.h>
#include <LightGBM/utils/common.h> #include <LightGBM/utils/common.h>
#include <LightGBM/utils/file_io.h> #include <LightGBM/utils/file_io.h>
#include <algorithm>
#include <cmath>
#include <cstdint>
#include <cstring>
#include "dense_bin.hpp" #include "dense_bin.hpp"
#include "multi_val_dense_bin.hpp" #include "multi_val_dense_bin.hpp"
#include "multi_val_sparse_bin.hpp" #include "multi_val_sparse_bin.hpp"
......
...@@ -2,15 +2,14 @@ ...@@ -2,15 +2,14 @@
* 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 <limits>
#include <LightGBM/config.h> #include <LightGBM/config.h>
#include <LightGBM/utils/common.h> #include <LightGBM/utils/common.h>
#include <LightGBM/utils/log.h> #include <LightGBM/utils/log.h>
#include <LightGBM/utils/random.h> #include <LightGBM/utils/random.h>
#include <limits>
namespace LightGBM { namespace LightGBM {
void Config::KV2Map(std::unordered_map<std::string, std::string>* params, const char* kv) { void Config::KV2Map(std::unordered_map<std::string, std::string>* params, const char* kv) {
......
...@@ -3,13 +3,6 @@ ...@@ -3,13 +3,6 @@
* Licensed under the MIT License. See LICENSE file in the project root for * Licensed under the MIT License. See LICENSE file in the project root for
* license information. * license information.
*/ */
#include <chrono>
#include <cstdio>
#include <limits>
#include <sstream>
#include <unordered_map>
#include <LightGBM/dataset.h> #include <LightGBM/dataset.h>
#include <LightGBM/feature_group.h> #include <LightGBM/feature_group.h>
...@@ -17,6 +10,12 @@ ...@@ -17,6 +10,12 @@
#include <LightGBM/utils/openmp_wrapper.h> #include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/threading.h> #include <LightGBM/utils/threading.h>
#include <chrono>
#include <cstdio>
#include <limits>
#include <sstream>
#include <unordered_map>
namespace LightGBM { namespace LightGBM {
const char* Dataset::binary_file_token = const char* Dataset::binary_file_token =
......
...@@ -2,9 +2,6 @@ ...@@ -2,9 +2,6 @@
* 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 <fstream>
#include <LightGBM/dataset_loader.h> #include <LightGBM/dataset_loader.h>
#include <LightGBM/network.h> #include <LightGBM/network.h>
...@@ -13,6 +10,8 @@ ...@@ -13,6 +10,8 @@
#include <LightGBM/utils/log.h> #include <LightGBM/utils/log.h>
#include <LightGBM/utils/openmp_wrapper.h> #include <LightGBM/utils/openmp_wrapper.h>
#include <fstream>
namespace LightGBM { namespace LightGBM {
using json11::Json; using json11::Json;
......
...@@ -6,12 +6,12 @@ ...@@ -6,12 +6,12 @@
#ifndef LIGHTGBM_IO_DENSE_BIN_HPP_ #ifndef LIGHTGBM_IO_DENSE_BIN_HPP_
#define LIGHTGBM_IO_DENSE_BIN_HPP_ #define LIGHTGBM_IO_DENSE_BIN_HPP_
#include <LightGBM/bin.h>
#include <cstdint> #include <cstdint>
#include <cstring> #include <cstring>
#include <vector> #include <vector>
#include <LightGBM/bin.h>
namespace LightGBM { namespace LightGBM {
template <typename VAL_T, bool IS_4BIT> template <typename VAL_T, bool IS_4BIT>
......
...@@ -3,15 +3,14 @@ ...@@ -3,15 +3,14 @@
* Licensed under the MIT License. See LICENSE file in the project root for * Licensed under the MIT License. See LICENSE file in the project root for
* license information. * license information.
*/ */
#include <LightGBM/utils/file_io.h>
#include <LightGBM/utils/log.h>
#include <algorithm> #include <algorithm>
#include <sstream> #include <sstream>
#include <unordered_map> #include <unordered_map>
#include <LightGBM/utils/file_io.h>
#include <LightGBM/utils/log.h>
#ifdef USE_HDFS #ifdef USE_HDFS
#include <hdfs.h> #include <hdfs.h>
#endif #endif
......
...@@ -18,16 +18,15 @@ ...@@ -18,16 +18,15 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE. * THE SOFTWARE.
*/ */
#include <LightGBM/utils/json11.h>
#include <LightGBM/utils/log.h>
#include <cmath> #include <cmath>
#include <cstdio> #include <cstdio>
#include <cstdlib> #include <cstdlib>
#include <limits> #include <limits>
#include <LightGBM/utils/json11.h>
#include <LightGBM/utils/log.h>
namespace json11 { namespace json11 {
static const int max_depth = 200; static const int max_depth = 200;
......
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