Fix mmaction2 package name and run script (#113)

* Fix mmaction2 package name and run script

* Update customcommand.py
pull/133/head
Ye Liu 2022-06-14 12:34:51 +08:00 committed by GitHub
parent d8f00ed895
commit eb5c5c67ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -24,7 +24,7 @@ def get_official_package(ctx=None, args=None, incomplete=None):
'mmdet',
'mmdet3d',
'mmseg',
'mmaction',
'mmaction2',
'mmtrack',
'mmpose',
'mmedit',

View File

@ -58,7 +58,8 @@ class CustomCommand(click.Command):
if repo and repo in repos and is_installed(repo):
self.name = 'train' if self.name == 'search' else self.name
script = osp.join(
get_installed_path(repo), f'tools/{self.name}.py')
get_installed_path(repo), '.mim', 'tools',
f'{self.name}.py')
ret = subprocess.check_output(
['python', '-u', script, '--help'])
color_echo(
@ -82,7 +83,7 @@ class CustomCommand(click.Command):
if command:
repo_root = get_installed_path(repo)
files = recursively_find(
osp.join(repo_root, 'tools'), command + '.py')
osp.join(repo_root, '.mim', 'tools'), command + '.py')
if len(files) == 0:
exit_with_error(
f"The command {command} doesn't exist in codebase "
@ -98,7 +99,7 @@ class CustomCommand(click.Command):
click.echo(ret.decode('utf-8'))
else:
repo_root = get_installed_path(repo)
tool_root = osp.join(repo_root, 'tools')
tool_root = osp.join(repo_root, '.mim', 'tools')
walk_list = list(os.walk(tool_root))
files = []