Skip to content

Commit

Permalink
Fix mmaction2 package name and run script (#113)
Browse files Browse the repository at this point in the history
* Fix mmaction2 package name and run script

* Update customcommand.py
  • Loading branch information
yeliudev committed Jun 14, 2022
1 parent d8f00ed commit eb5c5c6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mim/click/autocompletion.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def get_official_package(ctx=None, args=None, incomplete=None):
'mmdet',
'mmdet3d',
'mmseg',
'mmaction',
'mmaction2',
'mmtrack',
'mmpose',
'mmedit',
Expand Down
7 changes: 4 additions & 3 deletions mim/click/customcommand.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ def format_help(self, ctx: Context, formatter: HelpFormatter) -> None:
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(
Expand All @@ -82,7 +83,7 @@ def format_help(self, ctx: Context, formatter: HelpFormatter) -> None:
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 "
Expand All @@ -98,7 +99,7 @@ def format_help(self, ctx: Context, formatter: HelpFormatter) -> None:
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 = []
Expand Down

0 comments on commit eb5c5c6

Please sign in to comment.