Skip to content

Commit

Permalink
fix output handling of subproc_call
Browse files Browse the repository at this point in the history
  • Loading branch information
ppwwyyxx committed Dec 19, 2019
1 parent 48546d5 commit 34533d6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
11 changes: 5 additions & 6 deletions .github/ISSUE_TEMPLATE/unexpected-problems---bugs.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ feel free to delete everything in this template.
### 2. What you observed:

(1) **Include the ENTIRE logs here:**
```
<paste logs here>
```

It's always better to copy-paste what you observed instead of describing them.

Expand All @@ -44,15 +47,11 @@ If you expect higher speed, please read
http://tensorpack.readthedocs.io/tutorial/performance-tuning.html
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.
(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:

Paste the output of this command: `python -c 'import tensorpack.tfutils as u; print(u.collect_env_info())'`
Expand Down
7 changes: 5 additions & 2 deletions tensorpack/utils/concurrency.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,11 @@ def subproc_call(cmd, timeout=None):
return output, 0
except subprocess.TimeoutExpired as e:
logger.warn("Command '{}' timeout!".format(cmd))
logger.warn(e.output.decode('utf-8'))
return e.output, -1
if e.output:
logger.warn(e.output.decode('utf-8'))
return e.output, -1
else:
return "", -1
except subprocess.CalledProcessError as e:
logger.warn("Command '{}' failed, return code={}".format(cmd, e.returncode))
logger.warn(e.output.decode('utf-8'))
Expand Down

0 comments on commit 34533d6

Please sign in to comment.