From 5fb669bdb2b71ef4205c37fa7c6b805da0106761 Mon Sep 17 00:00:00 2001 From: Zeyu Chen Date: Thu, 11 Apr 2019 15:31:32 +0800 Subject: [PATCH] fix log typo --- demo/ernie-classification/sentiment_cls.py | 2 +- paddlehub/module/base_processor.py | 6 +++--- paddlehub/module/module.py | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/demo/ernie-classification/sentiment_cls.py b/demo/ernie-classification/sentiment_cls.py index c5fd6d49..1da03f56 100644 --- a/demo/ernie-classification/sentiment_cls.py +++ b/demo/ernie-classification/sentiment_cls.py @@ -68,7 +68,7 @@ if __name__ == '__main__': num_labels = len(reader.get_labels()) input_dict, output_dict, program = module.context( - sign_name="tokens", trainable=True, max_seq_len=args.max_seq_len) + trainable=True, max_seq_len=args.max_seq_len) with fluid.program_guard(program): label = fluid.layers.data(name="label", shape=[1], dtype='int64') diff --git a/paddlehub/module/base_processor.py b/paddlehub/module/base_processor.py index 72da4a8c..1d6b7fb3 100644 --- a/paddlehub/module/base_processor.py +++ b/paddlehub/module/base_processor.py @@ -23,12 +23,12 @@ class BaseProcessor(object): def preprocess(self, sign_name, data_dict): raise NotImplementedError( - "BaseProcessor' preprocess should not be call!") + "BaseProcessor' preprocess should not be called!") def postprocess(self, sign_name, data_out, data_info, **kwargs): raise NotImplementedError( - "BaseProcessor' postprocess should not be call!") + "BaseProcessor' postprocess should not be called!") def data_format(self, sign_name): raise NotImplementedError( - "BaseProcessor' data_format should not be call!") + "BaseProcessor' data_format should not be called!") diff --git a/paddlehub/module/module.py b/paddlehub/module/module.py index 9b1212e7..101e1262 100644 --- a/paddlehub/module/module.py +++ b/paddlehub/module/module.py @@ -119,7 +119,7 @@ class Module(object): if processor: if not issubclass(processor, BaseProcessor): raise TypeError( - "processor shoule be an instance of paddlehub.BaseProcessor" + "Processor shoule be an instance of paddlehub.BaseProcessor" ) if assets: self.assets = utils.to_list(assets) @@ -129,10 +129,10 @@ class Module(object): self._generate_module_info(module_info) self._init_with_signature(signatures=signatures) else: - raise ValueError("Error! Module initialized parameter is empty") + raise ValueError("Module initialized parameter is empty") def _init_with_name(self, name): - logger.info("Try installing module %s" % name) + logger.info("Installing %s module" % name) result, tips, module_dir = default_module_manager.install_module( module_name=name) if not result: -- GitLab