提交 3b625ac9 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!659 fix codedex

Merge pull request !659 from geekun/main_yjk
...@@ -210,7 +210,6 @@ class TensorSlice : public MetaFuncGraph { ...@@ -210,7 +210,6 @@ class TensorSlice : public MetaFuncGraph {
FuncGraphPtr ExpandADim(const FuncGraphPtr &ret_graph, const AnfNodePtr &tensor_node) const; FuncGraphPtr ExpandADim(const FuncGraphPtr &ret_graph, const AnfNodePtr &tensor_node) const;
}; };
using TensorSlicePtr = std::shared_ptr<TensorSlice>; using TensorSlicePtr = std::shared_ptr<TensorSlice>;
} // namespace prim } // namespace prim
} // namespace mindspore } // namespace mindspore
......
...@@ -89,6 +89,5 @@ REGISTER_PYBIND_DEFINE(UnpackCall_, ([](const py::module *m) { ...@@ -89,6 +89,5 @@ REGISTER_PYBIND_DEFINE(UnpackCall_, ([](const py::module *m) {
(void)py::class_<UnpackCall, MetaFuncGraph, std::shared_ptr<UnpackCall>>(*m, "UnpackCall_") (void)py::class_<UnpackCall, MetaFuncGraph, std::shared_ptr<UnpackCall>>(*m, "UnpackCall_")
.def(py::init<std::string &>()); .def(py::init<std::string &>());
})); }));
} // namespace prim } // namespace prim
} // namespace mindspore } // namespace mindspore
...@@ -252,7 +252,6 @@ class DfGraphConvertor { ...@@ -252,7 +252,6 @@ class DfGraphConvertor {
bool training_ = false; bool training_ = false;
bool distribute_ = false; bool distribute_ = false;
}; };
} // namespace transform } // namespace transform
} // namespace mindspore } // namespace mindspore
......
...@@ -26,7 +26,7 @@ bool AnyIsLiteral(const Any &any) { ...@@ -26,7 +26,7 @@ bool AnyIsLiteral(const Any &any) {
static const std::type_index typeid_float = std::type_index(typeid(float)); static const std::type_index typeid_float = std::type_index(typeid(float));
static const std::type_index typeid_bool = std::type_index(typeid(bool)); static const std::type_index typeid_bool = std::type_index(typeid(bool));
std::type_index typeid_any = std::type_index(any.type()); auto typeid_any = std::type_index(any.type());
return typeid_int == typeid_any || typeid_float == typeid_any || typeid_bool == typeid_any; return typeid_int == typeid_any || typeid_float == typeid_any || typeid_bool == typeid_any;
} }
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
namespace mindspore { namespace mindspore {
namespace callbacks { namespace callbacks {
const char PYTHON_MOD_CALLBACK_MODULE[] = "mindspore.train.callback"; const char PYTHON_MOD_CALLBACK_MODULE[] = "mindspore.train.callback";
const char PYTHON_FUN_PROCESS_CHECKPOINT[] = "_checkpoint_cb_for_save_op"; const char PYTHON_FUN_PROCESS_CHECKPOINT[] = "_checkpoint_cb_for_save_op";
const char PYTHON_FUN_PROCESS_SUMMARY[] = "_summary_cb_for_save_op"; const char PYTHON_FUN_PROCESS_SUMMARY[] = "_summary_cb_for_save_op";
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
namespace mindspore { namespace mindspore {
namespace callbacks { namespace callbacks {
const char PYTHON_MOD_CALLBACK_MODULE[] = "mindspore.train.callback"; const char PYTHON_MOD_CALLBACK_MODULE[] = "mindspore.train.callback";
const char PYTHON_FUN_PROCESS_CHECKPOINT[] = "_checkpoint_cb_for_save_op"; const char PYTHON_FUN_PROCESS_CHECKPOINT[] = "_checkpoint_cb_for_save_op";
const char PYTHON_FUN_PROCESS_SUMMARY[] = "_summary_cb_for_save_op"; const char PYTHON_FUN_PROCESS_SUMMARY[] = "_summary_cb_for_save_op";
......
...@@ -26,12 +26,10 @@ ...@@ -26,12 +26,10 @@
namespace mindspore { namespace mindspore {
namespace callbacks { namespace callbacks {
using mindspore::tensor::TensorPtr; using mindspore::tensor::TensorPtr;
uint32_t CheckpointSaveCallback(uint32_t, const std::map<std::string, ge::Tensor> &); uint32_t CheckpointSaveCallback(uint32_t, const std::map<std::string, ge::Tensor> &);
uint32_t SummarySaveCallback(uint32_t, const std::map<std::string, ge::Tensor> &); uint32_t SummarySaveCallback(uint32_t, const std::map<std::string, ge::Tensor> &);
} // namespace callbacks } // namespace callbacks
} // namespace mindspore } // namespace mindspore
......
...@@ -335,7 +335,7 @@ py::object VectorRefToPyData(const VectorRef &value_list) { ...@@ -335,7 +335,7 @@ py::object VectorRefToPyData(const VectorRef &value_list) {
py::object ret; py::object ret;
MS_LOG(DEBUG) << "vector_ref"; MS_LOG(DEBUG) << "vector_ref";
size_t value_size = value_list.size(); size_t value_size = value_list.size();
py::tuple ref_tuple = py::tuple(value_size); auto ref_tuple = py::tuple(value_size);
for (size_t i = 0; i < value_size; i++) { for (size_t i = 0; i < value_size; i++) {
ref_tuple[i] = BaseRefToPyData(value_list[i]); ref_tuple[i] = BaseRefToPyData(value_list[i]);
} }
......
...@@ -35,7 +35,7 @@ static std::string GetTime() { ...@@ -35,7 +35,7 @@ static std::string GetTime() {
now_time.tm_hour, now_time.tm_min, now_time.tm_sec); now_time.tm_hour, now_time.tm_min, now_time.tm_sec);
#else #else
struct timeval cur_time; struct timeval cur_time;
(void)gettimeofday(&cur_time, NULL); (void)gettimeofday(&cur_time, nullptr);
struct tm now; struct tm now;
(void)localtime_r(&cur_time.tv_sec, &now); (void)localtime_r(&cur_time.tv_sec, &now);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册