Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Status on cloudpickle non-determinism

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

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
30/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
backend

Hướng nghiên cứu

Bắt đầu bằng cách xem xét issue #385 và PR #428, sau đó tái hiện các khác biệt về thứ tự đã được báo cáo bằng pickletools.dis trên một hàm tối thiểu. Issue không cung cấp một test case ngắn hay tệp mã nguồn; công việc được xem là hoàn tất khi đã xác lập quan điểm chính thức của dự án về pickle xác định và ghi lại một cách giải quyết rõ ràng cho hành vi của cloudpickle 2.0.0.

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

Mô tả

pickle issue

Hello,

@ogrisel mentioned in this comment (https://github.com/cloudpipe/cloudpickle/issues/385#issuecomment-661103789):

Anyway, having deterministic pickles is probably out of scope for cloudpickle so I would be in favor of closing this issue.

However, @ogrisel also pushed a PR (#428) which was released as part of cloudpickle 2.0.0 that tried to address non determinism owing to dictionary ordering.

I wanted to confirm what is the official status of the project regarding non determinism because I am still seeing non deterministic pickles in cloudpickle 2.0.0

Here is the pickletools.dis outputs of a function:

...
 2539: (                MARK  
 2540: \x8c                 SHORT_BINUNICODE 'correlation_matrix'                                                                           
 2560: \x94                 MEMOIZE    (as 115)
 2561: \x8c                 SHORT_BINUNICODE 'drifts_annual'                                                                                
 2576: \x94                 MEMOIZE    (as 116)
 2577: \x8c                 SHORT_BINUNICODE 'initial_prices'                                                                               
 2593: \x94                 MEMOIZE    (as 117)                                                                                             
 2594: \x8c                 SHORT_BINUNICODE 'volatilities_annual'                                                                          
 2615: \x94                 MEMOIZE    (as 118)                                                                                             
 2616: \x91                 FROZENSET  (MARK at 2539)
 2617: \x94             MEMOIZE    (as 119)  
...

pickle of a function on second attempt:

...
 2539: (                MARK  
 2540: \x8c                 SHORT_BINUNICODE 'volatilities_annual'                                                                          
 2561: \x94                 MEMOIZE    (as 115)
 2562: \x8c                 SHORT_BINUNICODE 'initial_prices'                                                                               
 2578: \x94                 MEMOIZE    (as 116)
 2579: \x8c                 SHORT_BINUNICODE 'drifts_annual'
 2594: \x94                 MEMOIZE    (as 117)                                                                                             
 2595: \x8c                 SHORT_BINUNICODE 'correlation_matrix'
 2615: \x94                 MEMOIZE    (as 118)                                                                                             
 2616: \x91                 FROZENSET  (MARK at 2539)
 2617: \x94             MEMOIZE    (as 119)
...       

As you can see, the entries are all the same, but shuffled around.

This function is part of a large project, so unfortunately I can't produce a short test case right now.

Notice that kubeflow pipelines implement caching by making sure that pickle of the function hasn't changed. (there is an option to not use pickle as well, but it has its own problems). Having a non deterministic cloudpickle invalidates the cache every time making that feature useless.

Thanks.

Ngôn ngữ chính
Python
Star
1.9k
Fork
197
Merge trung bình
1 ngày 10 giờ
Pull request đã merge (30 ngày)
1

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

Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 cloudpipe/cloudpickle

Tất cả issue của cloudpipe/cloudpickle

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.