Skip to content

Train postprocess model in docker + docs#128

Open
ilmcconnell wants to merge 5 commits intoUW-COSMOS:masterfrom
ilmcconnell:train_postprocess_docker_ILM
Open

Train postprocess model in docker + docs#128
ilmcconnell wants to merge 5 commits intoUW-COSMOS:masterfrom
ilmcconnell:train_postprocess_docker_ILM

Conversation

@ilmcconnell
Copy link
Contributor

@ankur-gos and @iross

Here's my proposal to train the postprocess model using a docker image plus the docs explaining how to set it up. Any feedback you have would be great!

@ankur-gos ankur-gos assigned ankur-gos and iross and unassigned ankur-gos Oct 19, 2020
@ankur-gos ankur-gos added API Related to external interfaces with e.g. the COSMOS visualizer enhancement New feature or request labels Oct 19, 2020
Copy link
Contributor

@ankur-gos ankur-gos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks mostly good. Just anonymize paths/ make them exposed as CLI arguments.

--logdir logs/ --modelcfg /ssd/ankur/Cosmos/deployment/configs/model_config.yaml \
--detect-weights /ssd/ankur/Cosmos/deployment/weights/model_weights.pth \
--logdir logs/ --modelcfg /ssd/iain/Cosmos/deployment/configs/model_config.yaml \
--detect-weights /ssd/iain/Cosmos/deployment/weights/model_weights.pth \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these paths need to be configurable from docker

@@ -0,0 +1,13 @@
#!/bin/sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would replace train_postprocess.sh with this script. Don't have a separate dockerized version.

-it \
--name test_train_postprocess \
-e CUDA_VISIBLE_DEVICES=1 \
-v /hdd/iaross/train_dir:/train_dir \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make the paths arguments to pass in. Anonymize these paths.

# copy files beginnging with that name to the destination folder of the same name


subset_training_data() No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add
if __name__ == '__main__':

You don't want accidental imports to mess this up.

@@ -0,0 +1,28 @@
import click
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like this file is a placeholder. It just prints things.

You can choose which GPU to use with the -e CUDA_VISIBLE_DEVICES=1 argument or omit that argument if it doesn't matter to you.
Specify bind mounts for the training and validation images plus the trained model output .pth file, with the -v arguments:

1. -v <local_full_path_to_training_data>:/train_dir \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make these paths arguments to docker_launch.sh as noted above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API Related to external interfaces with e.g. the COSMOS visualizer enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants