"...git@developer.sourcefind.cn:modelzoo/solov2-pytorch.git" did not exist on "57f6da5c8fe8d75205da786c263e0deb1325bc7a"
Unverified Commit fe533e3b authored by Yuge Zhang's avatar Yuge Zhang Committed by GitHub
Browse files

Fix metrics decode error on non-local platform (#2152)

parent bf71419f
......@@ -63,9 +63,8 @@ def get_next_parameter():
def send_metric(string):
if _nni_platform != 'local':
data = (string).encode('utf8')
assert len(data) < 1000000, 'Metric too long'
print('NNISDK_ME%s' % (data), flush=True)
assert len(string) < 1000000, 'Metric too long'
print("NNISDK_MEb'%s'" % (string), flush=True)
else:
data = (string + '\n').encode('utf8')
assert len(data) < 1000000, 'Metric too long'
......
......@@ -125,8 +125,9 @@ def report_final_result(metric):
Parameters
----------
metric:
serializable object.
metric: serializable object
Usually (for built-in tuners to work), it should be a number, or
a dict with key "default" (a number), and any other extra keys.
"""
assert _params or trial_env_vars.NNI_PLATFORM is None, \
'nni.get_next_parameter() needs to be called before report_final_result'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment