diff --git a/tools/deployment/mmaction2torchserve.py b/tools/deployment/mmaction2torchserve.py index d491ac7b36..bb170c8c88 100644 --- a/tools/deployment/mmaction2torchserve.py +++ b/tools/deployment/mmaction2torchserve.py @@ -4,7 +4,8 @@ from pathlib import Path from tempfile import TemporaryDirectory -import mmcv +from mmengine.config import Config +from mmengine.utils import mkdir_or_exist try: from model_archiver.model_packaging import package_model @@ -38,9 +39,9 @@ def mmaction2torchserve( force (bool): If True, if there is an existing `{model_name}.mar` file under `output_folder` it will be overwritten. """ - mmcv.mkdir_or_exist(output_folder) + mkdir_or_exist(output_folder) - config = mmcv.Config.fromfile(config_file) + config = Config.fromfile(config_file) with TemporaryDirectory() as tmpdir: config.dump(f'{tmpdir}/config.py')