Skip to content

Add draft wiki-style plan for PyMC and inversion pipeline refactors#393

Draft
Copilot wants to merge 2 commits into
develfrom
copilot/document-changes-to-pymc-modelling
Draft

Add draft wiki-style plan for PyMC and inversion pipeline refactors#393
Copilot wants to merge 2 commits into
develfrom
copilot/document-changes-to-pymc-modelling

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 17, 2026

This adds a concise planning document for the ongoing PyMC modelling and inversion-pipeline changes, with emphasis on the staged PyMC refactor, basis/output refactor, and how upcoming inner-domain and multi-sector work should fit into that architecture. It is intended as draft wiki content that makes the current state, migration path, and remaining work easy to track.

  • New planning document

    • Adds PYMC_AND_INVERSION_REFACTOR_PLAN.md at the repository root as draft wiki-ready markdown.
    • Summarises the current status of the main refactor tracks and their relationship to adjacent work.
  • PyMC refactor summary

    • Captures the Stage A-E sequence for the #370 workstream.
    • Describes the architectural shift toward:
      • canonical make_inv_inputs(...) datasets,
      • reusable builders/components in openghg_inversions.models,
      • InferenceData as the modern posterior object,
      • explicit legacy compatibility boundaries.
  • Basis/output and pipeline context

    • Summarises the #360 workstream around BasisFunctions, DataTree support, legacy-output reproduction, and fixedbasisMCMC output cleanup.
    • Links that work to the high-resolution inner-region discussion and the recommendation not to extend the legacy path further for that feature.
  • Migration and planning guidance

    • Adds a compact legacy-to-replacement map for the main temporary and compatibility paths.
    • Lists the highest-priority open loops, including:
      • a parallel modern inversion pathway,
      • modern post-processing inputs,
      • operator-backed basis handling,
      • CO2 multi-sector integration,
      • inner-domain alignment with the new abstractions.
  • Cross-reference coverage

    • Pulls together the key umbrella issues, stub issues, the inner-region wiki page, and 2026 PRs by @brendan-m-murphy into one scan-friendly reference page.

Example excerpt from the new document:

| Legacy / temporary concept | Current or intended replacement | Notes |
| --- | --- | --- |
| NumPy-array-first `inferpymc(...)` inputs | dataset-first `inv_inputs` from `make_inv_inputs(...)` | Stage D makes the dataset-first path the main runtime. |
| Legacy trace renaming inside model construction | explicit compatibility renaming in `_rename_trace_for_legacy_inferpymc(...)` | This is the main Stage E clean-up. |

Agent-Logs-Url: https://github.com/openghg/openghg_inversions/sessions/693f8709-71e5-4449-8146-8b12710bd409

Co-authored-by: brendan-m-murphy <11130776+brendan-m-murphy@users.noreply.github.com>
Copilot AI changed the title [WIP] Create documentation for changes to PyMC modelling code Add draft wiki-style plan for PyMC and inversion pipeline refactors Apr 17, 2026
Copilot AI requested a review from brendan-m-murphy April 17, 2026 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document changes to PyMC modelling code

2 participants