Skip to content

perf(julia_helpers): convert lists with PythonCall.pyconvert - #1425

Open
MilesCranmerBot wants to merge 1 commit into
astroautomata:masterfrom
MilesCranmerBot:perf/pyconvert-lists
Open

MilesCranmerBot wants to merge 1 commit into
astroautomata:masterfrom
MilesCranmerBot:perf/pyconvert-lists

Conversation

@MilesCranmerBot

@MilesCranmerBot MilesCranmerBot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

jl_array converted lists with juliacall.convert, which builds a new Julia closure in every Python session, so every fresh process compiled it during the first fit (0.2 s). PythonCall.pyconvert is an ordinary function, which astroautomata/SymbolicRegression.jl#768 precompiles. The resulting arrays are the same.

With #768, on a 12-core node with Julia 1.13 (median of 5 fresh processes, measured to the end of the first fit):

workload PySR 2.7.0 this PR + #768
PySRRegressor(niterations=1) 7.72 s 6.06 s
README example 11.24 s 9.81 s

Fixed-seed halls of fame are byte-identical. test_main.py and test_startup.py: 205 passed, 1 skipped.

…nvert

juliacall.convert evaluates a new closure on first use, which Julia compiles at runtime; PythonCall.pyconvert can be precompiled.

Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-11T10:55:43.272284Z eaff308 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codecov

codecov Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

This branch has not been deployed

No deployments
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.

1 participant