Test full parallel MonteCarlo determinism under spawn and forkserver, not only seed derivation

Đang mở
#1,076 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 3 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
python
Lĩnh vực
testing-qa

Hướng nghiên cứu

Start by locating test_seed_derivation_is_start_method_invariant and the existing end-to-end serial == parallel(n) test mentioned in the issue. Read how that test stubs Flight and skips non-fork methods, then run it before changing the setup. Done means a short real simulate() test passes under spawn and forkserver and confirms identical inputs per index, no gaps or duplicates, and an empty error file.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Context

#1054 added test_seed_derivation_is_start_method_invariant, which checks that the per-index seed a worker derives matches the main process under fork, spawn and forkserver. It runs in ordinary CI on all three start methods, which covers the seeding math, but it deliberately exercises only the pure derivation helpers, not a real simulate().

The gap

The end-to-end serial == parallel(n) test still stubs the module-level Flight and skips unless the start method is fork, because the stub reaches workers only through fork inheritance. So the full production path (the real multiprocess pool, __sim_producer, the manager, bound-method pickling, the stochastic object graph, the file writes) is only verified under fork. Python 3.14 made forkserver the POSIX default, and Windows and macOS use spawn, so fork is no longer the default anywhere. The untested modes are the ones most users will actually hit.

A possible direction

Give the worker-invariance test a picklable, top-level flight factory (or a very small real Flight) instead of a module-level monkeypatch, so it can run a short simulate(parallel=True) under spawn and forkserver and assert that serial and parallel produce identical inputs per index, with no gaps or duplicates and an empty error file.

Follow-up to the review discussion on #1054.

Ngôn ngữ chính
Python
Star
1.1k
Fork
280
Merge trung bình
3 ngày 2 giờ
Pull request đã merge (30 ngày)
24

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của RocketPy-Team/RocketPy

Tất cả issue của RocketPy-Team/RocketPy

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.