From dee3472135541cd1e4ad77400808605186b9ba6e Mon Sep 17 00:00:00 2001 From: wjj19950828 Date: Mon, 28 Mar 2022 21:23:09 +0800 Subject: [PATCH] fixed bugs --- x2paddle/convert.py | 4 +++- x2paddle/utils.py | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/x2paddle/convert.py b/x2paddle/convert.py index 53a65a9..eb61f57 100644 --- a/x2paddle/convert.py +++ b/x2paddle/convert.py @@ -14,7 +14,9 @@ from six import text_type as _text_type from x2paddle import program -from utils import ConverterCheck +# import sys +# sys.path.append('.') +from x2paddle.utils import ConverterCheck import argparse import sys import logging diff --git a/x2paddle/utils.py b/x2paddle/utils.py index fb8d48f..499a768 100644 --- a/x2paddle/utils.py +++ b/x2paddle/utils.py @@ -14,6 +14,7 @@ # limitations under the License. import paddle +import x2paddle import requests import threading @@ -43,13 +44,12 @@ class ConverterCheck(threading.Thread): def __init__(self, task="onnx", - version=__version__, convert_state=None, lite_state=None, extra_info=None): threading.Thread.__init__(self) self._task = task - self._version = version + self._version = x2paddle.__version__ self._convert_state = convert_state self._lite_state = lite_state self._extra_info = extra_info @@ -57,13 +57,13 @@ class ConverterCheck(threading.Thread): def run(self): params = { 'task': self._task, - 'version': self._version, + 'x2paddle_version': self._version, 'paddle_version': paddle.__version__, 'convert_state': self._convert_state, 'from': 'x2paddle' } if self._lite_state is not None: - params.update(self._lite_state) + params.update({'lite_state': self._lite_state}) if self._extra_info is not None: params.update(self._extra_info) -- GitLab