Utilities API¶
Configuration utilities for AID2E Framework.
ArtifactSpec
¶
Bases: BaseModel
Output artifact specification for a stage.
Defines expected output files that stages/jobs produce.
Attributes:
| Name | Type | Description |
|---|---|---|
path |
str
|
File path pattern (e.g., "objectives_*.json"). |
format |
str
|
File format ("json", "yaml", "csv", or "root"). |
Example
artifact = ArtifactSpec(path="objectives_*.json", format="json")
Source code in src/aid2e/utilities/configurations/workflow_config.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 | |
BaseParameter
¶
Bases: BaseModel
Abstract base class for all parameter types. Subclasses should define specific parameter characteristics.
Source code in src/aid2e/utilities/configurations/base_models.py
5 6 7 8 9 10 11 12 13 14 15 | |
BranchDefinition
¶
Bases: BaseModel
Branch definition (optional, for organizing stages in a DAG).
A branch is an optional subgraph inside a workflow, useful when you want multiple independent pipelines under one workflow (e.g., "physics sim" branch + "surrogate" branch). Stages within a branch are executed in topological order.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Branch name (e.g., "main", "physics_sim", "surrogate"). |
stages |
List[StageDefinition]
|
List of stages in DAG order (assumes simple sequential order; extend with explicit DAG if needed). |
scheduler |
Optional[SchedulerConfiguration]
|
Optional branch-level scheduler default (used if stage not set). |
Example
branch = BranchDefinition( ... name="main", ... stages=[ ... StageDefinition(name="evaluate", ...), ... StageDefinition(name="aggregate", ...) ... ] ... )
Notes
- Multiple branches in one workflow execute independently
- For complex DAGs, extend this model with explicit edge definitions
Source code in src/aid2e/utilities/configurations/workflow_config.py
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 | |
ChoiceParameter
¶
Bases: BaseParameter
Categorical parameter with discrete choices.
Source code in src/aid2e/utilities/configurations/base_models.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | |
CombinedObjectiveMetric
¶
Bases: BaseModel
Metric emitted by a combined objective plan.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Objective name (e.g., "f1"). |
direction |
ObjectiveDirection
|
Optimization direction for this metric. |
metric_key |
str
|
Key in the plan output to extract this metric. |
Source code in src/aid2e/utilities/configurations/workflow_config.py
24 25 26 27 28 29 30 31 32 33 34 35 | |
CombinedObjectivePlan
¶
Bases: BaseModel
Combined objective execution producing multiple metrics in one plan.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Identifier for the combined objective bundle. |
objective_plan |
ObjectivePlanSpec
|
Plan executed once to emit multiple metrics. |
metrics |
list[CombinedObjectiveMetric]
|
Metrics extracted from the plan output with their directions. |
scheduler |
Optional[SchedulerConfiguration]
|
Optional scheduler default for this combined plan. |
Source code in src/aid2e/utilities/configurations/workflow_config.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | |
DesignConfig
¶
Bases: BaseModel
Complete design configuration with parameters and constraints.
Encapsulates a design space including all parameter groups, their bounds/choices, and constraints on valid parameter combinations. Validates constraint syntax at load time and provides validated constraints for optimizer integration.
This is the base class for specialized configurations (e.g., EpicDesignConfig) and supports generic toy problems (DTLZ2, etc.).
Attributes:
| Name | Type | Description |
|---|---|---|
design_parameters |
DesignParameters
|
Collection of parameter groups defining the design space. Can be specialized for specific contexts such as EpicDesignConfig. |
parameter_constraints |
Optional[List[ParameterConstraint]]
|
List of constraints on valid parameter combinations. |
key |
str
|
YAML key associated with model. |
Example
config = DesignConfig( ... design_parameters=DesignParameters(...), ... parameter_constraints=[ParameterConstraint(...)], ... optimization_groups={...}, ... ) names = config.get_parameter_names() bounds = config.get_parameter_bounds('group.param')
Constraints are already syntax-validated¶
search_space = SearchSpace.from_design_config(config)
Source code in src/aid2e/utilities/configurations/design_config.py
250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 | |
check_constraints(param_values)
¶
Check all constraints against provided parameter values at runtime.
Evaluates each constraint rule with the given parameter values. This is primarily for non-Ax optimizers or manual validation. For Ax, constraints are passed directly to the optimizer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
param_values
|
Dict[str, float]
|
Dictionary mapping qualified parameter names to numeric values. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
Tuple of (all_valid, failed_constraint_names) where: |
List[str]
|
|
Tuple[bool, List[str]]
|
|
Example
param_values = { ... 'tracker.thickness': 0.35, ... 'magnet.strength': 1.5 ... } is_valid, failures = config.check_constraints(param_values) if not is_valid: ... print(f"Failed constraints: {failures}")
Notes
- Constraints are already syntax-validated at load time
- For Ax optimizer, use config.parameter_constraints directly
Source code in src/aid2e/utilities/configurations/design_config.py
423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 | |
get_all_optimization_groups()
¶
Get all optimization groups.
Returns:
| Type | Description |
|---|---|
Dict[str, List[str]]
|
List of all optimization groups |
Source code in src/aid2e/utilities/configurations/design_config.py
415 416 417 418 419 420 421 | |
get_flat_parameters()
¶
Retrieve all parameters as a flat dictionary.
Flattens the hierarchical group structure into a single dictionary mapping qualified parameter names to parameter objects.
Returns:
| Type | Description |
|---|---|
Dict[str, BaseParameter]
|
Dictionary mapping qualified names (e.g., "group.param") |
Dict[str, BaseParameter]
|
to BaseParameter objects. |
Example
flat = config.get_flat_parameters() param = flat['tracker.thickness']
Source code in src/aid2e/utilities/configurations/design_config.py
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 | |
get_optimization_group(group_name)
¶
Get parameter names for a specific optimization group.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
group_name
|
str
|
name of group to get parameters for |
required |
Returns:
| Type | Description |
|---|---|
Optional[List[str]]
|
List of parameters in group |
Source code in src/aid2e/utilities/configurations/design_config.py
404 405 406 407 408 409 410 411 412 413 | |
get_parameter_bounds(param_name)
¶
Get bounds for a range parameter.
Retrieves the lower and upper bounds for a RangeParameter by its qualified name. Returns None if the parameter is not found or does not have bounds (e.g., ChoiceParameter).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
param_name
|
str
|
Qualified parameter name (e.g., "tracker.thickness"). |
required |
Returns:
| Type | Description |
|---|---|
Optional[Tuple[float, float]]
|
Tuple of (lower_bound, upper_bound) or None if not applicable. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If parameter name is not found (use get_flat_parameters to verify existence first). |
Example
bounds = config.get_parameter_bounds('tracker.thickness') if bounds: ... print(f"Range: {bounds[0]} to {bounds[1]}")
Source code in src/aid2e/utilities/configurations/design_config.py
352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 | |
get_parameter_choices(param_name)
¶
Get choices for a choice parameter.
Retrieves the list of valid choices for a ChoiceParameter by its qualified name. Returns None if the parameter is not found or does not have choices (e.g., RangeParameter).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
param_name
|
str
|
Qualified parameter name (e.g., "detector.type"). |
required |
Returns:
| Type | Description |
|---|---|
Optional[List[str]]
|
List of choice strings or None if not applicable. |
Example
choices = config.get_parameter_choices('detector.type') if choices: ... print(f"Available: {choices}")
Source code in src/aid2e/utilities/configurations/design_config.py
380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 | |
get_parameter_names()
¶
Get all parameter qualified names in the design space.
Returns a list of all unique qualified parameter names in the format 'group_name.parameter_name'.
Returns:
| Type | Description |
|---|---|
List[str]
|
Sorted list of qualified parameter names. |
Example
names = config.get_parameter_names() print(names) ['group1.param1', 'group1.param2', 'group2.param1']
Source code in src/aid2e/utilities/configurations/design_config.py
336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 | |
validate_constraints_syntax()
¶
Validate all constraint syntax and parameter references.
Ensures all constraints: 1. Have valid Python syntax 2. Reference only parameters that exist in the design space 3. Are well-formed boolean/comparison expressions
This validation runs automatically when a DesignConfig is instantiated, catching configuration errors early.
Returns:
| Type | Description |
|---|---|
DesignConfig
|
Self (for Pydantic validator chaining). |
Raises:
| Type | Description |
|---|---|
ValueError
|
If any constraint has invalid syntax or references unknown parameters. |
Source code in src/aid2e/utilities/configurations/design_config.py
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 | |
DesignConfigLoader
¶
Load design configurations from YAML files with canonical resolution.
Supports either loading design configuration form an external file or from an
inline YAML block. In both cases, data should include a design_space block
containing design_parameters and optional parameter_constraints.
Class attributes
space_key: YAML key of the design space instance to parse, such as 'epic_design_space'. param_key: YAML key of the design parameters to extract, such as 'epic_design_parameters'. constrain_key: YAML key of the list of parameter constraints to extract, such as 'parameter_constraints'.
Example
Load design space from an external file¶
config = DesignConfigLoader.load('./configs/design.params')
Or load from an inlined design space in a YAML block¶
yaml = { "inline design" : { "design_space" : { "design_parameters" : { "group" : { "parameters" : {...} }, }, "parameter_constraints" : [...] } } } config = DesignConfigLoader.load(yaml)
Source code in src/aid2e/utilities/configurations/design_config.py
466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 | |
load(file_path=None, design_data=None)
staticmethod
¶
Load design configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_path
|
str
|
Path to the YAML design config file. Should be resolved ahead of time. |
None
|
design_data
|
Dict[str, Any]
|
Loaded data stored in a dictionary |
None
|
Returns:
| Type | Description |
|---|---|
DesignConfig
|
DesignConfig instance ready for use in optimization workflows. |
Example
config = DesignConfigLoader.load(file_path='examples/design.yml') print(config.get_parameter_names()) is_valid, failures = config.validate_constraints({...})
Source code in src/aid2e/utilities/configurations/design_config.py
621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 | |
DesignParameters
¶
Bases: RootModel[Dict[str, ParameterGroup]]
Collection of parameter groups for generic design spaces.
Manages a hierarchical organization of design parameters grouped by context (subsystems, regions, etc.). Automatically injects fully qualified parameter names in the format "group_name.parameter_name" for unique identification.
The root model contains a dictionary mapping group names to ParameterGroup instances.
Attributes:
| Name | Type | Description |
|---|---|---|
root |
Dictionary mapping group names to parameter groups. |
|
key |
str
|
YAML key associated with models. |
Example
params = DesignParameters(root={ ... 'tracker': ParameterGroup(parameters={...}), ... 'magnet': ParameterGroup(parameters={...}) ... })
Notes
- Qualified names are injected at validation time.
- Parameter uniqueness is enforced through qualified naming.
Source code in src/aid2e/utilities/configurations/design_config.py
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 | |
inject_qualified_names(values)
classmethod
¶
Inject fully qualified names into each parameter.
Modifies parameter objects in-place to add 'name' attribute in the format 'group_name.parameter_name' if not already present. This ensures every parameter has a globally unique identifier within the design space.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
values
|
Dict[str, dict]
|
Dictionary mapping group names to group data dicts. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, dict]
|
Modified values dict with injected qualified names. |
Notes
This validator runs before model instantiation and is critical for the qualified naming system used throughout this module.
Source code in src/aid2e/utilities/configurations/design_config.py
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 | |
EnvironmentConfig
¶
Bases: ABC, BaseModel
Configures environment variables
Generic base model for configuring environment variables. Must be specialized for specific for specifc contexts such as EpicConfiguration.
Example
class MyEnvConfig(EnvironmentConfiguration): ... geometry_install: str ... def activate(self) -> None: ... os.environ['GEOMETRY_INSTALL'] = self.geometry_install ... print(f"[INFO] Set $GEOMETRY_INSTALL to {self.geometry_install}")
Source code in src/aid2e/utilities/configurations/env_config.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | |
key
abstractmethod
property
¶
YAML key associated with model (e.g. epic_environment_config)
activate()
abstractmethod
¶
Activate environment variables. Must be implemented by subclasses.
Source code in src/aid2e/utilities/configurations/env_config.py
36 37 38 39 40 41 42 | |
EnvironmentConfigLoader
¶
Bases: ABC
Loader for environment variables
Generic base class for loading environment config models. Must be specialized for specific contexts like EnvironmentConfig.
Example
class MyEnvConfigLoader(EnvironmentConfigLoader[MyEnvConfig]): ... @staticmethod ... def load(file_path: str) -> MyEnvConfigLoader: ... with open(file_path, 'r') as file: ... data = yaml.safe_load(file) ... return MyEnvConfigLoader(**data)
Source code in src/aid2e/utilities/configurations/env_config.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | |
load(env_data=None, file_path=None)
abstractmethod
staticmethod
¶
Load an environment configuration from a YAML file. Must instantiate and return a subclass of EnvironmentConfig.
Source code in src/aid2e/utilities/configurations/env_config.py
61 62 63 64 65 66 67 68 69 | |
FullConfig
¶
Bases: BaseModel
Complete configuration combining problem, optimizer, scheduler, and workflows.
Source code in src/aid2e/utilities/configurations/full_config.py
19 20 21 22 23 24 | |
InlineObjective
¶
Bases: BaseModel
Objective computed via inline Python function.
The entrypoint should reference a callable that accepts objective-step keyword arguments and returns a scalar value or metric mapping.
Attributes: entrypoint: Module and function reference (format: "module.path:function_name").
Example
inline = InlineObjective(entrypoint="my_objectives:compute_f1")
def compute_f1(*, design_point, inputs, outputs,¶
extra_args, xcom, work_dir, output_dir):¶
return {"f1": 0.5}¶
Source code in src/aid2e/utilities/configurations/objectives.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | |
validate_entrypoint_format(v)
classmethod
¶
Validate entrypoint has 'module.path:function_name' format.
Source code in src/aid2e/utilities/configurations/objectives.py
84 85 86 87 88 89 90 91 92 93 94 95 96 97 | |
JobDefinition
¶
Bases: BaseModel
Single job/task definition within a stage.
A job is the smallest schedulable unit (e.g., one simulation, training run, etc). Jobs can be expanded from a template via job_factory.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Job name (e.g., "simulate"). |
command |
str
|
Executable command (e.g., "python scripts/dtlz2_problem.py"). |
payload |
Dict[str, Any]
|
Command arguments/payload (free-form dict, supports template substitution). |
rule |
Optional[str]
|
Optional template for constructing final command from payload. Uses format: "{command} {payload[key1]} {payload[key2]}" etc. If not specified, defaults to "{command}" (just execute command). |
resources |
Dict[str, Any]
|
Resource requirements (free-form dict, e.g., {"memory": "4GB"}). |
outputs |
List[ArtifactSpec]
|
Output artifacts this job produces. |
Example
job = JobDefinition( ... name="dtlz2_evaluate", ... command="python scripts/dtlz2_problem.py", ... rule="{{command}} {{payload[design_params_file]}} {{payload[output_dir]}} {payload[job_id]}", ... payload={ ... "design_params_file": "{{input_design_params}}", ... "output_dir": "{{output_dir}}", ... "job_id": "{{job_id}}" ... }, ... outputs=[ArtifactSpec(path="objectives_*.json", format="json")] ... )
Notes
- Payload supports template substitution: {{job_id}}, {{output_dir}}, {{stage_outputs[stage_name]}}
- Rule template follows experimental_stack.py StackLayer pattern
- Resources dict is executor-dependent (e.g., JobLibRunner ignores, SlurmRunner uses)
Source code in src/aid2e/utilities/configurations/workflow_config.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | |
JobFactory
¶
Bases: BaseModel
Factory for generating multiple jobs from a template.
Enables fan-out: creating N parallel jobs from one job definition. Useful for evaluating multiple design points in parallel.
Attributes:
| Name | Type | Description |
|---|---|---|
type |
str
|
Factory type ("range", "enumerate", "Cartesian", etc). |
params |
Dict[str, Any]
|
Factory-specific parameters (e.g., {"n": 4} for range). |
Example
Create 4 parallel design point evaluations¶
factory = JobFactory(type="range", params={"n": 4})
Notes
- "range" type: creates N copies with job_id = 0..N-1
- "enumerate" type: creates one job per item in a list
- "Cartesian" type: creates N_A * N_B jobs from two parameter sets
Source code in src/aid2e/utilities/configurations/workflow_config.py
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | |
ObjectiveDefinition
¶
Bases: BaseModel
Complete objective specification: name, direction, and objective plan.
This is the unified model used across problem, optimization, and workflow layers. It combines what to optimize (name + direction) with how to execute it through one or more script/inline steps.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Unique objective identifier (e.g., "f1", "efficiency"). |
direction |
ObjectiveDirection
|
Optimization direction (minimize or maximize). |
objective_plan |
Optional[ObjectivePlanSpec]
|
How to execute the objective through steps. |
scheduler |
Optional[SchedulerConfiguration]
|
Reserved objective-level scheduler default. The current runtime executes objective plans inside the DAG executor after workflow stages complete; scheduled objective work should be represented as workflow stages. |
metrics_keys |
List[str]
|
Optional keys to extract from plan output when it returns a dict. Useful when one plan produces multiple metrics. Example: plan outputs {"f1": 0.5, "f2": 0.3, "runtime": 10.2}, metrics_keys=["f1"] extracts only f1. |
Source code in src/aid2e/utilities/configurations/objectives.py
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 | |
from_directive(directive, objective_plan=None)
classmethod
¶
Create ObjectiveDefinition from directive string.
Parses strings like "minimize:f1" or "maximize:efficiency".
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
directive
|
str
|
String in format "minimize:name" or "maximize:name". |
required |
objective_plan
|
Optional[ObjectivePlanSpec]
|
Optional objective step plan. |
None
|
Returns:
| Type | Description |
|---|---|
ObjectiveDefinition
|
ObjectiveDefinition with parsed direction and name. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If directive format is invalid. |
Example
directive = "minimize:f1" obj = ObjectiveDefinition.from_directive(directive)
Source code in src/aid2e/utilities/configurations/objectives.py
300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 | |
to_directive()
¶
Convert to optimization directive string format.
Returns:
| Type | Description |
|---|---|
str
|
String like "minimize:f1" or "maximize:efficiency". |
str
|
Useful for OptimizationConfiguration.objectives. |
Example
obj = ObjectiveDefinition(name="f1", direction=ObjectiveDirection.MINIMIZE, objective_plan=None) obj.to_directive() 'minimize:f1'
Source code in src/aid2e/utilities/configurations/objectives.py
286 287 288 289 290 291 292 293 294 295 296 297 298 | |
ObjectiveDirection
¶
Bases: str, Enum
Direction of optimization for an objective.
Attributes:
| Name | Type | Description |
|---|---|---|
MINIMIZE |
Minimize the objective value. |
|
MAXIMIZE |
Maximize the objective value. |
Source code in src/aid2e/utilities/configurations/objectives.py
25 26 27 28 29 30 31 32 33 | |
ObjectivePlanSpec
¶
Bases: BaseModel
Plan for executing an objective (always modeled as steps).
The canonical form is a step plan with one or more stages.
Source code in src/aid2e/utilities/configurations/objectives.py
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 | |
is_steps()
¶
Return True if this plan is a step DAG.
Source code in src/aid2e/utilities/configurations/objectives.py
242 243 244 | |
reject_legacy_shapes(values)
¶
Reject retired objective plan schema variants.
Source code in src/aid2e/utilities/configurations/objectives.py
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 | |
ObjectivesRegistry
¶
Runtime registry for objective definitions.
Allows objectives to be registered and retrieved by name for use during workflow execution. This enables decoupling objective definitions from their runtime computation.
Example
registry = ObjectivesRegistry() obj_f1 = ObjectiveDefinition(name="f1", direction=ObjectiveDirection.MINIMIZE) registry.register(obj_f1) retrieved = registry.get("f1")
Source code in src/aid2e/utilities/configurations/objectives.py
343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 | |
__init__()
¶
Initialize empty registry.
Source code in src/aid2e/utilities/configurations/objectives.py
357 358 359 | |
clear()
¶
Clear all registered objectives.
Source code in src/aid2e/utilities/configurations/objectives.py
393 394 395 | |
get(name)
¶
Retrieve objective definition by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Objective name. |
required |
Returns:
| Type | Description |
|---|---|
Optional[ObjectiveDefinition]
|
ObjectiveDefinition if found, None otherwise. |
Source code in src/aid2e/utilities/configurations/objectives.py
374 375 376 377 378 379 380 381 382 383 | |
list_all()
¶
Get all registered objectives.
Returns:
| Type | Description |
|---|---|
List[ObjectiveDefinition]
|
List of all registered ObjectiveDefinition instances. |
Source code in src/aid2e/utilities/configurations/objectives.py
385 386 387 388 389 390 391 | |
register(objective)
¶
Register an objective by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
objective
|
ObjectiveDefinition
|
ObjectiveDefinition to register. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
If objective with same name already registered. |
Source code in src/aid2e/utilities/configurations/objectives.py
361 362 363 364 365 366 367 368 369 370 371 372 | |
OptimizerConfiguration
¶
Bases: BaseModel
Canonical optimizer section model.
Source code in src/aid2e/utilities/configurations/optimizer_config.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | |
parse_algorithm_params()
¶
Parse registered backend-specific parameters if a model exists.
Source code in src/aid2e/utilities/configurations/optimizer_config.py
30 31 32 33 34 35 | |
ParallelismPolicy
¶
Bases: BaseModel
Policy for parallel job execution within a stage.
Attributes:
| Name | Type | Description |
|---|---|---|
max_concurrent |
int
|
Maximum jobs to run concurrently in a stage. |
retry_max |
int
|
Maximum retries on job failure. |
timeout_sec |
int
|
Timeout per job in seconds. |
Example
policy = ParallelismPolicy(max_concurrent=4, retry_max=2, timeout_sec=300)
Source code in src/aid2e/utilities/configurations/workflow_config.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 | |
ParameterConstraint
¶
Bases: BaseModel
Represents a mathematical constraint on design parameters.
Constraints are validated for syntactic correctness at configuration load time. The validated constraints can then be passed to optimizers (e.g., Ax) which handle runtime constraint enforcement internally.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Unique identifier for the constraint. |
description |
Optional[str]
|
Human-readable explanation of the constraint intent. |
rule |
str
|
Mathematical expression using qualified parameter names, e.g., "group.param1 + group.param2 < 10.0". |
key |
str
|
YAML key associated with a list of models. |
Example
constraint = ParameterConstraint( ... name="budget_limit", ... description="Total cost must not exceed budget", ... rule="tracker.cost + magnet.cost < 1000" ... )
Validate syntax (done automatically at load time)¶
constraint.validate_syntax(['tracker.cost', 'magnet.cost']) (True, None)
Source code in src/aid2e/utilities/configurations/design_config.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | |
evaluate(param_values)
¶
Evaluate constraint against parameter values at runtime.
Substitutes parameter names in the constraint rule with their values and evaluates the resulting mathematical expression. This is used for runtime constraint checking when the optimizer doesn't support constraint enforcement (e.g., random search, some evolutionary algorithms).
For optimizers with native constraint support (e.g., Ax), use the constraint object directly instead of calling this method.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
param_values
|
Dict[str, float]
|
Dictionary mapping qualified parameter names (e.g., "group.param") to numeric values. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if constraint is satisfied, False otherwise. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the constraint rule cannot be evaluated (e.g., missing parameters, division by zero). |
Example
constraint = ParameterConstraint( ... name="test", rule="DTLZ2.x1 < 1.0" ... ) constraint.evaluate({"DTLZ2.x1": 0.5}) True constraint.evaluate({"DTLZ2.x1": 1.5}) False
Notes
- Prefer using optimizer's native constraint enforcement when available
- This method is primarily for optimizer-agnostic validation
- Uses eval() on sanitized expressions (validated at load time)
Source code in src/aid2e/utilities/configurations/design_config.py
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | |
extract_parameter_names()
¶
Extract parameter names referenced in the constraint rule.
Parses the constraint expression and extracts all identifiers that appear to be qualified parameter names (containing a dot).
Returns:
| Type | Description |
|---|---|
Set[str]
|
Set of parameter names found in the rule. |
Example
constraint = ParameterConstraint( ... name="test", ... rule="tracker.x + magnet.y < detector.limit" ... ) names = constraint.extract_parameter_names() print(sorted(names)) ['detector.limit', 'magnet.y', 'tracker.x']
Source code in src/aid2e/utilities/configurations/design_config.py
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | |
validate_syntax(valid_param_names)
¶
Validate constraint syntax and parameter references.
Checks that: 1. The constraint rule is valid Python syntax 2. All referenced parameters exist in the valid_param_names list 3. The expression is a valid comparison/boolean expression
This is structural validation done at configuration load time, NOT runtime constraint evaluation (which is handled by the optimizer).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
valid_param_names
|
List[str]
|
List of valid qualified parameter names from the design configuration. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
Tuple of (is_valid, error_message) where: |
Optional[str]
|
|
Tuple[bool, Optional[str]]
|
|
Example
constraint = ParameterConstraint( ... name="test", rule="group.x + group.y < 10" ... ) is_valid, err = constraint.validate_syntax( ... ['group.x', 'group.y'] ... ) assert is_valid and err is None
Source code in src/aid2e/utilities/configurations/design_config.py
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | |
ParameterGroup
¶
Bases: BaseModel
Container for a group of related parameters.
Groups parameters that share common properties or contexts, such as detector subsystems (vertex_barrel, silicon_tracker, etc.). Parameters within a group are accessed via qualified names (group_name.param_name).
Attributes:
| Name | Type | Description |
|---|---|---|
parameters |
Dict[str, Parameter]
|
Dictionary mapping parameter names to Parameter objects. |
Example
group = ParameterGroup(parameters={ ... 'thickness': RangeParameter(value=0.35, bounds=[0.2, 0.6]), ... 'pitch': RangeParameter(value=25, bounds=[10, 50]) ... })
Source code in src/aid2e/utilities/configurations/design_config.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | |
ProblemConfigLoader
¶
Loader for problem YAML/CONFIG files.
Parses files following the schema used by examples/basic/problem.config:
problem:
name: "..."
type: "..."
output_location: "..."
work_location: "..."
design_parameters_file: "./path/to/design.params"
objectives:
- name: "f1"
direction: "minimize"
objective_plan:
steps:
stages:
- name: "evaluate_f1"
script:
path: "scripts/dtlz2_problem.py"
output_file: "objectives_{job_id}.json"
produces_objective: true
metrics_keys: ["f1"]
- name: "f2"
direction: "minimize"
Notes
Use ProblemConfigLoader.load() to load from a file path or
ProblemConfigLoader.from_dict() to construct from an in-memory
dictionary.
Source code in src/aid2e/utilities/configurations/problem_config.py
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 | |
from_dict(problem_payload, base_dir=None)
staticmethod
¶
Construct ProblemConfiguration from a dict payload.
Accepts the inner 'problem' mapping as a Python dict and supports both file-based and inline design definitions. Set base_dir for reliable relative path resolution when using 'design_parameters_file'.
Source code in src/aid2e/utilities/configurations/problem_config.py
330 331 332 333 334 335 336 337 338 | |
ProblemConfiguration
¶
Bases: BaseModel
Generic problem configuration.
Focuses on core problem attributes, a design configuration, objectives, and
optional observations. Environment and scheduler/trial management belong to
separate workflow components (e.g., WorkflowManager).
Notes
design_configaccepts any subclass ofDesignConfig.objectivesmust be non-empty with unique names.
Source code in src/aid2e/utilities/configurations/problem_config.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | |
normalize_objectives(raw_objectives)
classmethod
¶
Normalize various objective payload shapes into ObjectiveDefinition.
Source code in src/aid2e/utilities/configurations/problem_config.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | |
validate_paths()
¶
Validate directory paths and objective correctness.
- Ensures existing output and work paths are directories.
- Ensures
objectivesis non-empty with unique names.
Source code in src/aid2e/utilities/configurations/problem_config.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | |
RangeParameter
¶
Bases: BaseParameter
Continuous parameter with min/max bounds.
Source code in src/aid2e/utilities/configurations/base_models.py
18 19 20 21 22 23 24 25 | |
SchedulerConfigLoader
¶
Loader for scheduler YAML/CONFIG files.
Parses files following the scheduler schema:
scheduler:
runner_type: "JobLibRunner"
parameters:
n_jobs: 4
Notes
Use SchedulerConfigLoader.load() to load from a file path or
SchedulerConfigLoader.from_dict() to construct from an in-memory dictionary.
Source code in src/aid2e/utilities/configurations/scheduler_config.py
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 | |
from_dict(scheduler_payload, base_dir=None)
staticmethod
¶
Construct SchedulerConfiguration from an inner scheduler mapping.
Source code in src/aid2e/utilities/configurations/scheduler_config.py
192 193 194 195 196 197 198 199 200 201 | |
load(file_path)
staticmethod
¶
Load a scheduler configuration from a YAML file.
Source code in src/aid2e/utilities/configurations/scheduler_config.py
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | |
SchedulerConfiguration
¶
Bases: BaseModel
Complete scheduler/runner configuration.
Specifies which scheduler backend to use and its parameters. Runner-specific configuration is validated via the scheduler registry.
Attributes:
| Name | Type | Description |
|---|---|---|
runner_type |
Literal['JobLibRunner', 'SlurmRunner', 'PanDAiDDSRunner']
|
Type of runner/scheduler to use (JobLibRunner, SlurmRunner, PanDAiDDSRunner). |
parameters |
Dict[str, Any]
|
Runner-specific parameters as free-form dict. |
max_retries |
int
|
Global maximum retries for failed jobs. |
output_location |
str
|
Base directory for scheduler output files. |
monitor_interval |
int
|
Monitoring interval in seconds for job status checks. |
Example
config = SchedulerConfiguration( ... runner_type="JobLibRunner", ... parameters={"n_jobs": -1, "backend": "threading"}, ... output_location="./output" ... )
Source code in src/aid2e/utilities/configurations/scheduler_config.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | |
parse_runner_params()
¶
Parse and validate runner-specific parameters via registry.
Looks up the registered config model for this runner_type and validates the parameters dict against it.
Returns:
| Type | Description |
|---|---|
Optional[BaseModel]
|
Validated runner-specific config model instance, or None if |
Optional[BaseModel]
|
runner type not found in registry. |
Raises:
| Type | Description |
|---|---|
ValidationError
|
If parameters don't match the runner's schema. |
Example
config = SchedulerConfiguration( ... runner_type="JobLibRunner", ... parameters={"n_jobs": 4} ... ) joblib_config = config.parse_runner_params() joblib_config.n_jobs 4
Source code in src/aid2e/utilities/configurations/scheduler_config.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | |
ScriptObjective
¶
Bases: BaseModel
Objective computed via external script.
Attributes:
path: Path to executable script (resolved relative to config directory).
output_file: Expected output file pattern (e.g., "objectives_*.json").
The script should create a file matching this pattern containing
the objective value in JSON/YAML format.
timeout_sec: Timeout in seconds (optional, default: 300).
Example:
>>> script = ScriptObjective(
... path="scripts/dtlz2_problem.py",
... output_file="objectives_{job_id}.json"
... )
Notes
Scripts receive the design-point and output paths through
--design_params_file / --output_file and the corresponding
AID2E_PARAMS_FILE / AID2E_OUTPUT_FILE environment variables.
Source code in src/aid2e/utilities/configurations/objectives.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | |
StackBranchDefinition
¶
Bases: BranchDefinition
Definition of a workflow branch narrowed to stages from an experimental software stack.
Source code in src/aid2e/utilities/configurations/experimental_stack_config.py
123 124 125 126 127 128 | |
StackJobDefinition
¶
Bases: JobDefinition
Extends the base JobDefinition with a list of stack layers to utilize built-in commands of an experimental stack.
Extensions
script: Name of driver script to generate layers: Layer configurations to run in this job
Source code in src/aid2e/utilities/configurations/experimental_stack_config.py
99 100 101 102 103 104 105 106 107 108 109 110 111 | |
StackLayerConfig
¶
Bases: BaseModel
Configures layer of an experimental stack
A job may consist of 1 or many layers from an experimental software stack. Sanitizes provided data to make sure singular vs. plural inputs/outputs are handled consistently.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
Optional[str]
|
Unique name for this layer instance |
layer |
str
|
Layer key (e.g. "sim", "rec", "ana") |
inputs |
List[str]
|
List of inputs to layer |
outputs |
List[str]
|
List of outputs from layer |
arguments |
Optional[List[str]]
|
Optional list of any additional arguments to apply |
command |
Optional[str]
|
Optional command to be run. Can be used to override default of layer. |
rule |
Optional[str]
|
Optional recipe for combining inputs, outputs, arguments, and command. Can be used to override default of layer. |
Notes
- rule supports template substitutions for {inputs}, {outputs}, {arguments}, and {command}. See StackLayer for more details.
Source code in src/aid2e/utilities/configurations/experimental_stack_config.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | |
handle_input_variants(data)
classmethod
¶
Handles cases where (1) 'input' vs. 'inputs' was used in key, and (2) only 1 string was provided.
Source code in src/aid2e/utilities/configurations/experimental_stack_config.py
80 81 82 83 84 85 86 87 | |
handle_output_variants(data)
classmethod
¶
Handles cases where (1) 'output' vs. 'outputs' was used in key, and (2) only 1 string was provided.
Source code in src/aid2e/utilities/configurations/experimental_stack_config.py
89 90 91 92 93 94 95 96 | |
pluralize_strings(data, singular, plural)
classmethod
¶
Pluralize strings in data
Sanitize input by data by ensuring that 'singular' keys are always 'plural' and that their values are wrapped in lists.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
the to be sanitized |
required | |
singular
|
the singular case of the key (e.g. 'input') |
required | |
plural
|
the plural case of the key (e.g. 'inputs') |
required |
Returns:
| Type | Description |
|---|---|
|
Sanitized data |
Source code in src/aid2e/utilities/configurations/experimental_stack_config.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | |
StackRegistry
¶
Unified registry for experimental stack configuration models + interfaces
Source code in src/aid2e/utilities/configurations/stack_registry.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | |
get_design_config(name)
classmethod
¶
Get the design config model for a stack.
Source code in src/aid2e/utilities/configurations/stack_registry.py
60 61 62 63 64 65 | |
get_design_loader(name)
classmethod
¶
Get the design config loader for a stack.
Source code in src/aid2e/utilities/configurations/stack_registry.py
67 68 69 70 71 72 | |
get_env_config(name)
classmethod
¶
Get the environment config model for a stack.
Source code in src/aid2e/utilities/configurations/stack_registry.py
46 47 48 49 50 51 | |
get_env_loader(name)
classmethod
¶
Get the environment config loader for a stack.
Source code in src/aid2e/utilities/configurations/stack_registry.py
53 54 55 56 57 58 | |
get_experimental_stack(name)
classmethod
¶
Get the stack implementation class for a stack name.
Source code in src/aid2e/utilities/configurations/stack_registry.py
81 82 83 84 85 86 | |
get_workflow_config(name)
classmethod
¶
Get the workflow config model for a stack.
Source code in src/aid2e/utilities/configurations/stack_registry.py
74 75 76 77 78 79 | |
register_stack(name, env_config, env_loader, design_config, design_loader, workflow_config, experimental_stack, problem_config=None)
classmethod
¶
Register a stack type and its configuration/implementation pair.
Source code in src/aid2e/utilities/configurations/stack_registry.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | |
StackStageDefinition
¶
Bases: StageDefinition
Definition of a workflow stage narrowed to jobs from an experimental software stack.
Source code in src/aid2e/utilities/configurations/experimental_stack_config.py
114 115 116 117 118 119 120 | |
StackWorkflowDefinition
¶
Bases: WorkflowDefinition
Definition of an experimental software stack workflow.
Source code in src/aid2e/utilities/configurations/experimental_stack_config.py
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | |
get_implicit_branch()
¶
Get or create single implicit branch if branches list is empty. Overrides WorkflowDefinition.get_implicit_branch to return StackBranchDefinition.
Source code in src/aid2e/utilities/configurations/experimental_stack_config.py
140 141 142 143 144 145 146 147 148 | |
StackWorkflowsConfiguration
¶
Bases: WorkflowsConfiguration
Container for software stack workflows.
Source code in src/aid2e/utilities/configurations/experimental_stack_config.py
151 152 153 154 155 156 157 | |
StageDefinition
¶
Bases: BaseModel
Stage/layer definition with jobs and scheduler.
A stage is a logical step group where multiple jobs run in parallel (fan-out), then their outputs feed into downstream stages (fan-in).
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Stage name (e.g., "evaluate", "aggregate"). |
jobs |
List[JobDefinition]
|
Job definitions to execute (usually one template, expanded via job_factory). |
job_factory |
Optional[JobFactory]
|
Optional factory for expanding jobs (e.g., N parallel evals). |
scheduler |
Optional[SchedulerConfiguration]
|
Stage-level scheduler (optional, inherits global if not set). |
parallelism |
ParallelismPolicy
|
Parallelism policy for this stage. |
outputs |
List[ArtifactSpec]
|
Output artifact specs produced by this stage. |
objective_plan |
Optional[ObjectivePlanSpec]
|
Optional plan that computes or collects objective values after stage jobs complete. |
Example
stage = StageDefinition( ... name="evaluate", ... jobs=[ ... JobDefinition( ... name="dtlz2_evaluate", ... command="python scripts/dtlz2_problem.py", ... payload={...}, ... outputs=[ArtifactSpec(path="objectives_.json", format="json")] ... ) ... ], ... job_factory=JobFactory(type="range", params={"n": 4}), ... parallelism=ParallelismPolicy(max_concurrent=4, retry_max=2), ... outputs=[ArtifactSpec(path="objectives_.json", format="json")] ... )
Notes
- job_factory expands the first job in jobs list to N parallel jobs
- scheduler overrides global scheduler (from WorkflowsConfiguration)
- outputs are collected after all jobs complete
Source code in src/aid2e/utilities/configurations/workflow_config.py
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 | |
StepPlanSpec
¶
Bases: BaseModel
DAG-style step plan for an objective.
Replaces the earlier "branch" terminology with a clearer "steps" concept. A step plan is a small DAG of stages where exactly one stage must produce the objective value.
Attributes:
| Name | Type | Description |
|---|---|---|
stages |
List[StepStage]
|
Ordered list of stage definitions. Dependencies define the DAG. |
produces_from_stage |
Optional[str]
|
Optional explicit producing stage name. If omitted,
exactly one stage must set |
Source code in src/aid2e/utilities/configurations/objectives.py
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 | |
producing_stage()
¶
Return the name of the stage that emits the objective value.
Source code in src/aid2e/utilities/configurations/objectives.py
206 207 208 209 210 | |
validate_stages()
¶
Ensure unique names, valid dependencies, and single producer.
Source code in src/aid2e/utilities/configurations/objectives.py
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 | |
StepStage
¶
Bases: BaseModel
Single stage within an objective step plan.
Each stage executes either a script or an inline function, can declare inputs/outputs/extra_args, and may depend on upstream stages. If a plan has only one step, it is represented as a single-element step list.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Unique stage identifier. |
description |
Optional[str]
|
Optional human-readable description of the stage intent. |
script |
Optional[ScriptObjective]
|
Script-based execution for this stage (mutually exclusive with inline). |
inline |
Optional[InlineObjective]
|
Inline Python callable for this stage (mutually exclusive with script). |
inputs |
Dict[str, Any]
|
Optional input bindings for this stage (free-form mapping). |
outputs |
Dict[str, Any]
|
Optional output bindings for this stage (free-form mapping). |
extra_args |
Dict[str, Any]
|
Additional args/metadata for the stage executor. |
produces_objective |
bool
|
Whether this stage emits the objective value. |
depends_on |
List[str]
|
Names of upstream stages this stage depends on. |
Source code in src/aid2e/utilities/configurations/objectives.py
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | |
validate_action()
¶
Ensure stage has a valid execution definition.
A stage must choose exactly one execution method: script or inline.
Source code in src/aid2e/utilities/configurations/objectives.py
131 132 133 134 135 136 137 138 139 140 141 142 143 | |
validate_dependencies(depends_on, info)
classmethod
¶
Ensure stages do not depend on themselves.
Source code in src/aid2e/utilities/configurations/objectives.py
145 146 147 148 149 150 151 152 153 154 | |
WorkflowDefinition
¶
Bases: BaseModel
Workflow definition with branches, objectives, and scheduler defaults.
A workflow is an end-to-end evaluation unit (e.g., one design point evaluation). It consists of optional branches, each with multiple stages, and defines the objectives to compute from the outputs.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Workflow name (e.g., "dtlz2_eval"). |
description |
Optional[str]
|
Optional description. |
branches |
List[BranchDefinition]
|
Workflow branches (optional, defaults to single implicit branch if missing). |
objectives |
List[ObjectiveDefinition]
|
Objectives to compute (reuses ObjectiveDefinition). |
combined_objectives |
List[CombinedObjectivePlan]
|
Optional combined plans emitting multiple metrics in one run. |
scheduler |
Optional[SchedulerConfiguration]
|
Workflow-level scheduler default (used if branch/stage unset). |
Notes
- If branches is empty, executor creates single implicit branch
- Objectives are unified model (ObjectiveDefinition) for consistency
Source code in src/aid2e/utilities/configurations/workflow_config.py
241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 | |
get_implicit_branch()
¶
Get or create single implicit branch if branches list is empty.
Returns:
| Type | Description |
|---|---|
BranchDefinition
|
Single implicit branch if branches is empty, else raises error. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If branches list is not empty. |
Source code in src/aid2e/utilities/configurations/workflow_config.py
280 281 282 283 284 285 286 287 288 289 290 291 | |
WorkflowsConfiguration
¶
Bases: BaseModel
Top-level workflows configuration.
Container for multiple independent workflows (e.g., one per objective in a holistic optimization). Each workflow can have its own stages, scheduler, and objective specs.
Attributes:
| Name | Type | Description |
|---|---|---|
workflows |
List[WorkflowDefinition]
|
List of independent workflows. |
global_scheduler |
Optional[SchedulerConfiguration]
|
Default scheduler for all stages (can be overridden per-stage). |
Example
config = WorkflowsConfiguration( ... workflows=[ ... WorkflowDefinition(name="dtlz2_eval", ...), ... WorkflowDefinition(name="physics_sim", ...) ... ], ... global_scheduler=SchedulerConfiguration( ... runner_type="JobLibRunner", ... joblib=JobLibRunnerConfig(n_jobs=-1) ... ) ... )
Notes
- global_scheduler is inherited by all stages unless overridden
- workflows list must be non-empty
- Useful for Option B: multiple independent workflows per objective
Source code in src/aid2e/utilities/configurations/workflow_config.py
294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 | |
validate_unique_workflow_names(workflows)
classmethod
¶
Ensure all workflow names are unique.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workflows
|
List[WorkflowDefinition]
|
List of workflow definitions. |
required |
Returns:
| Type | Description |
|---|---|
List[WorkflowDefinition]
|
Same list if valid. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If duplicate workflow names found. |
Source code in src/aid2e/utilities/configurations/workflow_config.py
328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 | |
create_scheduler_context(objective_scheduler=None, workflow_scheduler=None, branch_scheduler=None, stage_scheduler=None, global_scheduler=None)
¶
Create a context dictionary with scheduler information for logging/debugging.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
objective_scheduler
|
Optional[SchedulerConfiguration]
|
Reserved; objective-level scheduler execution is not supported |
None
|
workflow_scheduler
|
Optional[SchedulerConfiguration]
|
Scheduler at workflow level |
None
|
branch_scheduler
|
Optional[SchedulerConfiguration]
|
Scheduler at branch level |
None
|
stage_scheduler
|
Optional[SchedulerConfiguration]
|
Scheduler at stage level |
None
|
global_scheduler
|
Optional[SchedulerConfiguration]
|
Global scheduler |
None
|
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dictionary with scheduler cascade information for each level |
Example
context = create_scheduler_context( ... workflow_scheduler=SchedulerConfiguration(...), ... branch_scheduler=SchedulerConfiguration(...), ... ) print(context["effective_scheduler"]) # Will show the effective one
Source code in src/aid2e/utilities/configurations/scheduler_cascade.py
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | |
get(name)
¶
Retrieve a registered runner config model by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Runner type identifier. |
required |
Returns:
| Type | Description |
|---|---|
Optional[Type[BaseModel]]
|
The registered Pydantic model class, or None if not registered. |
Source code in src/aid2e/utilities/configurations/scheduler_registry.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | |
list_registered()
¶
Get all registered runner config models.
Returns:
| Type | Description |
|---|---|
Dict[str, Type[BaseModel]]
|
Dict mapping runner type names to Pydantic config classes. |
Source code in src/aid2e/utilities/configurations/scheduler_registry.py
54 55 56 57 58 59 60 61 62 63 64 65 66 | |
load_config(config_file)
¶
Load complete configuration from a YAML file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config_file
|
str
|
Path to YAML configuration file |
required |
Returns:
| Type | Description |
|---|---|
FullConfig
|
FullConfig object with all configurations loaded |
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
If config file doesn't exist |
ValueError
|
If configuration is invalid |
Source code in src/aid2e/utilities/configurations/full_config.py
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | |
load_optimizer_config(config_file)
¶
Load only the optimizer section from a full config file.
Source code in src/aid2e/utilities/configurations/loaders.py
65 66 67 68 | |
load_problem_config(config_file)
¶
Load only the problem section from a full config file.
Source code in src/aid2e/utilities/configurations/loaders.py
59 60 61 62 | |
load_raw_config(config_file)
¶
Load raw YAML/JSON configuration content from disk.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config_file
|
str
|
Path to YAML or JSON config. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Raw top-level configuration dictionary. |
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
If the config file does not exist. |
ValueError
|
If the extension is unsupported. |
Source code in src/aid2e/utilities/configurations/loaders.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | |
load_scheduler_config(config_file)
¶
Load only the scheduler section from a full config file.
Accepts only canonical scheduler payloads with parameters.
Source code in src/aid2e/utilities/configurations/loaders.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | |
load_workflow_config(config_file)
¶
Load workflow configuration from full config if present.
Accepted layout
workflows: {workflows: [...]}
Source code in src/aid2e/utilities/configurations/loaders.py
89 90 91 92 93 94 95 96 | |
register(name, model)
¶
Register a Pydantic model for a scheduler runner type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Runner type identifier (e.g., "JobLibRunner", "SlurmRunner", "PanDAiDDSRunner"). |
required |
model
|
Type[BaseModel]
|
Pydantic model class that validates runner-specific params. |
required |
Source code in src/aid2e/utilities/configurations/scheduler_registry.py
25 26 27 28 29 30 31 32 33 | |
resolve_scheduler_cascade(stage_scheduler=None, branch_scheduler=None, workflow_scheduler=None, objective_scheduler=None, global_scheduler=None)
¶
Resolve the effective scheduler configuration using cascade precedence.
Cascade order (highest to lowest priority): 1. Stage-level scheduler (stage override) 2. Branch-level scheduler (branch default) 3. Workflow-level scheduler (workflow default) 4. Global scheduler (global default)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stage_scheduler
|
Optional[SchedulerConfiguration]
|
Scheduler at stage level (highest priority) |
None
|
branch_scheduler
|
Optional[SchedulerConfiguration]
|
Scheduler at branch level |
None
|
workflow_scheduler
|
Optional[SchedulerConfiguration]
|
Scheduler at workflow level |
None
|
objective_scheduler
|
Optional[SchedulerConfiguration]
|
Reserved. Objective-level scheduler execution is not supported; scheduled objective work should be modeled as workflow stages. |
None
|
global_scheduler
|
Optional[SchedulerConfiguration]
|
Global scheduler (lowest priority) |
None
|
Returns:
| Type | Description |
|---|---|
Optional[SchedulerConfiguration]
|
The first non-None scheduler in the cascade, or None if all are None |
Example
stage_sched = SchedulerConfiguration(runner_type="SlurmRunner", parameters={}) branch_sched = SchedulerConfiguration(runner_type="JobLibRunner", parameters={}) effective = resolve_scheduler_cascade(stage_sched, branch_sched) assert effective == stage_sched # Stage overrides branch
effective = resolve_scheduler_cascade(None, branch_sched) assert effective == branch_sched # Branch used if stage is None
Source code in src/aid2e/utilities/configurations/scheduler_cascade.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | |
ePIC-specific utilities for AID2E Framework.
EpicAnaLayer
dataclass
¶
Bases: AnaLayer
Analysis layer of ePIC stack
Source code in src/aid2e/utilities/epic_utils/epic_stack.py
133 134 135 | |
EpicBranchDefinition
¶
Bases: StackBranchDefinition
Definition of an ePIC branch in a workflow. Stages are restricted to ePIC stages.
Source code in src/aid2e/utilities/epic_utils/epic_stack_config.py
45 46 47 48 49 50 | |
EpicDesignConfig
¶
Bases: DesignConfig
ePIC-specific design configuration with XML integration. Extends DesignConfig with XML modification capabilities and optimization groups.
Note: Uses 'epic_design_parameters' instead of 'design_parameters' to distinguish from generic configs in YAML files.
Source code in src/aid2e/utilities/epic_utils/epic_design_config.py
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | |
get_file_paths()
¶
Get all unique file paths referenced in the configuration.
Source code in src/aid2e/utilities/epic_utils/epic_design_config.py
140 141 142 143 144 145 | |
get_flat_parameters()
¶
Returns a flat dictionary of all parameters keyed by their qualified name.
Source code in src/aid2e/utilities/epic_utils/epic_design_config.py
91 92 93 94 95 96 97 | |
get_parameter_names()
¶
Get all parameter qualified names.
Source code in src/aid2e/utilities/epic_utils/epic_design_config.py
99 100 101 | |
get_xml_modifications(param_values=None)
¶
Get XML modifications for given parameter values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
param_values
|
Optional[Dict[str, float]]
|
Dictionary of qualified parameter names to values. If None, uses default values from config. |
None
|
Returns:
| Type | Description |
|---|---|
Dict[str, List[Tuple[str, str, str, Any]]]
|
Dictionary mapping file_path -> [(xml_path, attribute, unit, new_value), ...] |
Source code in src/aid2e/utilities/epic_utils/epic_design_config.py
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | |
EpicDesignConfigLoader
¶
Bases: DesignConfigLoader
Loader for ePIC design configurations. Can load either from external files or inline YAML blocks. instantiates EpicDesignConfig objects.
Source code in src/aid2e/utilities/epic_utils/epic_design_config.py
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | |
load(file_path=None, design_data=None)
staticmethod
¶
Load an ePIC design configuration.
Source code in src/aid2e/utilities/epic_utils/epic_design_config.py
157 158 159 160 161 162 163 | |
EpicDesignParameters
¶
Bases: RootModel[Dict[str, EpicParameterGroup]]
Collection of ePIC parameter groups.
Source code in src/aid2e/utilities/epic_utils/epic_design_config.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | |
inject_qualified_names(values)
classmethod
¶
Injects full qualified names like 'group.param' into each parameter. This ensures parameters are uniquely identified.
Source code in src/aid2e/utilities/epic_utils/epic_design_config.py
63 64 65 66 67 68 69 70 71 72 73 74 75 | |
EpicEnvConfig
¶
Bases: EnvironmentConfig
ePIC-specific environment configuration.
Manages ePIC detector environment variables including singularity image, installation paths, and EIC reconstruction settings. If both singularity image and EIC shell script paths are provided, defaults to singularity image.
Attributes:
| Name | Type | Description |
|---|---|---|
eic_shell |
Optional[str]
|
Path to the EIC shell script (usually named eic-shell), either this OR singularity_image must be provided |
singularity_image |
Optional[str]
|
Path to the EIC shell singularity image, either this OR eic_shell must be provided |
epic_install |
Optional[str]
|
Optional path to ePIC installation directory, will be used as template for modifying geometry |
epic_config |
Optional[str]
|
ePIC geometry configuration to use (e.g. epic, epic_full) |
geometry_mode |
Optional[str]
|
Geometry activation mode, either build or no_build |
eic_recon_install |
Optional[str]
|
Optional path to EIC reconstruction installation |
eic_recon |
Optional[str]
|
Optional override for EIC reconstruction command |
Source code in src/aid2e/utilities/epic_utils/epic_env_config.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | |
activate()
¶
Activate ePIC environment variables and print a summary.
Source code in src/aid2e/utilities/epic_utils/epic_env_config.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | |
ensure_shell_or_image(data)
classmethod
¶
Ensure that either eic_shell or singularity_image were provided
Source code in src/aid2e/utilities/epic_utils/epic_env_config.py
47 48 49 50 51 52 53 54 55 56 57 | |
EpicEnvConfigLoader
¶
Bases: EnvironmentConfigLoader
Loader for ePIC environment configuration. Loads YAML files, instantiates EpicEnvConfig.
Source code in src/aid2e/utilities/epic_utils/epic_env_config.py
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | |
load(env_data=None, file_path=None)
staticmethod
¶
Load ePIC environment configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
env_data
|
Dict[str, Any]
|
Loaded data stored in a dictionary |
None
|
file_path
|
str
|
Path to YAML configuration file |
None
|
Returns:
| Type | Description |
|---|---|
EpicEnvConfig
|
EpicEnvConfig instance |
Source code in src/aid2e/utilities/epic_utils/epic_env_config.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | |
EpicGeoLayer
dataclass
¶
Bases: StackLayer
Geometry layer of ePIC stack
Source code in src/aid2e/utilities/epic_utils/epic_stack.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | |
EpicJobDefinition
¶
Bases: StackJobDefinition
Definition a job to run 1 or more ePIC stack layers. If no command provided, will set default based on specified evaluator_type.
Source code in src/aid2e/utilities/epic_utils/epic_stack_config.py
28 29 30 31 32 33 34 | |
EpicLayerConfig
¶
Bases: StackLayerConfig
Configuration of a layer of ePIC stack
Source code in src/aid2e/utilities/epic_utils/epic_stack_config.py
23 24 25 | |
EpicParameterGroup
¶
Bases: BaseModel
Group of ePIC parameters that share the same XML file.
Source code in src/aid2e/utilities/epic_utils/epic_design_config.py
49 50 51 52 53 54 | |
EpicRecLayer
dataclass
¶
Bases: StackLayer
Reconstruction layer of ePIC stack
Source code in src/aid2e/utilities/epic_utils/epic_stack.py
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | |
EpicSimLayer
dataclass
¶
Bases: StackLayer
Simulation layer of ePIC stack
Source code in src/aid2e/utilities/epic_utils/epic_stack.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | |
EpicStack
dataclass
¶
Bases: ExperimentStack
The ePIC software stack
Source code in src/aid2e/utilities/epic_utils/epic_stack.py
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 | |
make_driver_command(script, **kwargs)
¶
Form command to run ePIC driver script.
Source code in src/aid2e/utilities/epic_utils/epic_stack.py
302 303 304 305 306 307 308 309 310 311 | |
make_driver_script(script, configs, preparations=None, **kwargs)
¶
Create a driver script to run ePIC layers.
Source code in src/aid2e/utilities/epic_utils/epic_stack.py
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 | |
prepare_workflow_geometry(workflow_dir, design_point, problem_config, workflow_id)
¶
Prepare geometry once for the whole workflow/design point. Returns the prepared geometry directory.
Source code in src/aid2e/utilities/epic_utils/epic_stack.py
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | |
EpicStageDefinition
¶
Bases: StackStageDefinition
Definition of an ePIC stage in a workflow. Jobs are restricted to ePIC jobs.
Source code in src/aid2e/utilities/epic_utils/epic_stack_config.py
37 38 39 40 41 42 | |
EpicWorkflowDefinition
¶
Bases: StackWorkflowDefinition
Definition of an ePIC workflow.
Source code in src/aid2e/utilities/epic_utils/epic_stack_config.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | |
get_implicit_branch()
¶
Get or create single implicit branch if branches list is empty. Overrides StackWorkflowDefinition.get_implicit_branch to return EpicBranchDefinition.
Source code in src/aid2e/utilities/epic_utils/epic_stack_config.py
60 61 62 63 64 65 66 67 68 | |
EpicWorkflowsConfiguration
¶
Bases: StackWorkflowsConfiguration
Container for ePIC workflows.
Source code in src/aid2e/utilities/epic_utils/epic_stack_config.py
71 72 73 74 75 | |