# Ascend上用ADGEN数据集评估时报错not support in PyNative RunOp!

**1. 系统环境**

硬件环境\(Ascend/GPU/CPU\): Ascend

软件环境: MindSpore 版本: 2.2.0

执行模式： 不限

**2. 报错信息**

2.1 问题描述

在Ascend上用ADGEN数据集评估时报错not support in PyNative RunOp!

2.2 报错信息

```
[WARNING] GE_ADPT (2042778, ffffaf6cfc20,python) :2023-10-12-17:27:01.018.444 [mindspore/ccsrc/transfo rm/graph_ir/utils.cc:276] CheckAndGetGraphRunner ] Can not find init_subgraph. kernel_graph_1 sub graph, don't need data init subgraph in INFER mode.

Traceback (most recent call last):
    File "wizardcoder/run_wi zardcoder.py", line 150, in <module>
        device_id=args.device_id)
    File "wizardcoder/run_wiza rdcoder.py", line 99, in main
        task.evaluate(eval_chec kpoint=config.model . model_config.checkpoint_name_or path)
    File "/home/wizardcoder/ 1_wizardcoder-mindformers-916/mindformers/trainer/t rainer.py", line 589, in evaluate
        is full config=True, **kwargs
    File "/home/wizardcoder/1_wizardcoder-mindformers- 916/mindformers/trainer/causal_lan guage_ modeling/causal_language_modeling.py", line 156, in evaluat
        **kwargs)
    File * /home/wizardcoder/1 wizardcoder-mindformers -916/mindformers/trainer/base_trainer.py", line 713, in evaluatel_process
        dataset sink mode=con fig.runner_config.sink mode)
    File "/ root/miniconda3/envs/iib/python3.77site- packages/mindspore/train/model.py", line 1470 in eval
        eval result = self. -eval dataset sink process (valid dataset, list callback, cb params)
    File "/root/miniconda3/envs/lib/python3.7/site-packages/mindspore/train/model. py", line 1329, in _eval_dataset_sink_process
        self._update _metrics(outputs)
    File "/root/miniconda3/envs/lib/python3.7/site-packages/mindspore/train/model.py", line 394, in _update metrics
        metric.update(*outputs)
    File "/home/wizardcoder/1 wizardcoder-mindformers -916/mindformers/core/metric/metric .py", line 545, in update
        logits = self.reshape( logits[:: :-1, ::], (batch_size * (seq_length - 1), -1))
    File "/root/miniconda3/envs/lib/python3.7/site-packages/mindspore/ops/primitive .py", line 314, in__call__
        return _run_op(self, self.name, args)
    File "/root/miniconda3/envs/iib/python3.7/site-packages/mindspore/ops/primitive .py", line 907, in _run_op
        stub = _pynative_executor . run_op_async (obj, op_name, args)
    File „/root/miniconda3/envs/python3. 7/site-packages/mindspore/common/api .py", line 1275, in run_op_async
        return self. executor. run_op_async(*args)
RuntimeError: GE backend is not support in PyNative RunOp!
-------------------------------------------------------------
- C++ Call Stack: (For framework developers)
-------------------------------------------------------------
mindspore/ccsrc/runtime/pynat ive/op compiler.cc:203 Chec kBackendPolicy
```

**3. 根因分析**

PerplexityMetric有图外算子导致。

**4. 解决方案**

将PerplexityMetric替换为ADGENMetric。

