Unverified Commit 17f9075a authored by SparkSnail's avatar SparkSnail Committed by GitHub
Browse files

Support trialkeeper pipe outputStream flush (#782)

In trialkeeper, the output stream of trial process may be in cache, and multiphase need the output stream returns immediately. Flush when sdk print content.
parent fbf4668b
...@@ -80,7 +80,7 @@ def send_metric(string): ...@@ -80,7 +80,7 @@ def send_metric(string):
if _nni_platform != 'local': if _nni_platform != 'local':
data = (string).encode('utf8') data = (string).encode('utf8')
assert len(data) < 1000000, 'Metric too long' assert len(data) < 1000000, 'Metric too long'
print('NNISDK_ME%s' % (data)) print('NNISDK_ME%s' % (data), flush=True)
else: else:
data = (string + '\n').encode('utf8') data = (string + '\n').encode('utf8')
assert len(data) < 1000000, 'Metric too long' assert len(data) < 1000000, 'Metric too long'
......
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