-
Notifications
You must be signed in to change notification settings - Fork 1
mnms runs with mbatch #8
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
base: develop
Are you sure you want to change the base?
Conversation
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.
Hi Irene, could you add your --output-dir
argument to noise_all.py
as well?
Can you elaborate more on the change to args.qid
? The way it was before I think does the same thing: the options supplied to parser.add_argument
causes args.qid
to be a list of strings
You can reproduce this error with a small script from mnms import noise_models as nm
import argparse
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument("--output-dir", dest="output_dir", type=str, default=None)
parser.add_argument('--config-name', dest='config_name', type=str, required=True,
help='Name of model config file from which to load parameters')
parser.add_argument('--noise-model-name', dest='noise_model_name', type=str, required=True,
help='Name of model within config file from which to load parameters')
parser.add_argument('--qid', dest='qid', nargs='+', type=str, required=True,
help='list of soapack array "qids"')
args = parser.parse_args()
print(args.qid)
# args.qid = [item for sublist in args.qid for item in sublist.split()]
model = nm.BaseNoiseModel.from_config(args.config_name, args.noise_model_name,
*args.qid)
print('success') To run it, we use a test mbatch config file looks like this root_dir: /home/ia404/gitreps/mnms/scripts/
stages:
stage_test:
exec: python
options:
config-name: 'act_dr6v4_day'
noise-model-name: 'tile_cmbmask_daywide'
qid:
- 'pa5a_dw'
- 'pa6a_dw'
script: scripts/test_mbatch.py This generates Another alternative: root_dir: /home/ia404/gitreps/mnms/scripts/
stages:
stage_test:
exec: python
options:
config-name: 'act_dr6v4_day'
noise-model-name: 'tile_cmbmask_daywide'
qid: 'pa5a_dw pa6a_dw'
script: scripts/test_mbatch.py But in this case we have which also doesn't work, Adding |
Ok, this is very clear. I still wonder if there is a cleaner solution. Can you test what happens in
|
Please also target |
It's now targeting develop, and I opened an issue on mbatch, hopefully good to merge now -- |
As discussed offline, we will hold off on merging until simonsobs/mbatch#25 is fixed on the |
need to run noise_gen and noise_sim.py scripts. I am using mbatch.
mbatch requires --output-dir argument (where .sh and output messages of run are store). also need to transform the args.qid argument because it is read in as a string. I believe these changes should not alter current pipelines that run mnms/scripts/