Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
9f78ccee
Unverified
Commit
9f78ccee
authored
Jun 30, 2023
by
maskedcoder1337
Committed by
GitHub
Jun 30, 2023
Browse files
move LightGBM-vendored json11 into a LightGBM-specific namespace (fixes #5944) (#5946)
parent
8de30d7b
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
11 additions
and
11 deletions
+11
-11
include/LightGBM/tree_learner.h
include/LightGBM/tree_learner.h
+1
-1
include/LightGBM/utils/common.h
include/LightGBM/utils/common.h
+1
-1
include/LightGBM/utils/json11.h
include/LightGBM/utils/json11.h
+2
-2
src/boosting/gbdt.h
src/boosting/gbdt.h
+1
-1
src/io/dataset_loader.cpp
src/io/dataset_loader.cpp
+1
-1
src/io/json11.cpp
src/io/json11.cpp
+3
-3
src/treelearner/gpu_tree_learner.h
src/treelearner/gpu_tree_learner.h
+1
-1
src/treelearner/serial_tree_learner.h
src/treelearner/serial_tree_learner.h
+1
-1
No files found.
include/LightGBM/tree_learner.h
View file @
9f78ccee
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
namespace
LightGBM
{
namespace
LightGBM
{
using
json11
::
Json
;
using
json11
_internal_lightgbm
::
Json
;
/*! \brief forward declaration */
/*! \brief forward declaration */
class
Tree
;
class
Tree
;
...
...
include/LightGBM/utils/common.h
View file @
9f78ccee
...
@@ -58,7 +58,7 @@ namespace LightGBM {
...
@@ -58,7 +58,7 @@ namespace LightGBM {
namespace
Common
{
namespace
Common
{
using
json11
::
Json
;
using
json11
_internal_lightgbm
::
Json
;
/*!
/*!
* Imbues the stream with the C locale.
* Imbues the stream with the C locale.
...
...
include/LightGBM/utils/json11.h
View file @
9f78ccee
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
#include <utility>
#include <utility>
#include <vector>
#include <vector>
namespace
json11
{
namespace
json11
_internal_lightgbm
{
enum
JsonParse
{
STANDARD
,
COMMENTS
};
enum
JsonParse
{
STANDARD
,
COMMENTS
};
...
@@ -223,4 +223,4 @@ class JsonValue {
...
@@ -223,4 +223,4 @@ class JsonValue {
virtual
~
JsonValue
()
{}
virtual
~
JsonValue
()
{}
};
};
}
// namespace json11
}
// namespace json11
_internal_lightgbm
src/boosting/gbdt.h
View file @
9f78ccee
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
namespace
LightGBM
{
namespace
LightGBM
{
using
json11
::
Json
;
using
json11
_internal_lightgbm
::
Json
;
/*!
/*!
* \brief GBDT algorithm implementation. including Training, prediction, bagging.
* \brief GBDT algorithm implementation. including Training, prediction, bagging.
...
...
src/io/dataset_loader.cpp
View file @
9f78ccee
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
namespace
LightGBM
{
namespace
LightGBM
{
using
json11
::
Json
;
using
json11
_internal_lightgbm
::
Json
;
DatasetLoader
::
DatasetLoader
(
const
Config
&
io_config
,
const
PredictFunction
&
predict_fun
,
int
num_class
,
const
char
*
filename
)
DatasetLoader
::
DatasetLoader
(
const
Config
&
io_config
,
const
PredictFunction
&
predict_fun
,
int
num_class
,
const
char
*
filename
)
:
config_
(
io_config
),
random_
(
config_
.
data_random_seed
),
predict_fun_
(
predict_fun
),
num_class_
(
num_class
)
{
:
config_
(
io_config
),
random_
(
config_
.
data_random_seed
),
predict_fun_
(
predict_fun
),
num_class_
(
num_class
)
{
...
...
src/io/json11.cpp
View file @
9f78ccee
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
#include <cstdlib>
#include <cstdlib>
#include <limits>
#include <limits>
namespace
json11
{
namespace
json11
_internal_lightgbm
{
static
const
int
max_depth
=
200
;
static
const
int
max_depth
=
200
;
...
@@ -160,7 +160,7 @@ class Value : public JsonValue {
...
@@ -160,7 +160,7 @@ class Value : public JsonValue {
}
}
const
T
m_value
;
const
T
m_value
;
void
dump
(
string
*
out
)
const
override
{
json11
::
dump
(
m_value
,
out
);
}
void
dump
(
string
*
out
)
const
override
{
json11
_internal_lightgbm
::
dump
(
m_value
,
out
);
}
};
};
class
JsonDouble
final
:
public
Value
<
Json
::
NUMBER
,
double
>
{
class
JsonDouble
final
:
public
Value
<
Json
::
NUMBER
,
double
>
{
...
@@ -777,4 +777,4 @@ bool Json::has_shape(const shape &types, string *err) const {
...
@@ -777,4 +777,4 @@ bool Json::has_shape(const shape &types, string *err) const {
return
true
;
return
true
;
}
}
}
// namespace json11
}
// namespace json11
_internal_lightgbm
src/treelearner/gpu_tree_learner.h
View file @
9f78ccee
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
namespace
LightGBM
{
namespace
LightGBM
{
using
json11
::
Json
;
using
json11
_internal_lightgbm
::
Json
;
/*!
/*!
* \brief GPU-based parallel learning algorithm.
* \brief GPU-based parallel learning algorithm.
...
...
src/treelearner/serial_tree_learner.h
View file @
9f78ccee
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
namespace
LightGBM
{
namespace
LightGBM
{
using
json11
::
Json
;
using
json11
_internal_lightgbm
::
Json
;
/*! \brief forward declaration */
/*! \brief forward declaration */
class
CostEfficientGradientBoosting
;
class
CostEfficientGradientBoosting
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment