We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
config/utils.py haven't mmyolo
![aa791cf4fdac9e12eccfd0e54bb7136](https://user-images.githubusercontent.com/25839884/200160438-d0631694-003e-4ecc-ba77-e518d2ee96b2.png)


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `mmengine/config/utils.py`
Content:
```
1 # Copyright (c) OpenMMLab. All rights reserved.
2 import ast
3 import os.path as osp
4 import re
5 import warnings
6 from typing import Tuple
7 
8 from mmengine.fileio import load
9 from mmengine.utils import check_file_exist
10 
11 PKG2PROJECT = {
12     'mmcls': 'mmcls',
13     'mmdet': 'mmdet',
14     'mmdet3d': 'mmdet3d',
15     'mmseg': 'mmsegmentation',
16     'mmaction2': 'mmaction2',
17     'mmtrack': 'mmtrack',
18     'mmpose': 'mmpose',
19     'mmedit': 'mmedit',
20     'mmocr': 'mmocr',
21     'mmgen': 'mmgen',
22     'mmfewshot': 'mmfewshot',
23     'mmrazor': 'mmrazor',
24     'mmflow': 'mmflow',
25     'mmhuman3d': 'mmhuman3d',
26     'mmrotate': 'mmrotate',
27     'mmselfsup': 'mmselfsup',
28 }
29 
30 
31 def _get_cfg_metainfo(package_path: str, cfg_path: str) -> dict:
32     """Get target meta information from all 'metafile.yml' defined in `mode-
33     index.yml` of external package.
34 
35     Args:
36         package_path (str): Path of external package.
37         cfg_path (str): Name of experiment config.
38 
39     Returns:
40         dict: Meta information of target experiment.
41     """
42     meta_index_path = osp.join(package_path, '.mim', 'model-index.yml')
43     meta_index = load(meta_index_path)
44     cfg_dict = dict()
45     for meta_path in meta_index['Import']:
46         meta_path = osp.join(package_path, '.mim', meta_path)
47         cfg_meta = load(meta_path)
48         for model_cfg in cfg_meta['Models']:
49             if 'Config' not in model_cfg:
50                 warnings.warn(f'There is not `Config` define in {model_cfg}')
51                 continue
52             cfg_name = model_cfg['Config'].partition('/')[-1]
53             # Some config could have multiple weights, we only pick the
54             # first one.
55             if cfg_name in cfg_dict:
56                 continue
57             cfg_dict[cfg_name] = model_cfg
58     if cfg_path not in cfg_dict:
59         raise ValueError(f'Expected configs: {cfg_dict.keys()}, but got '
60                          f'{cfg_path}')
61     return cfg_dict[cfg_path]
62 
63 
64 def _get_external_cfg_path(package_path: str, cfg_file: str) -> str:
65     """Get config path of external package.
66 
67     Args:
68         package_path (str): Path of external package.
69         cfg_file (str): Name of experiment config.
70 
71     Returns:
72         str: Absolute config path from external package.
73     """
74     cfg_file = cfg_file.split('.')[0]
75     model_cfg = _get_cfg_metainfo(package_path, cfg_file)
76     cfg_path = osp.join(package_path, model_cfg['Config'])
77     check_file_exist(cfg_path)
78     return cfg_path
79 
80 
81 def _get_external_cfg_base_path(package_path: str, cfg_name: str) -> str:
82     """Get base config path of external package.
83 
84     Args:
85         package_path (str): Path of external package.
86         cfg_name (str): External relative config path with 'package::'.
87 
88     Returns:
89         str: Absolute config path from external package.
90     """
91     cfg_path = osp.join(package_path, '.mim', 'configs', cfg_name)
92     check_file_exist(cfg_path)
93     return cfg_path
94 
95 
96 def _get_package_and_cfg_path(cfg_path: str) -> Tuple[str, str]:
97     """Get package name and relative config path.
98 
99     Args:
100         cfg_path (str): External relative config path with 'package::'.
101 
102     Returns:
103         Tuple[str, str]: Package name and config path.
104     """
105     if re.match(r'\w*::\w*/\w*', cfg_path) is None:
106         raise ValueError(
107             '`_get_package_and_cfg_path` is used for get external package, '
108             'please specify the package name and relative config path, just '
109             'like `mmdet::faster_rcnn/faster-rcnn_r50_fpn_1x_coco.py`')
110     package_cfg = cfg_path.split('::')
111     if len(package_cfg) > 2:
112         raise ValueError('`::` should only be used to separate package and '
113                          'config name, but found multiple `::` in '
114                          f'{cfg_path}')
115     package, cfg_path = package_cfg
116     assert package in PKG2PROJECT, 'mmengine does not support to load ' \
117                                    f'{package} config.'
118     package = PKG2PROJECT[package]
119     return package, cfg_path
120 
121 
122 class RemoveAssignFromAST(ast.NodeTransformer):
123     """Remove Assign node if the target's name match the key.
124 
125     Args:
126         key (str): The target name of the Assign node.
127     """
128 
129     def __init__(self, key):
130         self.key = key
131 
132     def visit_Assign(self, node):
133         if (isinstance(node.targets[0], ast.Name)
134                 and node.targets[0].id == self.key):
135             return None
136         else:
137             return node
138
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/mmengine/config/utils.py b/mmengine/config/utils.py
--- a/mmengine/config/utils.py
+++ b/mmengine/config/utils.py
@@ -25,6 +25,7 @@
     'mmhuman3d': 'mmhuman3d',
     'mmrotate': 'mmrotate',
     'mmselfsup': 'mmselfsup',
+    'mmyolo': 'mmyolo',
 }

{"golden_diff": "diff --git a/mmengine/config/utils.py b/mmengine/config/utils.py\n--- a/mmengine/config/utils.py\n+++ b/mmengine/config/utils.py\n@@ -25,6 +25,7 @@\n     'mmhuman3d': 'mmhuman3d',\n     'mmrotate': 'mmrotate',\n     'mmselfsup': 'mmselfsup',\n+    'mmyolo': 'mmyolo',\n }\n", "issue": "config/utils.py haven't mmyolo\n![aa791cf4fdac9e12eccfd0e54bb7136](https://user-images.githubusercontent.com/25839884/200160438-d0631694-003e-4ecc-ba77-e518d2ee96b2.png)\r\n\n", "before_files": [{"content": "# Copyright (c) OpenMMLab. All rights reserved.\nimport ast\nimport os.path as osp\nimport re\nimport warnings\nfrom typing import Tuple\n\nfrom mmengine.fileio import load\nfrom mmengine.utils import check_file_exist\n\nPKG2PROJECT = {\n    'mmcls': 'mmcls',\n    'mmdet': 'mmdet',\n    'mmdet3d': 'mmdet3d',\n    'mmseg': 'mmsegmentation',\n    'mmaction2': 'mmaction2',\n    'mmtrack': 'mmtrack',\n    'mmpose': 'mmpose',\n    'mmedit': 'mmedit',\n    'mmocr': 'mmocr',\n    'mmgen': 'mmgen',\n    'mmfewshot': 'mmfewshot',\n    'mmrazor': 'mmrazor',\n    'mmflow': 'mmflow',\n    'mmhuman3d': 'mmhuman3d',\n    'mmrotate': 'mmrotate',\n    'mmselfsup': 'mmselfsup',\n}\n\n\ndef _get_cfg_metainfo(package_path: str, cfg_path: str) -> dict:\n    \"\"\"Get target meta information from all 'metafile.yml' defined in `mode-\n    index.yml` of external package.\n\n    Args:\n        package_path (str): Path of external package.\n        cfg_path (str): Name of experiment config.\n\n    Returns:\n        dict: Meta information of target experiment.\n    \"\"\"\n    meta_index_path = osp.join(package_path, '.mim', 'model-index.yml')\n    meta_index = load(meta_index_path)\n    cfg_dict = dict()\n    for meta_path in meta_index['Import']:\n        meta_path = osp.join(package_path, '.mim', meta_path)\n        cfg_meta = load(meta_path)\n        for model_cfg in cfg_meta['Models']:\n            if 'Config' not in model_cfg:\n                warnings.warn(f'There is not `Config` define in {model_cfg}')\n                continue\n            cfg_name = model_cfg['Config'].partition('/')[-1]\n            # Some config could have multiple weights, we only pick the\n            # first one.\n            if cfg_name in cfg_dict:\n                continue\n            cfg_dict[cfg_name] = model_cfg\n    if cfg_path not in cfg_dict:\n        raise ValueError(f'Expected configs: {cfg_dict.keys()}, but got '\n                         f'{cfg_path}')\n    return cfg_dict[cfg_path]\n\n\ndef _get_external_cfg_path(package_path: str, cfg_file: str) -> str:\n    \"\"\"Get config path of external package.\n\n    Args:\n        package_path (str): Path of external package.\n        cfg_file (str): Name of experiment config.\n\n    Returns:\n        str: Absolute config path from external package.\n    \"\"\"\n    cfg_file = cfg_file.split('.')[0]\n    model_cfg = _get_cfg_metainfo(package_path, cfg_file)\n    cfg_path = osp.join(package_path, model_cfg['Config'])\n    check_file_exist(cfg_path)\n    return cfg_path\n\n\ndef _get_external_cfg_base_path(package_path: str, cfg_name: str) -> str:\n    \"\"\"Get base config path of external package.\n\n    Args:\n        package_path (str): Path of external package.\n        cfg_name (str): External relative config path with 'package::'.\n\n    Returns:\n        str: Absolute config path from external package.\n    \"\"\"\n    cfg_path = osp.join(package_path, '.mim', 'configs', cfg_name)\n    check_file_exist(cfg_path)\n    return cfg_path\n\n\ndef _get_package_and_cfg_path(cfg_path: str) -> Tuple[str, str]:\n    \"\"\"Get package name and relative config path.\n\n    Args:\n        cfg_path (str): External relative config path with 'package::'.\n\n    Returns:\n        Tuple[str, str]: Package name and config path.\n    \"\"\"\n    if re.match(r'\\w*::\\w*/\\w*', cfg_path) is None:\n        raise ValueError(\n            '`_get_package_and_cfg_path` is used for get external package, '\n            'please specify the package name and relative config path, just '\n            'like `mmdet::faster_rcnn/faster-rcnn_r50_fpn_1x_coco.py`')\n    package_cfg = cfg_path.split('::')\n    if len(package_cfg) > 2:\n        raise ValueError('`::` should only be used to separate package and '\n                         'config name, but found multiple `::` in '\n                         f'{cfg_path}')\n    package, cfg_path = package_cfg\n    assert package in PKG2PROJECT, 'mmengine does not support to load ' \\\n                                   f'{package} config.'\n    package = PKG2PROJECT[package]\n    return package, cfg_path\n\n\nclass RemoveAssignFromAST(ast.NodeTransformer):\n    \"\"\"Remove Assign node if the target's name match the key.\n\n    Args:\n        key (str): The target name of the Assign node.\n    \"\"\"\n\n    def __init__(self, key):\n        self.key = key\n\n    def visit_Assign(self, node):\n        if (isinstance(node.targets[0], ast.Name)\n                and node.targets[0].id == self.key):\n            return None\n        else:\n            return node\n", "path": "mmengine/config/utils.py"}], "after_files": [{"content": "# Copyright (c) OpenMMLab. All rights reserved.\nimport ast\nimport os.path as osp\nimport re\nimport warnings\nfrom typing import Tuple\n\nfrom mmengine.fileio import load\nfrom mmengine.utils import check_file_exist\n\nPKG2PROJECT = {\n    'mmcls': 'mmcls',\n    'mmdet': 'mmdet',\n    'mmdet3d': 'mmdet3d',\n    'mmseg': 'mmsegmentation',\n    'mmaction2': 'mmaction2',\n    'mmtrack': 'mmtrack',\n    'mmpose': 'mmpose',\n    'mmedit': 'mmedit',\n    'mmocr': 'mmocr',\n    'mmgen': 'mmgen',\n    'mmfewshot': 'mmfewshot',\n    'mmrazor': 'mmrazor',\n    'mmflow': 'mmflow',\n    'mmhuman3d': 'mmhuman3d',\n    'mmrotate': 'mmrotate',\n    'mmselfsup': 'mmselfsup',\n    'mmyolo': 'mmyolo',\n}\n\n\ndef _get_cfg_metainfo(package_path: str, cfg_path: str) -> dict:\n    \"\"\"Get target meta information from all 'metafile.yml' defined in `mode-\n    index.yml` of external package.\n\n    Args:\n        package_path (str): Path of external package.\n        cfg_path (str): Name of experiment config.\n\n    Returns:\n        dict: Meta information of target experiment.\n    \"\"\"\n    meta_index_path = osp.join(package_path, '.mim', 'model-index.yml')\n    meta_index = load(meta_index_path)\n    cfg_dict = dict()\n    for meta_path in meta_index['Import']:\n        meta_path = osp.join(package_path, '.mim', meta_path)\n        cfg_meta = load(meta_path)\n        for model_cfg in cfg_meta['Models']:\n            if 'Config' not in model_cfg:\n                warnings.warn(f'There is not `Config` define in {model_cfg}')\n                continue\n            cfg_name = model_cfg['Config'].partition('/')[-1]\n            # Some config could have multiple weights, we only pick the\n            # first one.\n            if cfg_name in cfg_dict:\n                continue\n            cfg_dict[cfg_name] = model_cfg\n    if cfg_path not in cfg_dict:\n        raise ValueError(f'Expected configs: {cfg_dict.keys()}, but got '\n                         f'{cfg_path}')\n    return cfg_dict[cfg_path]\n\n\ndef _get_external_cfg_path(package_path: str, cfg_file: str) -> str:\n    \"\"\"Get config path of external package.\n\n    Args:\n        package_path (str): Path of external package.\n        cfg_file (str): Name of experiment config.\n\n    Returns:\n        str: Absolute config path from external package.\n    \"\"\"\n    cfg_file = cfg_file.split('.')[0]\n    model_cfg = _get_cfg_metainfo(package_path, cfg_file)\n    cfg_path = osp.join(package_path, model_cfg['Config'])\n    check_file_exist(cfg_path)\n    return cfg_path\n\n\ndef _get_external_cfg_base_path(package_path: str, cfg_name: str) -> str:\n    \"\"\"Get base config path of external package.\n\n    Args:\n        package_path (str): Path of external package.\n        cfg_name (str): External relative config path with 'package::'.\n\n    Returns:\n        str: Absolute config path from external package.\n    \"\"\"\n    cfg_path = osp.join(package_path, '.mim', 'configs', cfg_name)\n    check_file_exist(cfg_path)\n    return cfg_path\n\n\ndef _get_package_and_cfg_path(cfg_path: str) -> Tuple[str, str]:\n    \"\"\"Get package name and relative config path.\n\n    Args:\n        cfg_path (str): External relative config path with 'package::'.\n\n    Returns:\n        Tuple[str, str]: Package name and config path.\n    \"\"\"\n    if re.match(r'\\w*::\\w*/\\w*', cfg_path) is None:\n        raise ValueError(\n            '`_get_package_and_cfg_path` is used for get external package, '\n            'please specify the package name and relative config path, just '\n            'like `mmdet::faster_rcnn/faster-rcnn_r50_fpn_1x_coco.py`')\n    package_cfg = cfg_path.split('::')\n    if len(package_cfg) > 2:\n        raise ValueError('`::` should only be used to separate package and '\n                         'config name, but found multiple `::` in '\n                         f'{cfg_path}')\n    package, cfg_path = package_cfg\n    assert package in PKG2PROJECT, 'mmengine does not support to load ' \\\n                                   f'{package} config.'\n    package = PKG2PROJECT[package]\n    return package, cfg_path\n\n\nclass RemoveAssignFromAST(ast.NodeTransformer):\n    \"\"\"Remove Assign node if the target's name match the key.\n\n    Args:\n        key (str): The target name of the Assign node.\n    \"\"\"\n\n    def __init__(self, key):\n        self.key = key\n\n    def visit_Assign(self, node):\n        if (isinstance(node.targets[0], ast.Name)\n                and node.targets[0].id == self.key):\n            return None\n        else:\n            return node\n", "path": "mmengine/config/utils.py"}]}