Repository: open-compass/opencompass
Issue: [Bug] configs/datasets/agieval/agieval_mixed_713d14.py not found
Root cause: Environment Incompatibility

### Prerequisite

- [X] I have searched [Issues](https://github.com/open-compass/opencompass/issues/) and [Discussions](https://github.com/open-compass/opencompass/discussions) but cannot get the expected help.
- [X] The bug has not been fixed in the [latest version](https://github.com/open-compass/opencompass).

### Type

I'm evaluating with the officially supported tasks/models/datasets.

### Environment

```python
{'CUDA available': True,
 'CUDA_HOME': None,
 'GCC': 'gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0',
 'GPU 0,1,2,3': 'NVIDIA A100-SXM4-40GB',
 'MMEngine': '0.10.3',
 'MUSA available': False,
 'OpenCV': '4.9.0',
 'PyTorch': '2.2.1',
 'PyTorch compiling details': 'PyTorch built with:\n'
                              '  - GCC 9.3\n'
                              '  - C++ Version: 201703\n'
                              '  - Intel(R) oneAPI Math Kernel Library Version '
                              '2022.1-Product Build 20220311 for Intel(R) 64 '
                              'architecture applications\n'
                              '  - Intel(R) MKL-DNN v3.3.2 (Git Hash '
                              '2dc95a2ad0841e29db8b22fbccaf3e5da7992b01)\n'
                              '  - OpenMP 201511 (a.k.a. OpenMP 4.5)\n'
                              '  - LAPACK is enabled (usually provided by '
                              'MKL)\n'
                              '  - NNPACK is enabled\n'
                              '  - CPU capability usage: AVX2\n'
                              '  - CUDA Runtime 12.1\n'
                              '  - NVCC architecture flags: '
                              '-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86;-gencode;arch=compute_90,code=sm_90\n'
                              '  - CuDNN 8.9.2\n'
                              '  - Magma 2.6.1\n'
                              '  - Build settings: BLAS_INFO=mkl, '
                              'BUILD_TYPE=Release, CUDA_VERSION=12.1, '
                              'CUDNN_VERSION=8.9.2, '
                              'CXX_COMPILER=/opt/rh/devtoolset-9/root/usr/bin/c++, '
                              'CXX_FLAGS= -D_GLIBCXX_USE_CXX11_ABI=0 '
                              '-fabi-version=11 -fvisibility-inlines-hidden '
                              '-DUSE_PTHREADPOOL -DNDEBUG -DUSE_KINETO '
                              '-DLIBKINETO_NOROCTRACER -DUSE_FBGEMM '
                              '-DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK '
                              '-DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE '
                              '-O2 -fPIC -Wall -Wextra -Werror=return-type '
                              '-Werror=non-virtual-dtor -Werror=bool-operation '
                              '-Wnarrowing -Wno-missing-field-initializers '
                              '-Wno-type-limits -Wno-array-bounds '
                              '-Wno-unknown-pragmas -Wno-unused-parameter '
                              '-Wno-unused-function -Wno-unused-result '
                              '-Wno-strict-overflow -Wno-strict-aliasing '
                              '-Wno-stringop-overflow -Wsuggest-override '
                              '-Wno-psabi -Wno-error=pedantic '
                              '-Wno-error=old-style-cast -Wno-missing-braces '
                              '-fdiagnostics-color=always -faligned-new '
                              '-Wno-unused-but-set-variable '
                              '-Wno-maybe-uninitialized -fno-math-errno '
                              '-fno-trapping-math -Werror=format '
                              '-Wno-stringop-overflow, LAPACK_INFO=mkl, '
                              'PERF_WITH_AVX=1, PERF_WITH_AVX2=1, '
                              'PERF_WITH_AVX512=1, TORCH_VERSION=2.2.1, '
                              'USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, '
                              'USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, '
                              'USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, '
                              'USE_NNPACK=ON, USE_OPENMP=ON, USE_ROCM=OFF, '
                              'USE_ROCM_KERNEL_ASSERT=OFF, \n',
 'Python': '3.10.14 | packaged by conda-forge | (main, Mar 20 2024, 12:45:18) '
           '[GCC 12.3.0]',
 'TorchVision': '0.17.1',
 'numpy_random_seed': 2147483648,
 'opencompass': '0.2.5+a77b8a5',
 'sys.platform': 'linux'}
```

### Reproduces the problem - code/configuration sample

```python
from mmengine.config import read_base

with read_base():
    from .datasets.mmlu.mmlu_ppl_ac766d import mmlu_datasets
    from .datasets.triviaqa.triviaqa_wiki_gen_d18bf4 import triviaqa_datasets
    from .datasets.nq.nq_open_gen_e93f8a import nq_datasets
    from .datasets.gsm8k.gsm8k_gen_3309bd import gsm8k_datasets
    from .datasets.humaneval.humaneval_gen_a82cae import humaneval_datasets
    from .datasets.agieval.agieval_mixed_713d14 import agieval_datasets
    from .datasets.SuperGLUE_BoolQ.SuperGLUE_BoolQ_ppl_314797 import BoolQ_datasets
    from .datasets.hellaswag.hellaswag_ppl_a6e128 import hellaswag_datasets
    from .datasets.obqa.obqa_ppl_6aac9e import obqa_datasets
    from .datasets.winogrande.winogrande_ll_c5cf57 import winogrande_datasets
    from .models.hf_llama.hf_llama2_7b import models
    from .summarizers.example import summarizer

datasets = sum([v for k, v in locals().items() if k.endswith('_datasets') or k == 'datasets'], [])
work_dir = './outputs/llama2/'

```

### Reproduces the problem - command or script

```shell
python run.py configs/eval_hf_llama2.py --debug
```

### Reproduces the problem - error message

```
Traceback (most recent call last):
  File "/home/ping/opencompass_025/run.py", line 4, in <module>
    main()
  File "/home/ping/opencompass_025/opencompass/cli/main.py", line 220, in main
    cfg = get_config_from_arg(args)
  File "/home/ping/opencompass_025/opencompass/utils/run.py", line 82, in get_config_from_arg
    config = Config.fromfile(args.config, format_python_code=False)
  File "/home/ping/mambaforge/envs/opencompass/lib/python3.10/site-packages/mmengine/config/config.py", line 492, in fromfile
    raise e
  File "/home/ping/mambaforge/envs/opencompass/lib/python3.10/site-packages/mmengine/config/config.py", line 490, in fromfile
    cfg_dict, imported_names = Config._parse_lazy_import(filename)
  File "/home/ping/mambaforge/envs/opencompass/lib/python3.10/site-packages/mmengine/config/config.py", line 1070, in _parse_lazy_import
    raise ConfigParsingError(
mmengine.config.utils.ConfigParsingError: configs/datasets/agieval/agieval_mixed_713d14.py not found! It means that incorrect module is defined in `with read_base(): = from .datasets.agieval.agieval_mixed_713d14 import ...`, please make sure the base config module is valid and is consistent with the prior import logic
```

### Other information

_No response_

same mistake

same

same here

any upgrade?

same

Maybe python path is empty or error.
Use this cmd to correct it.
```shell
export PYTHONPATH=$PWD:$PYTHONPATH
```

没人解决吗? 🤔 @tonysy 

disable the dataset in file opencompass/configs/datasets/collections/leaderboard/qwen.py

from mmengine.config import read_base

with read_base():
    from ...ceval.ceval_ppl_578f8d import ceval_datasets
    #from ...agieval.agieval_mixed_713d14 import agieval_datasets
    from ...mmlu.mmlu_ppl_ac766d import mmlu_datasets
    from ...cmmlu.cmmlu_ppl_8b9c76 import cmmlu_datasets

same mistake

试试直接源码安装 pip install -e .

this issue can solve the problem:
https://github.com/ML-GSAI/LLaDA/issues/115

For those who encounter this situation after editable installs, try **UPDATING TO PYTHON 3.11 or HIGHER**

The failure originates in `mmengine.utils.package_utils.get_installed_path()`, which is used by the lazy-loading mechanism to resolve the physical path of a package. Current implementation assumes that all installed packages reside under `site-packages`, and attempts to construct paths like `{dist.location}/{package_name}` or `{dist.location}/{top_level_module}`.

However, this assumption does not hold for editable installs (i.e., `pip install -e .`). In such cases:

- The actual source code remains in the developer’s project directory (e.g., `/home/user/opencompass`)
- Only metadata (`.dist-info`) is placed in `site-packages`
- The real source path is recorded in `direct_url.json` inside `.dist-info/`, as standardized by [PEP 610](https://peps.python.org/pep-0610/)

Since `get_installed_path()` ignores `direct_url.json`, it returns an incorrect (non-existent) path under `site-packages`, causing config loading to fail. A simpler and immediate workaround for the bug in `get_installed_path()` is to upgrade the runtime environment **from Python 3.10 to Python 3.11 or higher**.

Evidence (what I've noticed after trial and error):

In a Python 3.10 environment (with typical setuptools versions):

```python
from pkg_resources import get_distribution
get_distribution('opencompass')
# opencompass 0.5.1 (/root/.conda/envs/opencompass/lib/python3.10/site-packages)
```

The `.location` attribute points to `site-packages`, not the actual source directory, even though opencompass is installed in editable mode (editable project location: `/root/opencompass`).

In a Python 3.11 environment (with newer default setuptools):

```python
from pkg_resources import get_distribution
get_distribution('opencompass')
# opencompass 0.5.1 (/root/opencompass)
```

Now, `.location` correctly resolves to the editable source path (`/root/opencompass`).