Phase 1 (OS refactoring) and provides the initial backend architecture for Phase 2 (OG-Core runner)#41
Conversation
10d5753 to
bf87806
Compare
|
Hi, great work getting the foundation laid out for the OG-Core runner! Hooking up the Dask multiprocessing client is a huge step forward for Phase 2. I was reviewing this to see how it integrates with the converging pipeline I am building in PR #24, and I noticed a few items and architectural bottlenecks we should address before merging so we don't block the next phase of development: Integration & Architecture Feedback:Synchronous Execution Timeout: Running Hardcoded Time Horizons: In Dask Client Initialization: Spawning a new Let me know if you want to collaborate on the async/threading implementation! Making sure these I/O boundaries are flexible will make coupling this with the OSeMOSYS outputs much smoother. |
|
Please update the PR body to include a real linked issue if you want this to continue in review. The current text still has placeholder issue fields and no actual linked issue. If there is not already a dedicated issue for this scope, please open one first and then update this PR with a real Closes #... or Related #... reference. |
…d project overview
This introduces the initial OGCoreClass manager to orchestrate baseline and reform model runs via the MUIOGO API, satisfying the Phase 2 roadmap goal of linking OG-Core with OSeMOSYS.
This change maps solver execution paths dynamically to support Windows, Darwin (macOS), and Linux.
bf87806 to
a89d1ed
Compare
Thanks for the review! I'll open a dedicated issue for this scope now and update |
Done — opened #171 for this scope and updated the PR body to reference it. |
Thanks for the detailed review! All three points are valid:
Happy to collaborate on the async implementation! |
|
@suyash469 Awesome, that will make the integration incredibly smooth. Regarding the async execution, you actually don't need to build a new background worker from scratch. Over the weekend, the team extracted the async pipeline into a generic Once PR #146 merges, you can just submit your Exposing |
Summary
What changed:
Refactored hardcoded Windows OS paths in the OsemosysClass solver logic to allow dynamic cross-platform execution supporting Windows, Linux, and macOS (Darwin).
Introduced the
OGCoreClass
runner and OGCoreRoute endpoints into the Flask API. This creates the foundational backend structure necessary for Phase 2 of the OG-CLEWS integration roadmap by enabling the execution of
ogcore
Time Path models via asynchronous multiprocessing.
Why: This PR directly addresses Phase 1 (Cross-Platform Refactoring) and Phase 2 (OG-Core Module) of the UN OICT roadmap. The OS-abstraction allows the community to utilize native solvers on any machine, while the new
OGCoreClass
orchestrator hooks the Python mathematical models correctly into the MUIO Flask app endpoints for future UI coupling.
Related issues
Issue exists and is linked
Closes # 171
Related # 122
Validation
Tests added/updated (or not applicable)
Validation steps documented
Evidence attached (logs/screenshots/output as relevant)
Validation Steps & Evidence:
Ran
app.py
locally and verified endpoints /ogcore/run initialize the Dask multiprocessing client.
Verified if platform.system() == 'Windows' logic gracefully falls back to Linux/Darwin paths for solver lookups.
Documentation
Docs updated in this PR (or not applicable)
Any setup/workflow changes reflected in repo docs
Scope check
No unrelated refactors
Implemented from a feature branch
Change is deliverable without upstream OSeMOSYS/MUIO dependency
Base repo/branch is EAPD-DRB/MUIOGO:main (not upstream)