Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EPIC] Refactor ra2ce to replace runners with orchestrators. #662

Open
Carsopre opened this issue Dec 13, 2024 · 0 comments
Open

[EPIC] Refactor ra2ce to replace runners with orchestrators. #662

Carsopre opened this issue Dec 13, 2024 · 0 comments
Labels
enhancement New feature or request triage required Issues without priority assessment or milestone.

Comments

@Carsopre
Copy link
Collaborator

Kind of request

Changing existing functionality

Enhancement Description

  • Refactor the existing logic as to replace the runners with orchestrators, adapting all affected logic.
  • Apply the corresponding protocol / base class to the existing analyses according to the agreed dataclass diagram.
  • Update documentation.
  • Exemplify via jupyter notebooks (technical one) how to use the new orchestrators as well as the base analyses.

Use case

Thanks to the adaptation feature and the upcoming uncertainty one we have learnt that ra2ce workflows do not necessarily follow the same "path".
For this reason we envision the distinction between two types of "analyses":

  • AnalysisBase (or BasicAnalysis, in fact "foundation" analyses), this reflects the nature of single domain analyses such as Damages or Losses, which are run independently one from the other, although we do not foresee the addition of more analyses of this type, this distinction will make room for them.
    • In addition, these analyses can use an "optional" distinct analysis called PartialAnalysis, this identifies an analysis whose results do not necessarily need to be transformed into an AnalysisResult, giving more freedom and potentially lighting up computation and memory usage for ra2ce.
  • OrchestratorBase, in fact replacing the functionality of the runners. An orchestrator is responsible to decide how one or many analyses (regardless of their types) will be run. We foresee analyses such as Adaptation or Uncertainty implementing this type as they will be running in no precise order an undetermined amount of AnalysisBase analyses. In addition, the DamagesAnalysisRunner and LossesAnalysisRunner will be replaced with explicit orchestrators, if in the future we require to run all damages or losses analyses we can create a new orchestrator to do so. These orchestrators can be called directly by a user when "sandboxing" as well as through the runners factory (with its corresponding orchestrator name).

The proposed new class diagram:
Image

Additional Context

Follow-up issue of #602 discussed on 12/12/2024 with @MatthiasHauthDeltares and @ArdtK .
This issue is still subject to changes.

@Carsopre Carsopre added enhancement New feature or request triage required Issues without priority assessment or milestone. labels Dec 13, 2024
@Carsopre Carsopre changed the title Refactor ra2ce to replace runners with orchestrators. [EPIC] Refactor ra2ce to replace runners with orchestrators. Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage required Issues without priority assessment or milestone.
Projects
None yet
Development

No branches or pull requests

1 participant