-
Notifications
You must be signed in to change notification settings - Fork 19
Description
In taking a closer look at some chains I ran a couple weeks ago, I'm seeing some odd behavior that may have to do with updates to how the campaign runs handle variables. This behavior has appeared on chain I ran around the end of June, but not ones using the same ini+yml file structure run at the end of May. (Credit to @xuod for catching this)
As a quick sketch of my job structure, I have a one yml file that has runs like
## file: main_campaign.yml
runs:
# ----- baseline 3x2pt -----
output_dir: "${OUTPUT_DIR}"
runs:
# Fiducial 3x2pt lcdm data run.
- name: 32pt_lcdm_fidsimy6
base: ini_files/main_32pt.ini
env:
DATA_VECTOR : sim_baseline_32_lcdm.fits
SCALE_CUTS_FILE : y6-scales-ml6-3x2pt_4_4_v0.0.ini
# ----- baseline shear+gammat -----
- name: 22pt-sg_lcdm_fidsimy6
parent: 32pt_lcdm_fidsimy6
params:
- DEFAULT.2PT_DATA_SETS = xip xim gammat
pipeline:
- del 2pt_gal
Then I have another file that includes the first one, and sets up chains with the same settings, but running on different (noisy) data vectors:
## file: noisy_campaign.yml
output_dir: "${OUTPUT_DIR}"
include: main_campaign.yml
runs:
- name: wnoise_22pt-sg_lcdm_fidsimy6_r01
parent: 22pt-sg_lcdm_fidsimy6
env:
NOISEREAL : "01"
params:
- DEFAULT.2PT_FILE = data_vectors/wnoise_sim_baseline_32_lcdm_r${NOISEREAL}.fits
Relevant lines from the ini file used are:
[DEFAULT]
2PT_FILE = data_vectors/${DATA_VECTOR}
2PT_DATA_SETS = xip xim gammat wtheta
[fits_nz]
...
nz_file = %(2PT_FILE)s
...
[2pt_like]
...
data_file = %(2PT_FILE)s
data_sets = %(2PT_DATA_SETS)s
...
Now, the odd behavior.
Looking at the header of the chain run with this setup, the line ## 2pt_file = data_vectors/wnoise_sim_baseline_32_lcdm_r01.fits (with the noisy data) appears in the DEFAULT section as expected, but the line ## 2pt_file = data_vectors/sim_baseline_32_lcdm.fits (with the original noiseless DV) appears at the end of every other module section (runtime, 2pt_like, consistency, sampler settings, everything). Also, the load_nz module and 2pt_like module have lines like ## nz_file = data_vectors/sim_baseline_32_lcdm.fits rather than the %(2PT_FILE)s cosmosis variables which remain in the headers of older chains (run in May).
In contrast, in the 2pt_like header, the ## data_sets = %(2PT_DATA_SETS)s line is still using the cosmosis variable. I'm not sure why these two variables (2PT_DATA_SETS vs 2PT_FILE) would be treated differently, but I wonder if the variable update including an env variable has something to do with it. I'll tinker with this a bit with a test samper and will share any additional insights if I can find them, but ideas or suggestions are welcome!