adnuts
adnuts copied to clipboard
Improved options for executable location and workflow
Recently @okenk and @jimianelli both mentioned they would like to have better options for a workflow. I'm open to that. Please use this issue to discuss what your preferred workflow is and how it could be implemented in adnuts.
Right now the user specifies the path to a directory that contains all the necessary folders, and the model name. It's assumed the executable is in that folder. Each is then copied to the working directory when running in parallel.
The workflow change that would help me the most is to be able to specify the full path of the executable so that it does not have to be in the same folder as the other model files. This is useful if you are running the same executable on many different model configurations, and there is no need to keep a copy of the executable in each configuration's subdirectory.
Yeah for SS3 users this makes a lot of sense. I was working with bespoke models so always made sense that each model would have it's own executable.
So how about a top level argument like exe_path
? I'll have to work out the bookkeeping on it throughout the code base, but I think that's a relative easy solution on my end.
That would be great.
exe_path idea great as I use symbolic links from command line to ensure same executable is used for different model configurations (e.g., in linux/osx: ln -s pathtoexecutable/mymod ) in the directory where model is run.
Additionally, would it make sense to give an option to set the "run_path"? Presently it's set one level up for all the chains in parallel. For example, in my working directory, it might be nice to run the chains in a specific directory within that local directory? Not a big deal but I use a workflow where the working directory I use sets subsidiary folders in there rather than above.
That's a good suggestion too. I didn't think through very carefully where the chains should be run. Stan uses temporary directories and that's something that might make a lot of sense too. Typically there's no reason to look at them, but I find it useful for debugging when there's an error, and to peak at the adaptation.csv file to see how things are going. But that's probably a very limited case.
So I need to add
- A new argument
exe_path
which defaults topath
but allows the user to locate their executable elsewhere. I think this should also include an option to pull it from the system PATH. Perhaps a value likeexe_path=""
could signify to look for it globally. - A new argument
run_path
which dictates where parallel chain folders are created and executed. This would default to R's working directory. Perhaps a flag likerun_path="temp"
could be used to flag that? This could actually be helpful if you want to run the same model simultaneously, e.g. a RWM and NUTS with 3 chains each. Right now those would conflict.
If anyone, maybe @kellijohnson-noaa, has any other thoughts that would be great. I'll try to get these updates done this summer.