Back to home page

EIC code displayed by LXR

 
 

    


Warning, /AID2E-framework/examples/complete/workflow_example_single_objective.yml is written in an unsupported language. File is not indexed.

0001 problem:
0002   name: "DTLZ2 Single Objective Optimization"
0003   type: "toy"
0004   description: "Single-objective DTLZ2 test problem with scheduler cascade"
0005 
0006   # Design space parameters
0007   design_space:
0008     path: "examples/complete/design.params"
0009 
0010   # ========================================================================
0011   # OBJECTIVES: Define what we're optimizing for
0012   # ========================================================================
0013   # This is a SINGLE objective: f1 only (minimize)
0014   objectives:
0015     - name: "f1"
0016       direction: "minimize"
0017       
0018       # Objective-level scheduler (applies to this objective's execution)
0019       scheduler:
0020         runner_type: "JobLibRunner"
0021         parameters:
0022           n_jobs: -1        # Use all available cores
0023           backend: "threading"
0024       
0025       # Objective plan: HOW to compute f1
0026       objective_plan:
0027         steps:
0028           stages:
0029             - name: "evaluate_f1"
0030               script:
0031                 path: "examples/complete/scripts/dtlz2_f1.py"
0032                 output_file: "f1.json"
0033                 timeout_sec: 600
0034               produces_objective: true
0035       
0036       # Metrics to extract from the objective plan output
0037       metrics_keys: ["f1"]
0038 
0039 # SECTION 2: SCHEDULER CONFIGURATION
0040 # Global scheduler defaults (can be overridden at workflow/branch/stage level)
0041 # ============================================================================
0042 scheduler:
0043   runner_type: "JobLibRunner"
0044   parameters:
0045     n_jobs: 4          # Use 4 parallel jobs by default
0046     backend: "loky"    # Use process-based parallelism (default)
0047 
0048 # SECTION 3: WORKFLOW EXECUTION
0049 # How to execute the optimization (stages, parallelism, etc.)
0050 # NOTE: When objectives are simple (single script call), workflows are optional
0051 # ============================================================================
0052 workflows:
0053   - name: "dtlz2_single_eval"
0054     description: "Single objective evaluation workflow"
0055     
0056     # Workflow-level scheduler (OVERRIDES global scheduler)
0057     # PRECEDENCE: workflow scheduler > global scheduler
0058     scheduler:
0059       runner_type: "JobLibRunner"
0060       parameters:
0061         n_jobs: 8          # 8 jobs at workflow level
0062         backend: "threading"
0063     
0064     branches:
0065       - name: "main"
0066         description: "Main evaluation branch"
0067         
0068         # Branch-level scheduler (OVERRIDES workflow scheduler)
0069         # PRECEDENCE: branch scheduler > workflow scheduler > global scheduler
0070         scheduler:
0071           runner_type: "JobLibRunner"
0072           parameters:
0073             n_jobs: 2      # 2 jobs at branch level
0074             backend: "loky"
0075         
0076         stages:
0077           - name: "evaluate"
0078             description: "Evaluate objective f1 for design points"
0079             
0080             # Jobs: individual computational tasks
0081             jobs:
0082               - name: "compute_f1"
0083                 command: "python examples/complete/scripts/dtlz2_f1.py"
0084                 outputs:
0085                   - path: "f1.json"
0086                     format: "json"
0087             
0088             # Job factory: parallelize the job across design points
0089             # Creates 4 copies of the job (one per design point)
0090             job_factory:
0091               type: "range"
0092               params:
0093                 n: 4
0094             
0095             # Parallelism policies
0096             parallelism:
0097               max_concurrent: 4      # Max 4 jobs running simultaneously
0098               retry_max: 2           # Retry failed jobs up to 2 times
0099               timeout_sec: 300       # Kill job if it exceeds 300 seconds
0100             
0101             # Stage-level scheduler (OVERRIDES branch scheduler)
0102             # PRECEDENCE: stage scheduler > branch scheduler > workflow scheduler > global scheduler
0103             scheduler:
0104               runner_type: "JobLibRunner"
0105               parameters:
0106                 n_jobs: 4            # 4 jobs at stage level
0107                 backend: "loky"
0108             
0109             # Output artifacts produced by this stage
0110             outputs:
0111               - path: "f1.json"
0112                 format: "json"