ML4GW / aframev2

Detecting binary black hole mergers in LIGO with neural networks
MIT License
4 stars 14 forks source link

Add `aframe-init` CLI tool for initializing directory with config files to launch pipeline #183

Closed EthanMarx closed 1 month ago

EthanMarx commented 1 month ago

Adds aframe-init CLI tool for initializing directory with config files to launch pipeline. As an example,

poetry run aframe-init sandbox --directory /home/ethan.marx/aframe/analysis/

Will copy the sandbox base.cfg, bbh.cfg and training config.yaml to /home/ethan.marx/aframe/analysis/. It will also populate a env.env with the appropriate environment variable paths corresponding to the --directory you passed.

You can also optionally specify an --s3-bucket

poetry run aframe-init sandbox --directory /home/ethan.marx/aframe/analysis/ --s3-bucket s3://aframe-test/test/

This will add set the AFRAME_TRAIN_RUN_DIR and AFRAME_TRAIN_DATA_DIR to the s3 bucket location, which will initialize remote training

To initialize a tune pipeline, just run

poetry run aframe-init tune --directory /home/ethan.marx/aframe/tune/

This will also copy over a search_space.py file for editing.

wbenoit26 commented 1 month ago

Can you also add an option for the BNS config? Not sure what the neatest way to do that will be, but it would be nice to be able to do either

wbenoit26 commented 1 month ago

I like this concept. How do you envision the workflow in this scenario? Do you still launch the pipeline from the root of the repo?

EthanMarx commented 1 month ago

I think for now if you're doing bns you'll have to just adjust the parameters yourself

EthanMarx commented 1 month ago

I like this concept. How do you envision the workflow in this scenario? Do you still launch the pipeline from the root of the repo?

Yeah I think you'll still have to launch the pipeline from the root with poetry. Maybe I can add an extra file that gives you the corresponding command to copy

EthanMarx commented 1 month ago

@wbenoit26 Now made the .env a runfile that adds the poetry command for launching the pipeline (which can be run from anywhere, taking advantage of the poetry --directory arg to run poetry from a specified location). Users now have to add, yet another, environment variable $AFRAME_REPO to tell us where the aframe code is located.

Now that we have this and the build-containers executable it's much simpler to get started. Going to update the top level README to have new users take advantage of these executables. If they wan't more information on what's going on, can point them to the various sub readmes

EthanMarx commented 1 month ago

@wbenoit26 Updated various README's with instructions for using these new executables. Should be much simpler to get going now. When you get a chance give those a run through