Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seminar-breakout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
seminar-breakout
Commits
bace7efb
Commit
bace7efb
authored
Apr 06, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace os.rename with shutil.move (fix #216)
parent
b5c5a944
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
tensorpack/train/monitor.py
tensorpack/train/monitor.py
+2
-1
tensorpack/user_ops/__init__.py
tensorpack/user_ops/__init__.py
+2
-0
No files found.
tensorpack/train/monitor.py
View file @
bace7efb
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
# Author: Yuxin Wu <ppwwyyxxc@gmail.com>
# Author: Yuxin Wu <ppwwyyxxc@gmail.com>
import
os
import
os
import
shutil
import
operator
import
operator
from
collections
import
defaultdict
from
collections
import
defaultdict
import
six
import
six
...
@@ -203,7 +204,7 @@ class JSONWriter(TrainingMonitor):
...
@@ -203,7 +204,7 @@ class JSONWriter(TrainingMonitor):
try
:
try
:
with
open
(
tmp_filename
,
'w'
)
as
f
:
with
open
(
tmp_filename
,
'w'
)
as
f
:
json
.
dump
(
self
.
_stats
,
f
)
json
.
dump
(
self
.
_stats
,
f
)
os
.
renam
e
(
tmp_filename
,
self
.
_fname
)
shutil
.
mov
e
(
tmp_filename
,
self
.
_fname
)
except
IOError
:
# disk error sometimes..
except
IOError
:
# disk error sometimes..
logger
.
exception
(
"Exception in StatHolder.finalize()!"
)
logger
.
exception
(
"Exception in StatHolder.finalize()!"
)
...
...
tensorpack/user_ops/__init__.py
View file @
bace7efb
...
@@ -18,4 +18,6 @@ if ret != 0:
...
@@ -18,4 +18,6 @@ if ret != 0:
print
(
"Failed to compile user ops!"
)
print
(
"Failed to compile user ops!"
)
else
:
else
:
recv_mod
=
tf
.
load_op_library
(
os
.
path
.
join
(
file_dir
,
'zmq_recv_op.so'
))
recv_mod
=
tf
.
load_op_library
(
os
.
path
.
join
(
file_dir
,
'zmq_recv_op.so'
))
# TODO trigger recompile when load fails
zmq_recv
=
recv_mod
.
zmq_recv
zmq_recv
=
recv_mod
.
zmq_recv
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