Skip to content

feat: add auto parallelism mode#1257

Open
MilesCranmerBot wants to merge 1 commit into
astroautomata:masterfrom
MilesCranmerBot:bot/pysr-1018
Open

feat: add auto parallelism mode#1257
MilesCranmerBot wants to merge 1 commit into
astroautomata:masterfrom
MilesCranmerBot:bot/pysr-1018

Conversation

@MilesCranmerBot

Copy link
Copy Markdown
Contributor

Closes #1018.

Adds parallelism="auto" while keeping the constructor default as None for backward-compatible signatures/get_params behavior. None now resolves like auto:

  • deterministic=True -> serial
  • procs or cluster_manager set -> multiprocessing
  • otherwise -> the existing multithreading default

Explicit serial, multithreading, multiprocessing, and deprecated multithreading= behavior are preserved.

Validation:

  • targeted unit test passed: uv run --python /usr/bin/python3.12 --extra dev pytest pysr/test/test_main.py::TestHelpMessages::test_parallelism_auto -q
  • coverage check verified all changed executable/doc lines in pysr/sr.py are covered
  • git diff --check passed
  • ponytail review passed

Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
@MilesCranmer

Copy link
Copy Markdown
Member

@MilesCranmerBot I think this is the wrong location, it should be done in the Julia side. PySR should just forward the parallelism mode but not have any moving pieces. Please close + make a SR.jl PR instead + make a PySR PR to update compatibility with the backend change.

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.

[Feature]: Smart default for parallelism

2 participants