Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
nni
Commits
2f01a4cd
Unverified
Commit
2f01a4cd
authored
Jan 29, 2019
by
chicm-ms
Committed by
GitHub
Jan 29, 2019
Browse files
Fix broken pipe v0.5.1 (#679)
* Fix broken pipe error * updates
parent
bc9eab33
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
4 deletions
+1
-4
azure-pipelines.yml
azure-pipelines.yml
+1
-1
src/sdk/pynni/nni/common.py
src/sdk/pynni/nni/common.py
+0
-3
No files found.
azure-pipelines.yml
View file @
2f01a4cd
...
@@ -33,7 +33,7 @@ jobs:
...
@@ -33,7 +33,7 @@ jobs:
displayName
:
'
Built-in
tuners
/
assessors
tests'
displayName
:
'
Built-in
tuners
/
assessors
tests'
-
script
:
|
-
script
:
|
cd test
cd test
PATH=$HOME/.local/bin:$PATH python3 config_test.py --ts local
PATH=$HOME/.local/bin:$PATH python3 config_test.py --ts local
--local_gpu
displayName
:
'
Examples
and
advanced
features
tests
on
local
machine'
displayName
:
'
Examples
and
advanced
features
tests
on
local
machine'
-
script
:
|
-
script
:
|
cd test
cd test
...
...
src/sdk/pynni/nni/common.py
View file @
2f01a4cd
...
@@ -44,13 +44,10 @@ _time_format = '%Y-%m-%d %H:%M:%S'
...
@@ -44,13 +44,10 @@ _time_format = '%Y-%m-%d %H:%M:%S'
class
_LoggerFileWrapper
(
TextIOBase
):
class
_LoggerFileWrapper
(
TextIOBase
):
def
__init__
(
self
,
logger_file
):
def
__init__
(
self
,
logger_file
):
self
.
file
=
logger_file
self
.
file
=
logger_file
self
.
orig_stdout
=
sys
.
stdout
def
write
(
self
,
s
):
def
write
(
self
,
s
):
if
s
!=
'
\n
'
:
if
s
!=
'
\n
'
:
time
=
datetime
.
now
().
strftime
(
_time_format
)
time
=
datetime
.
now
().
strftime
(
_time_format
)
self
.
orig_stdout
.
write
(
s
+
'
\n
'
)
self
.
orig_stdout
.
flush
()
self
.
file
.
write
(
'[{}] PRINT '
.
format
(
time
)
+
s
+
'
\n
'
)
self
.
file
.
write
(
'[{}] PRINT '
.
format
(
time
)
+
s
+
'
\n
'
)
self
.
file
.
flush
()
self
.
file
.
flush
()
return
len
(
s
)
return
len
(
s
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment