cmdstanpy 1.0.2 potentially logging warnings too often?
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
- 25/100
Hướng nghiên cứu
Bắt đầu bằng cách chạy bản tái hiện Prophet được cung cấp với cmdstanpy 1.0.2, sau đó so sánh hành vi cảnh báo của nó với 1.0.1. Theo dõi cách các chẩn đoán lấy mẫu và lỗi Stan không nghiêm trọng được báo cáo; công việc được hoàn tất khi xác định được liệu các ngưỡng và cảnh báo lặp lại có phù hợp hay không, đồng thời xác định hành vi ожида kiến.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
I'm wondering if this change in 1.0.2:
CmdStanPy now computes some diagnostics after running HMC and will warn you about post-warmup divergences and treedepth exceptions
leads to unnecessary warnings.
Description:
After running an MCMC, this is the output of .diagnose():
Processing csv files: /var/folders/3x/ypx818511wsdnxc3knn7yy1r0000gn/T/tmpj9urc8se/prophet_modela2q2ppg4/prophet_model-20220629231921_1.csv, /var/folders/3x/ypx818511wsdnxc3knn7yy1r0000gn/T/tmpj9urc8se/prophet_modela2q2ppg4/prophet_model-20220629231921_2.csv, /var/folders/3x/ypx818511wsdnxc3knn7yy1r0000gn/T/tmpj9urc8se/prophet_modela2q2ppg4/prophet_model-20220629231921_3.csv, /var/folders/3x/ypx818511wsdnxc3knn7yy1r0000gn/T/tmpj9urc8se/prophet_modela2q2ppg4/prophet_model-20220629231921_4.csv
Checking sampler transitions treedepth.
21 of 600 (3.5%) transitions hit the maximum treedepth limit of 10, or 2^10 leapfrog steps.
Trajectories that are prematurely terminated due to this limit will result in slow exploration.
For optimal performance, increase this limit.
Checking sampler transitions for divergences.
No divergent transitions found.
Checking E-BFMI - sampler transitions HMC potential energy.
E-BFMI satisfactory for all transitions.
Effective sample size satisfactory.
Split R-hat values satisfactory all parameters.
Processing complete.
Overall it seems like the sampling was successful. However:
cmdstanpylogged a warning at the end of the sampling:
23:23:47 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 1 had 5 iterations at max treedepth (3.3%)
Chain 2 had 1 iterations at max treedepth (0.7%)
Chain 3 had 13 iterations at max treedepth (8.7%)
Chain 4 had 2 iterations at max treedepth (1.3%)
I'm wondering what the thresholds are for logging the non-convergence warning and whether they're too loose?
- I also get these warnings, although they might be specific to the model we're running with Prophet:
23:23:47 - cmdstanpy - WARNING - Non-fatal error during sampling:
Exception: normal_id_glm_lpdf: Scale vector is 0, but must be positive finite! (in '/Users/runner/work/prophet/prophet/python/stan/prophet.stan', line 137, column 2 to line 142, column 4)
Exception: normal_id_glm_lpdf: Scale vector is 0, but must be positive finite! (in '/Users/runner/work/prophet/prophet/python/stan/prophet.stan', line 137, column 2 to line 142, column 4)
Exception: normal_id_glm_lpdf: Matrix of independent variables is inf, but must be finite! (in '/Users/runner/work/prophet/prophet/python/stan/prophet.stan', line 137, column 2 to line 142, column 4)
It seems to be related to a type check of the stan program? I see this warning every time we do MCMC sampling now, even if overall the sampling procedure has no issues. Not sure where it's coming from -- ideally if it doesn't cause any sampling issues we wouldn't show it (in my opinion), but keen to get your thoughts.
In cmdstanpy==1.0.1, neither of these warnings were raised.
Thank you!!!
To reproduce, in case you need to:
from prophet import Prophet
import pandas as pd
df = pd.read_csv('https://raw.githubusercontent.com/tcuongd/prophet/tcuongd-covid-notebook/examples/example_pedestrians.csv')
m = Prophet(mcmc_samples=300)
m.fit(df, show_progress=False)
Current Version:
cmdstanpy==1.0.2
- Ngôn ngữ chính
- Python
- Star
- 198
- Fork
- 81
- Merge trung bình
- 6 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 1
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của stan-dev/cmdstanpy
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Release 2.0 Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
-
feature
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
-
feature method outputs
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Tất cả issue của stan-dev/cmdstanpy
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
-
hcocena Đang mởpolicies-accepted pre-review precheck-passed
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Bioconductor/BiocContributions#214 · 5 bình luận ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
TencentCloud/Octop#1169 · 1 bình luận ·
-
[开源推荐] 在老板拷问你之前,先让 AI 灵魂拷问你 Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
521xueweihan/HelloGitHub#3778 ·
-
The version checker's trailing attribute region has no control for a less-than inside a quoted value Đang mởarea: dashboard area: tests bug perceived difficulty: 2 python
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Nitjsefnie-Harness-Commons/daedalus#1105 · 1 bình luận ·