提交 65551bd6 编写于 作者: W wjj19950828

update convert info

上级 57c3bfa1
...@@ -19,6 +19,7 @@ import hashlib ...@@ -19,6 +19,7 @@ import hashlib
import requests import requests
import threading import threading
import uuid import uuid
import json
stats_api = "http://paddlepaddle.org.cn/paddlehub/stat" stats_api = "http://paddlepaddle.org.cn/paddlehub/stat"
...@@ -69,15 +70,18 @@ class ConverterCheck(threading.Thread): ...@@ -69,15 +70,18 @@ class ConverterCheck(threading.Thread):
'task': self._task, 'task': self._task,
'x2paddle_version': self._version, 'x2paddle_version': self._version,
'paddle_version': paddle.__version__, 'paddle_version': paddle.__version__,
'from': 'x2paddle'
}
extra = {
'convert_state': self._convert_state, 'convert_state': self._convert_state,
'convert_id': self._convert_id, 'convert_id': self._convert_id,
'from': 'x2paddle'
} }
if self._lite_state is not None: if self._lite_state is not None:
params.update({'lite_state': self._lite_state}) extra.update({'lite_state': self._lite_state})
if self._extra_info is not None: if self._extra_info is not None:
params.update(self._extra_info) extra.update(self._extra_info)
params.update({"extra": json.dumps(extra)})
try: try:
requests.get(stats_api, params, timeout=2) requests.get(stats_api, params, timeout=2)
except Exception: except Exception:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册