From 9fbae766f82a62f5ae5311fd02694a395acf612e Mon Sep 17 00:00:00 2001 From: JYChen Date: Thu, 11 May 2023 09:31:41 +0800 Subject: [PATCH] [Cherrypick] up index warning level (#53692) * up warning level * numpy still vlog-0 --- paddle/fluid/pybind/eager_method.cc | 2 +- paddle/fluid/pybind/imperative.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/pybind/eager_method.cc b/paddle/fluid/pybind/eager_method.cc index 0092bccba70..3f023d36490 100644 --- a/paddle/fluid/pybind/eager_method.cc +++ b/paddle/fluid/pybind/eager_method.cc @@ -930,7 +930,7 @@ static PyObject* tensor__getitem_index_not_tensor(TensorObject* self, // with FLAGS_set_to_1d=True. In this case, one `None` should be pop out, // otherwise the output shape will be not correct. if (static_cast(decrease_axis.size()) == tensor->dims().size()) { - VLOG(0) + VLOG(1) << "Warning: In Tensor '__getitem__', if the number of scalar " "elements " "in the index is equal to the rank of the Tensor, the output " diff --git a/paddle/fluid/pybind/imperative.cc b/paddle/fluid/pybind/imperative.cc index 52a05dc0ffc..0ccac2ff236 100644 --- a/paddle/fluid/pybind/imperative.cc +++ b/paddle/fluid/pybind/imperative.cc @@ -1078,7 +1078,7 @@ void BindImperative(py::module *m_ptr) { // not correct. if (static_cast(decrease_axis.size()) == tensor->dims().size()) { - VLOG(0) << "Warning: In Tensor '__getitem__', if the number " + VLOG(1) << "Warning: In Tensor '__getitem__', if the number " "of scalar " "elements " "in the index is equal to the rank of the Tensor, " -- GitLab