-
Notifications
You must be signed in to change notification settings - Fork 24
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
Ab tensorize speed up #552
Conversation
…thin docker rather than parallel docker - about a 10x speed up. Added hdf5-tools to the docker for testing the hd5 files. Added validate_tensors.sh that can test that a generated hd5 file is complete.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @abaumann one questions inline but feel free to merge!
|
||
find ${INPUT_TENSORS_DIR}/*.hd5 | \ | ||
xargs -P ${NUMBER_OF_THREADS} -I {} \ | ||
bash -c "h5dump -n {} | (grep -q 'HDF5 \"{}\"' && echo 'OK - {}' || echo 'BAD - {}')" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does the script know if an HD5 bad here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah this was one thing I wanted to check about, but basically it looks for output which starts with "HDF5" and then the file path and then information inside the file, so all it really does is check that h5dump doesn't exit - that seems to indicate it's not corrupt, but doesn't check anything about the actual contents.
${DOCKER_IMAGE} /bin/bash -c "pip3 install --upgrade pip | ||
pip install ${WORKDIR}; | ||
${DOCKER_IMAGE} /bin/bash -c "pip install --quiet --upgrade pip | ||
pip install --quiet ${WORKDIR}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<3
… scaling instance types and debugging tensorization.
Modified how tensorize.sh works to speed it up about 10x - originally this was running a batch of samples in serial in a docker container, and running multiple docker containers in parallel. I noticed this was using very little cpu, memory, or disk. Changed it to istead use xargs -P to run in parallel in a single docker container - the CPU/disk/mem all stay at nearly maxed out with the right combination of settings (e.g. on a 22 core machine I did 20 in parallel). Memory usage was low, so I'll update docs about what machine specs to use/what flags to use.
As part of this, I added a few other things: