From 81408ade284ceb183cefba5ea5404cbb301de7b6 Mon Sep 17 00:00:00 2001 From: ShenYuhan Date: Mon, 24 Aug 2020 14:48:34 +0800 Subject: [PATCH] add stat for hub convert. (#844) --- paddlehub/commands/convert.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/paddlehub/commands/convert.py b/paddlehub/commands/convert.py index 4756d30e..5ed2fad5 100644 --- a/paddlehub/commands/convert.py +++ b/paddlehub/commands/convert.py @@ -21,6 +21,7 @@ from string import Template from paddlehub.common import tmp_dir from paddlehub.commands.base_command import BaseCommand, ENTRY +from paddlehub.common.hub_server import CacheUpdater INIT_FILE = '__init__.py' MODULE_FILE = 'module.py' @@ -140,6 +141,7 @@ class ConvertCommand(BaseCommand): self.dest = args.output_dir if args.output_dir is not None else os.path.join( '{}_{}'.format(self.module, str(time.time()))) + CacheUpdater("hub_convert", self.module, self.version).start() os.makedirs(self.dest) with tmp_dir() as _dir: -- GitLab