Change the namespace for core boosted trees quantiles.
PiperOrigin-RevId: 324282593 Change-Id: I047b5e2ea221a5d9eaf920b5b46317959c6b4207
This commit is contained in:
parent
4e11812725
commit
781ff0196c
@ -51,12 +51,12 @@ const char* const kResourceHandleName = "quantile_stream_resource_handle";
|
||||
|
||||
using QuantileStreamResource = BoostedTreesQuantileStreamResource;
|
||||
using QuantileStream =
|
||||
core_boosted_trees::quantiles::WeightedQuantilesStream<float, float>;
|
||||
boosted_trees::quantiles::WeightedQuantilesStream<float, float>;
|
||||
using QuantileSummary =
|
||||
core_boosted_trees::quantiles::WeightedQuantilesSummary<float, float>;
|
||||
boosted_trees::quantiles::WeightedQuantilesSummary<float, float>;
|
||||
using QuantileSummaryEntry =
|
||||
core_boosted_trees::quantiles::WeightedQuantilesSummary<
|
||||
float, float>::SummaryEntry;
|
||||
boosted_trees::quantiles::WeightedQuantilesSummary<float,
|
||||
float>::SummaryEntry;
|
||||
|
||||
// Generates quantiles on a finalized QuantileStream.
|
||||
std::vector<float> GenerateBoundaries(const QuantileStream& stream,
|
||||
@ -421,10 +421,6 @@ class BoostedTreesQuantileStreamResourceFlushOp : public OpKernel {
|
||||
generate_quantiles_ ? GenerateQuantiles(*stream, num_buckets)
|
||||
: GenerateBoundaries(*stream, num_buckets),
|
||||
stream_idx);
|
||||
VLOG(1) << "Generated "
|
||||
<< stream_resource->boundaries(stream_idx).size()
|
||||
<< " boundaries. Num buckets: " << num_buckets
|
||||
<< " Generate quantiles: " << generate_quantiles_;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
namespace tensorflow {
|
||||
|
||||
using QuantileStream =
|
||||
core_boosted_trees::quantiles::WeightedQuantilesStream<float, float>;
|
||||
boosted_trees::quantiles::WeightedQuantilesStream<float, float>;
|
||||
|
||||
// Quantile Stream Resource for a list of streams sharing the same number of
|
||||
// quantiles, maximum elements, and epsilon.
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
#include "tensorflow/core/platform/types.h"
|
||||
|
||||
namespace tensorflow {
|
||||
namespace core_boosted_trees {
|
||||
namespace boosted_trees {
|
||||
namespace quantiles {
|
||||
|
||||
// Buffering container ideally suited for scenarios where we need
|
||||
@ -126,7 +126,7 @@ constexpr decltype(CompareFn())
|
||||
WeightedQuantilesBuffer<ValueType, WeightType, CompareFn>::kCompFn;
|
||||
|
||||
} // namespace quantiles
|
||||
} // namespace core_boosted_trees
|
||||
} // namespace boosted_trees
|
||||
} // namespace tensorflow
|
||||
|
||||
#endif // TENSORFLOW_CORE_KERNELS_BOOSTED_TREES_QUANTILES_WEIGHTED_QUANTILES_BUFFER_H_
|
||||
|
||||
@ -22,10 +22,10 @@ namespace tensorflow {
|
||||
namespace {
|
||||
|
||||
using Buffer =
|
||||
core_boosted_trees::quantiles::WeightedQuantilesBuffer<double, double>;
|
||||
boosted_trees::quantiles::WeightedQuantilesBuffer<double, double>;
|
||||
using BufferEntry =
|
||||
core_boosted_trees::quantiles::WeightedQuantilesBuffer<double,
|
||||
double>::BufferEntry;
|
||||
boosted_trees::quantiles::WeightedQuantilesBuffer<double,
|
||||
double>::BufferEntry;
|
||||
|
||||
class WeightedQuantilesBufferTest : public ::testing::Test {};
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
#include "tensorflow/core/platform/types.h"
|
||||
|
||||
namespace tensorflow {
|
||||
namespace core_boosted_trees {
|
||||
namespace boosted_trees {
|
||||
namespace quantiles {
|
||||
|
||||
// Class to compute approximate quantiles with error bound guarantees for
|
||||
@ -326,7 +326,7 @@ WeightedQuantilesStream<ValueType, WeightType, CompareFn>::GetQuantileSpecs(
|
||||
}
|
||||
|
||||
} // namespace quantiles
|
||||
} // namespace core_boosted_trees
|
||||
} // namespace boosted_trees
|
||||
} // namespace tensorflow
|
||||
|
||||
#endif // TENSORFLOW_CORE_KERNELS_BOOSTED_TREES_QUANTILES_WEIGHTED_QUANTILES_STREAM_H_
|
||||
|
||||
@ -23,11 +23,12 @@ namespace {
|
||||
using Tuple = std::tuple<int64, int64>;
|
||||
|
||||
using Summary =
|
||||
core_boosted_trees::quantiles::WeightedQuantilesSummary<double, double>;
|
||||
using SummaryEntry = core_boosted_trees::quantiles::WeightedQuantilesSummary<
|
||||
double, double>::SummaryEntry;
|
||||
boosted_trees::quantiles::WeightedQuantilesSummary<double, double>;
|
||||
using SummaryEntry =
|
||||
boosted_trees::quantiles::WeightedQuantilesSummary<double,
|
||||
double>::SummaryEntry;
|
||||
using Stream =
|
||||
core_boosted_trees::quantiles::WeightedQuantilesStream<double, double>;
|
||||
boosted_trees::quantiles::WeightedQuantilesStream<double, double>;
|
||||
|
||||
TEST(GetQuantileSpecs, InvalidEps) {
|
||||
EXPECT_DEATH({ Stream::GetQuantileSpecs(-0.01, 0L); }, "eps >= 0");
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
#include "tensorflow/core/kernels/boosted_trees/quantiles/weighted_quantiles_buffer.h"
|
||||
|
||||
namespace tensorflow {
|
||||
namespace core_boosted_trees {
|
||||
namespace boosted_trees {
|
||||
namespace quantiles {
|
||||
|
||||
// Summary holding a sorted block of entries with upper bound guarantees
|
||||
@ -366,7 +366,7 @@ constexpr decltype(CompareFn())
|
||||
WeightedQuantilesSummary<ValueType, WeightType, CompareFn>::kCompFn;
|
||||
|
||||
} // namespace quantiles
|
||||
} // namespace core_boosted_trees
|
||||
} // namespace boosted_trees
|
||||
} // namespace tensorflow
|
||||
|
||||
#endif // TENSORFLOW_CORE_KERNELS_BOOSTED_TREES_QUANTILES_WEIGHTED_QUANTILES_SUMMARY_H_
|
||||
|
||||
@ -21,15 +21,15 @@
|
||||
namespace tensorflow {
|
||||
namespace {
|
||||
|
||||
using Buffer =
|
||||
core_boosted_trees::quantiles::WeightedQuantilesBuffer<float, float>;
|
||||
using Buffer = boosted_trees::quantiles::WeightedQuantilesBuffer<float, float>;
|
||||
using BufferEntry =
|
||||
core_boosted_trees::quantiles::WeightedQuantilesBuffer<float,
|
||||
float>::BufferEntry;
|
||||
boosted_trees::quantiles::WeightedQuantilesBuffer<float,
|
||||
float>::BufferEntry;
|
||||
using Summary =
|
||||
core_boosted_trees::quantiles::WeightedQuantilesSummary<float, float>;
|
||||
using SummaryEntry = core_boosted_trees::quantiles::WeightedQuantilesSummary<
|
||||
float, float>::SummaryEntry;
|
||||
boosted_trees::quantiles::WeightedQuantilesSummary<float, float>;
|
||||
using SummaryEntry =
|
||||
boosted_trees::quantiles::WeightedQuantilesSummary<float,
|
||||
float>::SummaryEntry;
|
||||
|
||||
class WeightedQuantilesSummaryTest : public ::testing::Test {
|
||||
protected:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user