Skip to content

Commit

Permalink
Fix convert command (#1943)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiltsov-max authored Jul 28, 2020
1 parent 246c793 commit 3e12bbb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions datumaro/datumaro/cli/commands/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ def convert_command(args):
except KeyError:
raise CliException("Converter for format '%s' is not found" % \
args.output_format)
if hasattr(converter, 'from_cmdline'):
extra_args = converter.from_cmdline(args.extra_args)
converter = converter(**extra_args)
extra_args = converter.from_cmdline(args.extra_args)
def converter_proxy(extractor, save_dir):
return converter.convert(extractor, save_dir, **extra_args)

filter_args = FilterModes.make_filter_args(args.filter_mode)

Expand Down Expand Up @@ -127,7 +127,7 @@ def convert_command(args):
log.info("Exporting the dataset")
dataset.export_project(
save_dir=dst_dir,
converter=converter,
converter=converter_proxy,
filter_expr=args.filter,
**filter_args)

Expand Down

0 comments on commit 3e12bbb

Please sign in to comment.