From 7a19160bb670deaa4e809e39d9122b22e6793aac Mon Sep 17 00:00:00 2001 From: Margaret_wangrui Date: Tue, 22 Nov 2022 09:37:14 +0800 Subject: [PATCH] Handle dict log printing in the interpretation node. --- mindspore/ccsrc/pipeline/jit/static_analysis/prim.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mindspore/ccsrc/pipeline/jit/static_analysis/prim.cc b/mindspore/ccsrc/pipeline/jit/static_analysis/prim.cc index 4454eb72d60..ce30125223c 100644 --- a/mindspore/ccsrc/pipeline/jit/static_analysis/prim.cc +++ b/mindspore/ccsrc/pipeline/jit/static_analysis/prim.cc @@ -2222,14 +2222,15 @@ class PyInterpretEvaluator : public TransitionPrimEvaluator { const auto &local_abs = element.second; const auto &local_abs_val = local_abs->BuildValue(); MS_EXCEPTION_IF_NULL(local_abs_val); + auto py_data_name = py::str(ValueToPyData(name->BuildValue())); if (local_abs_val == kAnyValue) { MS_EXCEPTION(ValueError) << "When using JIT Fallback to handle script '" << script - << "', the inputs should be constant, but found variable '" << name + << "', the inputs should be constant, but found variable '" << py_data_name << "' to be nonconstant."; } if (local_abs->isa()) { - MS_LOG(WARNING) << "When using JIT Fallback to handle script '" << script << "', found variable '" << name - << "' to be a tensor."; + MS_LOG(WARNING) << "When using JIT Fallback to handle script '" << script << "', found variable '" + << py_data_name << "' to be a tensor."; } } }