Skip to content

Commit

Permalink
[Fix] switch mmaction2totorchserve from mmcv to mmengine (#2053)
Browse files Browse the repository at this point in the history
* switch to mmengine

* fix precommit
  • Loading branch information
austinmw authored Nov 25, 2022
1 parent a0863e9 commit 94ed608
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tools/deployment/mmaction2torchserve.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit 94ed608

Please sign in to comment.