Skip to content

[OptApp] Revamp Independent Analysis Execution Policy - #14678

Open
talhah-ansari wants to merge 3 commits into
masterfrom
optimization/independent_execution_policy
Open

[OptApp] Revamp Independent Analysis Execution Policy#14678
talhah-ansari wants to merge 3 commits into
masterfrom
optimization/independent_execution_policy

Conversation

@talhah-ansari

Copy link
Copy Markdown
Contributor

📝 Description

This PR refactors the IndependentAnalysisExecutionPolicy to support customizable analysis input/output folders, HDF5 output, and value extraction.
A new GetPath method is added to the ExecutionPolicy interface and implemented across all derived execution policies.
A utility context manager for working directory scoping is also added.

🆕 Changelog

  • Added an abstract GetPath method to the ExecutionPolicy base class, requiring all execution policies to expose their execution directory as a Path object. Implemented this method in all subclasses, returning the appropriate path for each (independent_analysis_execution_policy.py, kratos_analysis_execution_policy.py, stepping_analysis_execution_policy.py).
  • Refactored IndependentAnalysisExecutionPolicy to accept and process new settings for input/output folders, project parameters, and HDF5 output, including dynamic path resolution and value extraction from the optimization problem. Added logic to copy input files, write HDF5 files, and instantiate the analysis with the correct parameters.
  • Introduced a WorkFolderScope context manager to temporarily change the working directory and Python path, used for executing analyses in the correct context.
  • Updated tests to cover the new GetPath interface and the enhanced execution policy logic. Added a sample orchestrator_parameters.json file for test use.

@talhah-ansari talhah-ansari self-assigned this Aug 14, 2026
@talhah-ansari talhah-ansari added the Optimization related to OptApp label Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Optimization related to OptApp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant