Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parse_log.sh script failing on Mac OS X #6437

Open
1 of 5 tasks
onkarganjewar opened this issue Jun 23, 2018 · 0 comments
Open
1 of 5 tasks

parse_log.sh script failing on Mac OS X #6437

onkarganjewar opened this issue Jun 23, 2018 · 0 comments
Labels

Comments

@onkarganjewar
Copy link

onkarganjewar commented Jun 23, 2018

Issue summary

I'm trying to run the caffe/tools/extra/parse_log.sh script on my mac, but getting this error:

$ ./tools/extra/parse_log.sh sample-log.log 
sed: 1: "aux.txt": command a expects \ followed by text

Debug logs:

+ sed -n '/Iteration .* Testing net/,/Iteration *. loss/p' sample-log.log
+ sed -i '/Waiting for data/d' aux.txt
sed: 1: "aux.txt": command a expects \ followed by text

Am I using this script correctly? If so, are there any guidelines provided regarding this particular issue anywhere? I believe this error is due to the -i flag of sed, which apparently requires an extension of backup to be provided when running on OS X, if I'm not mistaken.

Steps to reproduce

Run this on Mac OS X:

$ ./tools/extra/parse_log.sh <your_caffe_log_file.log>

Tried solutions

I tried adding the extension .bak to wherever sed -i is being used, like this:

sed -i .bak '/Waiting for data/d' aux.txt
sed -i .bak '/prefetch queue empty/d' aux.txt
sed -i .bak '/Iteration .* loss/d' aux.txt
sed -i .bak '/Iteration .* lr/d' aux.txt
sed -i .bak '/Train net/d' aux.txt

This appears to have worked in my local machine, but not sure if it is the right way to do it. If it is, I would be happy to make a PR. :)

System configuration

  • Operating system: mac OS X Sierra 10.12.6
  • Compiler:
  • CUDA version (if applicable):
  • CUDNN version (if applicable):
  • BLAS: open
  • Python version (if using pycaffe): Python 2.7.15 :: Anaconda, Inc.
  • MATLAB version (if using matcaffe):

Issue checklist

  • read the guidelines and removed the first paragraph
  • written a short summary and detailed steps to reproduce
  • explained how solutions to related problems failed (tick if found none)
  • filled system configuration
  • attached relevant logs/config files (tick if not applicable)
@onkarganjewar onkarganjewar changed the title Unable to run parse_log.sh script on Mac OS X parse_log.sh script failing on Mac OS X Jun 23, 2018
@Noiredd Noiredd added the mac label Aug 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants