Warning, /AID2E-framework/examples/epic/b0/configurations/b0_ax_panda.yml is written in an unsupported language. File is not indexed.
0001 # ============================================================================
0002 # ePIC B0 Far-Forward Tracker Optimization with Ax and PanDA/iDDS
0003 # ============================================================================
0004 #
0005 # Geometry-only validation example:
0006 # - 4 B0 tracker disk z positions
0007 # - Ax optimization
0008 # - PanDA/iDDS distributed execution
0009 # - ePIC geometry workflow
0010 # - placeholder lever-arm objective
0011 #
0012 # ============================================================================
0013
0014
0015 # ============================================================================
0016 # SECTION 1: PROBLEM DEFINITION
0017 # ============================================================================
0018
0019 problem:
0020 name: "ePIC B0 Geometry Optimization with Ax and PanDA"
0021 problem_type: "EPIC_B0"
0022
0023 output_location: "./output/ax_panda"
0024 work_location: "./work/ax_panda"
0025
0026 # --------------------------------------------------------------------------
0027 # ePIC environment on PanDA workers
0028 # --------------------------------------------------------------------------
0029
0030 epic_environment:
0031 singularity_image: "/cvmfs/singularity.opensciencegrid.org/eic/eic_ci:nightly"
0032 epic_install: "/srv/epic_share_no_colon" #"/opt/local"
0033 epic_config: "epic"
0034 geometry_mode: "no_build"
0035
0036 # --------------------------------------------------------------------------
0037 # B0 detector design space
0038 # --------------------------------------------------------------------------
0039
0040 inline_design:
0041 epic_design_space:
0042 epic_design_parameters:
0043
0044 b0_tracker:
0045
0046 file_path: "$DETECTOR_PATH/compact/far_forward/B0_tracker.xml"
0047
0048 parameters:
0049
0050 z1:
0051 value: -40.0
0052 bounds: [-40.0, -30.0]
0053 xml_path: ".//constant[@name='B0TrackerLayer1_zstart']"
0054 attribute: "value"
0055 unit: "cm"
0056
0057 z2:
0058 value: -20.0
0059 bounds: [-20.0, -5.0]
0060 xml_path: ".//constant[@name='B0TrackerLayer2_zstart']"
0061 attribute: "value"
0062 unit: "cm"
0063
0064 z3:
0065 value: 0.0
0066 bounds: [0.0, 20.0]
0067 xml_path: ".//constant[@name='B0TrackerLayer3_zstart']"
0068 attribute: "value"
0069 unit: "cm"
0070
0071 z4:
0072 value: 30.0
0073 bounds: [30.0, 40.0]
0074 xml_path: ".//constant[@name='B0TrackerLayer4_zstart']"
0075 attribute: "value"
0076 unit: "cm"
0077
0078 optimization_groups:
0079 default:
0080 - "b0_tracker.z1"
0081 - "b0_tracker.z2"
0082 - "b0_tracker.z3"
0083 - "b0_tracker.z4"
0084
0085 # Placeholder geometry objective
0086 objectives:
0087 - name: "lever_arm"
0088 direction: "maximize"
0089
0090
0091 # ============================================================================
0092 # SECTION 2: OPTIMIZER CONFIGURATION
0093 # ============================================================================
0094
0095 optimizer:
0096 name: "ax"
0097 type: "bayesian"
0098
0099 parameters:
0100 initialization_strategy: "sobol"
0101 generator: "BOTORCH_MODULAR"
0102
0103 n_initial_samples: 1
0104 n_iterations: 2
0105 batch_size: 1
0106
0107 seed: 42
0108
0109
0110 # ============================================================================
0111 # SECTION 3: PANDA / iDDS SCHEDULER
0112 # ============================================================================
0113
0114 scheduler:
0115 runner_type: "PanDAiDDSRunner"
0116
0117 parameters:
0118
0119 source_dir: "."
0120 source_dir_parent_level: 1
0121
0122 # PanDA task identification
0123 name: "user.wguan.b0_geometry_optimization"
0124
0125 cloud: "US"
0126 queue: "BNL_PanDA_1"
0127
0128 task_type: "optimization"
0129
0130 # ------------------------------------------------------------------------
0131 # Worker environment
0132 # ------------------------------------------------------------------------
0133
0134 init_env: >
0135 source /cvmfs/unpacked.cern.ch/gitlab-registry.cern.ch/wguan/mlcontainer:py311_1.0/opt/conda/setup_mamba.sh;
0136 source /cvmfs/unpacked.cern.ch/gitlab-registry.cern.ch/wguan/mlcontainer:py311_1.0/opt/conda/dRICH-MOBO/MOBO-tools/setup_new.sh;
0137
0138 PY311=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/python/3.11.15-x86_64-el9/bin/python3;
0139 $PY311 -m venv .venv;
0140 source .venv/bin/activate;
0141 source setup_aid2e.sh;
0142 bash install_aid2e_dependencies.sh;
0143 export PYTHONPATH="$PWD/.local/lib:$PWD/src:$PWD:${PYTHONPATH:-}";
0144
0145 export APPTAINER=/cvmfs/atlas.cern.ch/repo/containers/sw/apptainer/x86_64-el8/1.4.4/bin/apptainer;
0146 mkdir -p "$PWD/container_bin";
0147 ln -sf "$APPTAINER" "$PWD/container_bin/singularity";
0148 export PATH="$PWD/container_bin:$PATH";
0149 export SINGULARITY="$PWD/container_bin/singularity";
0150 unset SINGULARITY_BINDPATH;
0151
0152 export AIDE_HOME=$(pwd);
0153 export PWD_PATH=$(pwd);
0154
0155 export SIF=/cvmfs/singularity.opensciencegrid.org/eic/eic_ci:nightly;
0156
0157 export EPIC_SHARE_LOCAL="$PWD/epic_share_no_colon";
0158 mkdir -p "$EPIC_SHARE_LOCAL/share";
0159
0160 "$APPTAINER" exec --bind "$PWD:$PWD" "$SIF" sh -c 'cp -a "$DETECTOR_PATH" "$1/"' sh "$EPIC_SHARE_LOCAL/share/" || exit 1;
0161
0162 exclude_source_files:
0163 - "(^|/)\\.[^/]+"
0164 - "doc*"
0165 - "DTLZ2*"
0166 - ".*json"
0167 - ".*log$"
0168 - "work"
0169 - "OUTDIR"
0170 - "calibrations"
0171 - "fieldmaps"
0172 - "gdml"
0173 - "EICrecon-drich-mobo"
0174 - "eic-software"
0175 - "epic-geom-drich-mobo"
0176 - "irt"
0177 - "share"
0178 - "back*"
0179 - "__pycache__"
0180 - "events"
0181 - "checkpoints"
0182
0183 # Test values
0184 max_walltime: 7200
0185 core_count: 1
0186 total_memory: 4000
0187
0188 enable_separate_log: true
0189 job_dir: null
0190
0191 max_retries: 5
0192
0193 output_location: "./panda_output"
0194
0195 # Poll PanDA every two minutes
0196 monitor_interval: 120
0197
0198
0199 # ============================================================================
0200 # SECTION 4: WORKFLOW
0201 # ============================================================================
0202
0203 workflows:
0204 workflows:
0205
0206 - name: "b0_geometry_validation"
0207 description: "Validate distributed B0 geometry modification with PanDA/iDDS"
0208
0209 stack_type: "epic"
0210
0211 branches:
0212
0213 - name: "main"
0214
0215 stages:
0216
0217 # ----------------------------------------------------------------
0218 # Stage 1: Geometry
0219 # ----------------------------------------------------------------
0220
0221 - name: "geo"
0222 description: "Prepare and validate modified B0 geometry"
0223
0224 jobs:
0225
0226 - name: "geo_job"
0227
0228 payload:
0229 evaluator_type: "stack"
0230 stack_type: "epic"
0231 job_id: "geo"
0232
0233 layers:
0234
0235 - name: "geo"
0236 layer: "geo"
0237
0238 inputs:
0239 - "{{geometry_dir}}/epic.xml"
0240
0241 outputs:
0242 - "{{output_dir}}/geo.overlaps.txt"
0243
0244
0245 # ----------------------------------------------------------------
0246 # Stage 2: Placeholder objective
0247 # ----------------------------------------------------------------
0248
0249 - name: "evaluate"
0250
0251 objective_plan:
0252
0253 steps:
0254
0255 stages:
0256
0257 - name: "evaluate_b0"
0258
0259 inline:
0260 entrypoint: "examples.epic.b0.b0_evaluator:objective_payload"
0261
0262 produces_objective: true
0263
0264
0265 # ============================================================================
0266 # OPTIONAL METADATA
0267 # ============================================================================
0268
0269 metadata:
0270 project: "AID2E"
0271 detector: "ePIC B0 Far-Forward Tracker"
0272 description: "B0 geometry optimization using Ax and PanDA/iDDS"
0273 version: "0.0.1"