mirror of https://github.com/open-mmlab/mim.git
Fix mmaction2 package name and run script (#113)
* Fix mmaction2 package name and run script * Update customcommand.pypull/133/head
parent
d8f00ed895
commit
eb5c5c67ff
|
@ -24,7 +24,7 @@ def get_official_package(ctx=None, args=None, incomplete=None):
|
|||
'mmdet',
|
||||
'mmdet3d',
|
||||
'mmseg',
|
||||
'mmaction',
|
||||
'mmaction2',
|
||||
'mmtrack',
|
||||
'mmpose',
|
||||
'mmedit',
|
||||
|
|
|
@ -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 = []
|
||||
|
|
Loading…
Reference in New Issue