Skip to content

DRAFT: run EpiAutoGP direct from juliacall#1068

Draft
SamuelBrand1 wants to merge 2 commits into
mainfrom
897-epiautogp-py-wrapper
Draft

DRAFT: run EpiAutoGP direct from juliacall#1068
SamuelBrand1 wants to merge 2 commits into
mainfrom
897-epiautogp-py-wrapper

Conversation

@SamuelBrand1
Copy link
Copy Markdown
Collaborator

@SamuelBrand1 SamuelBrand1 commented May 13, 2026

This is a draft/WIP PR for trying a maximalist approach to resolving #897 .

In this design, we can remove all the .jl files and rely on https://github.com/JuliaPy/pyjuliapkg for julia deps and run a minimal version of model directly using juliacall.

This means that the input/output is handled by python, and the actually forecasting code reduces the the string JULIA_HELPER_CODE. This could be a cleaner way of interfacing to NowcastAutoGP assuming that prod bugs don't surface in implementation checks.

NB: I haven't removed all the julia files in this draft yet. This is really a design example for @sbidari @dylanhmorris @damonbayer to consider.

Note that only surfaced pain point was some incompat with the dev dep group (see pyproject.toml)

EDIT: there is a second surfaced pain point about config on multithread jointly with python and julia.

@SamuelBrand1 SamuelBrand1 linked an issue May 13, 2026 that may be closed by this pull request
@codecov
Copy link
Copy Markdown

codecov Bot commented May 13, 2026

Codecov Report

❌ Patch coverage is 30.24390% with 143 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.06%. Comparing base (cf71ee8) to head (f96ef26).

Files with missing lines Patch % Lines
pipelines/epiautogp/juliacall_runner.py 30.35% 117 Missing ⚠️
...s/tests/test_epiautogp_juliacall_runner_parquet.py 31.42% 24 Missing ⚠️
pipelines/epiautogp/forecast_epiautogp.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1068      +/-   ##
==========================================
- Coverage   59.50%   57.06%   -2.45%     
==========================================
  Files          32       34       +2     
  Lines        2109     2308     +199     
==========================================
+ Hits         1255     1317      +62     
- Misses        854      991     +137     
Flag Coverage Δ
epiautogp 91.78% <ø> (ø)
hewr 76.98% <ø> (ø)
pipelines 51.95% <30.24%> (-2.41%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SamuelBrand1 SamuelBrand1 force-pushed the 897-epiautogp-py-wrapper branch from 1d6453d to f96ef26 Compare May 13, 2026 15:23
@SamuelBrand1
Copy link
Copy Markdown
Collaborator Author

Hmmmm multithreading sounds risky https://juliapy.github.io/PythonCall.jl/stable/juliacall/#py-multi-threading.

I'll leave that here, but I think this approach might be nice to look at but feels too risky. AutoGP relies heavily on multi-threaded.

Comment thread pyproject.toml
Comment on lines +67 to +72
conflicts = [
[
{group = "dev"},
{group = "epiautogp-julia"},
],
]
Copy link
Copy Markdown
Collaborator

@damonbayer damonbayer May 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the conflict? You would certainly want to be able to have all of these deps loaded for local development.

Copy link
Copy Markdown
Collaborator Author

@SamuelBrand1 SamuelBrand1 May 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cfa-dagster[dev] down the dep chain requires dagster-dg-core which requires tomlkit<0.13.3 whereas the juliacall in its dep chain has juliapkg>=0.1.21 which wants tomlkit>=0.13.3

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although I'd quite like to know more about the "bug in this version" comment!

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Rewrite epiautogp as a python wrapper around nowcastautogp

3 participants