Commit 34533d63 authored by Yuxin Wu's avatar Yuxin Wu

fix output handling of subproc_call

parent 48546d57
...@@ -26,6 +26,9 @@ feel free to delete everything in this template. ...@@ -26,6 +26,9 @@ feel free to delete everything in this template.
### 2. What you observed: ### 2. What you observed:
(1) **Include the ENTIRE logs here:** (1) **Include the ENTIRE logs here:**
```
<paste logs here>
```
It's always better to copy-paste what you observed instead of describing them. It's always better to copy-paste what you observed instead of describing them.
...@@ -44,15 +47,11 @@ If you expect higher speed, please read ...@@ -44,15 +47,11 @@ If you expect higher speed, please read
http://tensorpack.readthedocs.io/tutorial/performance-tuning.html http://tensorpack.readthedocs.io/tutorial/performance-tuning.html
before posting. before posting.
If you expect the model to work better, only in one of the two conditions can we help with it: If you expect the model to converge / work better, note that we do not help you on how to train a new model.
Only in one of the two conditions can we help with it:
(1) You're unable to reproduce the results documented in tensorpack examples. (1) You're unable to reproduce the results documented in tensorpack examples.
(2) It appears to be a tensorpack bug. (2) It appears to be a tensorpack bug.
Otherwise, how to train a good model on your task or your
modifications is a machine learning question.
We do not answer machine learning questions and it is your responsibility to
figure out how to make your models more accurate.
### 4. Your environment: ### 4. Your environment:
Paste the output of this command: `python -c 'import tensorpack.tfutils as u; print(u.collect_env_info())'` Paste the output of this command: `python -c 'import tensorpack.tfutils as u; print(u.collect_env_info())'`
......
...@@ -257,8 +257,11 @@ def subproc_call(cmd, timeout=None): ...@@ -257,8 +257,11 @@ def subproc_call(cmd, timeout=None):
return output, 0 return output, 0
except subprocess.TimeoutExpired as e: except subprocess.TimeoutExpired as e:
logger.warn("Command '{}' timeout!".format(cmd)) logger.warn("Command '{}' timeout!".format(cmd))
if e.output:
logger.warn(e.output.decode('utf-8')) logger.warn(e.output.decode('utf-8'))
return e.output, -1 return e.output, -1
else:
return "", -1
except subprocess.CalledProcessError as e: except subprocess.CalledProcessError as e:
logger.warn("Command '{}' failed, return code={}".format(cmd, e.returncode)) logger.warn("Command '{}' failed, return code={}".format(cmd, e.returncode))
logger.warn(e.output.decode('utf-8')) logger.warn(e.output.decode('utf-8'))
......
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