event-forecast 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- event_forecast-0.1.1/CHANGELOG.md +28 -0
- event_forecast-0.1.1/CITATION.cff +20 -0
- event_forecast-0.1.1/LICENSE +21 -0
- event_forecast-0.1.1/MANIFEST.in +5 -0
- event_forecast-0.1.1/PKG-INFO +148 -0
- event_forecast-0.1.1/README.md +121 -0
- event_forecast-0.1.1/docs/bring-your-own-model.md +43 -0
- event_forecast-0.1.1/docs/extraction-report.md +124 -0
- event_forecast-0.1.1/docs/fixture-provenance.json +48 -0
- event_forecast-0.1.1/docs/implementation-plan.md +55 -0
- event_forecast-0.1.1/docs/parity.md +68 -0
- event_forecast-0.1.1/docs/publishing.md +76 -0
- event_forecast-0.1.1/docs/review-stop.md +61 -0
- event_forecast-0.1.1/docs/three-rules.md +58 -0
- event_forecast-0.1.1/examples/README.md +18 -0
- event_forecast-0.1.1/examples/github_categories/coverage.json +389 -0
- event_forecast-0.1.1/examples/github_categories/events.csv +4811 -0
- event_forecast-0.1.1/examples/github_categories/fetch_manifest.json +551 -0
- event_forecast-0.1.1/examples/github_categories/labels.csv +4811 -0
- event_forecast-0.1.1/examples/github_issues_v1/coverage.json +222 -0
- event_forecast-0.1.1/examples/github_issues_v1/events.csv +3206 -0
- event_forecast-0.1.1/examples/github_issues_v1/fetch_manifest.json +114 -0
- event_forecast-0.1.1/examples/github_level_experiment.json +13 -0
- event_forecast-0.1.1/pyproject.toml +52 -0
- event_forecast-0.1.1/scripts/check_wheel.py +56 -0
- event_forecast-0.1.1/setup.cfg +4 -0
- event_forecast-0.1.1/src/event_forecast/__init__.py +37 -0
- event_forecast-0.1.1/src/event_forecast/_features.py +133 -0
- event_forecast-0.1.1/src/event_forecast/baselines.py +125 -0
- event_forecast-0.1.1/src/event_forecast/catboost_model.py +179 -0
- event_forecast-0.1.1/src/event_forecast/cli.py +52 -0
- event_forecast-0.1.1/src/event_forecast/comparison.py +70 -0
- event_forecast-0.1.1/src/event_forecast/coverage.py +98 -0
- event_forecast-0.1.1/src/event_forecast/errors.py +13 -0
- event_forecast-0.1.1/src/event_forecast/io.py +123 -0
- event_forecast-0.1.1/src/event_forecast/model.py +47 -0
- event_forecast-0.1.1/src/event_forecast/output.py +16 -0
- event_forecast-0.1.1/src/event_forecast/panel.py +106 -0
- event_forecast-0.1.1/src/event_forecast/py.typed +0 -0
- event_forecast-0.1.1/src/event_forecast/selection.py +202 -0
- event_forecast-0.1.1/src/event_forecast/validation.py +256 -0
- event_forecast-0.1.1/src/event_forecast.egg-info/PKG-INFO +148 -0
- event_forecast-0.1.1/src/event_forecast.egg-info/SOURCES.txt +54 -0
- event_forecast-0.1.1/src/event_forecast.egg-info/dependency_links.txt +1 -0
- event_forecast-0.1.1/src/event_forecast.egg-info/entry_points.txt +2 -0
- event_forecast-0.1.1/src/event_forecast.egg-info/requires.txt +8 -0
- event_forecast-0.1.1/src/event_forecast.egg-info/top_level.txt +1 -0
- event_forecast-0.1.1/tests/test_baselines.py +65 -0
- event_forecast-0.1.1/tests/test_catboost.py +51 -0
- event_forecast-0.1.1/tests/test_cli.py +33 -0
- event_forecast-0.1.1/tests/test_comparison.py +109 -0
- event_forecast-0.1.1/tests/test_io.py +88 -0
- event_forecast-0.1.1/tests/test_panel.py +90 -0
- event_forecast-0.1.1/tests/test_parity.py +95 -0
- event_forecast-0.1.1/tests/test_portability.py +59 -0
- event_forecast-0.1.1/tests/test_validation.py +118 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.1 (2026-12-01)
|
|
4
|
+
|
|
5
|
+
- Prepare the first PyPI release and document installation with
|
|
6
|
+
`pip install event-forecast` and the optional `catboost` extra.
|
|
7
|
+
- Add a manually dispatched, tag-checked Trusted Publishing workflow with
|
|
8
|
+
distribution tests, a separate OIDC upload job and PyPI attestations.
|
|
9
|
+
- Make the GitHub repository public. Preserve the existing v0.1.0 tag and assets.
|
|
10
|
+
- Forecasting code and numerical results are unchanged from 0.1.0;
|
|
11
|
+
the only runtime edit is the package version string.
|
|
12
|
+
|
|
13
|
+
## 0.1.0 (2026-12-01)
|
|
14
|
+
|
|
15
|
+
Initial standalone extraction from `nyc311-forecasting` v1.1.1,
|
|
16
|
+
[DOI 10.5281/zenodo.24713711](https://doi.org/10.5281/zenodo.24713711).
|
|
17
|
+
|
|
18
|
+
- Explicit-coverage daily panels, causal seasonal and level baselines, original
|
|
19
|
+
integer rounding and paired circular block bootstrap.
|
|
20
|
+
- Chronological evaluation, immutable JSON selection and separate holdout reports.
|
|
21
|
+
- Optional lazy CatBoost with causal neutral-column features and opt-in holidays.
|
|
22
|
+
- JSON/native CBM model persistence replacing executable pickle.
|
|
23
|
+
- Library packaging, offline CLI, archived parity fixtures and cross-platform CI.
|
|
24
|
+
- No changes to the running NYC deployment; extraction remains a separate package.
|
|
25
|
+
- After the initial extraction, an inherited unsigned-count subtraction bug was
|
|
26
|
+
fixed with explicit user approval in both projects (upstream v1.1.2). Bootstrap
|
|
27
|
+
errors now preserve Python integer subtraction before floating aggregation;
|
|
28
|
+
archived example metrics are unchanged, including unit errors above 2^53.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "Cite this extraction and the upstream archived methodology in references."
|
|
3
|
+
title: "event-forecast: explicit completeness, causal delay and frozen model selection"
|
|
4
|
+
type: software
|
|
5
|
+
version: 0.1.1
|
|
6
|
+
date-released: 2026-12-01
|
|
7
|
+
license: MIT
|
|
8
|
+
authors:
|
|
9
|
+
- family-names: Porzuczek
|
|
10
|
+
given-names: Piotr
|
|
11
|
+
repository-code: "https://github.com/PeterPorzuczek/event-forecast"
|
|
12
|
+
references:
|
|
13
|
+
- type: software
|
|
14
|
+
title: nyc311-forecasting
|
|
15
|
+
version: 1.1.1
|
|
16
|
+
authors:
|
|
17
|
+
- family-names: Porzuczek
|
|
18
|
+
given-names: Piotr
|
|
19
|
+
doi: 10.5281/zenodo.24713711
|
|
20
|
+
url: "https://github.com/PeterPorzuczek/nyc311-forecasting/tree/v1.1.1"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Piotr Porzuczek
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: event-forecast
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: Daily event forecasts with explicit coverage, causal information delays and frozen selection
|
|
5
|
+
Author: Piotr Porzuczek
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Source, https://github.com/PeterPorzuczek/event-forecast
|
|
8
|
+
Project-URL: Issues, https://github.com/PeterPorzuczek/event-forecast/issues
|
|
9
|
+
Project-URL: Source archive, https://doi.org/10.5281/zenodo.24713711
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Typing :: Typed
|
|
17
|
+
Requires-Python: >=3.10
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
Requires-Dist: numpy<3,>=1.24
|
|
21
|
+
Requires-Dist: pandas<3,>=2.2.3
|
|
22
|
+
Provides-Extra: catboost
|
|
23
|
+
Requires-Dist: catboost<2,>=1.2.10; extra == "catboost"
|
|
24
|
+
Provides-Extra: test
|
|
25
|
+
Requires-Dist: pytest<10,>=8; extra == "test"
|
|
26
|
+
Dynamic: license-file
|
|
27
|
+
|
|
28
|
+
# event-forecast
|
|
29
|
+
|
|
30
|
+
Daily event-count forecasting with explicit completeness, causal information delay,
|
|
31
|
+
and a model decision frozen before holdout scoring. A standalone extraction of
|
|
32
|
+
[nyc311-forecasting v1.1.1](https://doi.org/10.5281/zenodo.24713711).
|
|
33
|
+
|
|
34
|
+
Python 3.10 or later. Core dependencies: NumPy and pandas. MIT licensed.
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
python -m pip install event-forecast
|
|
38
|
+
# Optional fixed CPU CatBoost candidate:
|
|
39
|
+
python -m pip install "event-forecast[catboost]"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## First example: missing is not zero
|
|
43
|
+
|
|
44
|
+
```python
|
|
45
|
+
import pandas as pd
|
|
46
|
+
from event_forecast import CoverageSpec, prepare_daily_panel
|
|
47
|
+
|
|
48
|
+
coverage = CoverageSpec(
|
|
49
|
+
timezone="UTC", groups=(("project", "issue"),),
|
|
50
|
+
start="2026-01-01", end="2026-01-03",
|
|
51
|
+
complete_dates=("2026-01-01", "2026-01-02"),
|
|
52
|
+
)
|
|
53
|
+
events = [{"event_id": "1", "created_at": "2026-01-03T10:00:00Z",
|
|
54
|
+
"area": "project", "category": "issue"}]
|
|
55
|
+
panel = prepare_daily_panel(events, coverage)
|
|
56
|
+
assert panel.loc[1, "count"] == 0 # Complete, with no events.
|
|
57
|
+
assert panel.loc[2, "observed_count"] == 1
|
|
58
|
+
assert pd.isna(panel.loc[2, "count"]) # Observed, but not a training label.
|
|
59
|
+
print(panel[["date", "count", "observed_count", "complete"]])
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Events require `event_id`, `created_at`, `area`, `category`. Coverage declares all
|
|
63
|
+
area/category pairs and complete local dates. No category is added implicitly.
|
|
64
|
+
Naive timestamps are interpreted in the declared timezone; offset-aware timestamps
|
|
65
|
+
are converted into it. Completeness is never inferred from event rows.
|
|
66
|
+
|
|
67
|
+
## Validation, frozen selection, then holdout
|
|
68
|
+
|
|
69
|
+
Run from a repository checkout with the bundled, unchanged GitHub fixture:
|
|
70
|
+
|
|
71
|
+
```python
|
|
72
|
+
from pathlib import Path
|
|
73
|
+
from event_forecast import (
|
|
74
|
+
LastMatchingWeekday, MeanMatchingWeekdays, RollingLevelMean, Selection,
|
|
75
|
+
chronological_folds, evaluate, select, holdout_report, prepare_daily_panel,
|
|
76
|
+
)
|
|
77
|
+
from event_forecast.io import read_events, read_coverage
|
|
78
|
+
|
|
79
|
+
folder = Path("examples/github_issues_v1")
|
|
80
|
+
panel = prepare_daily_panel(read_events(folder / "events.csv"),
|
|
81
|
+
read_coverage(folder / "coverage.json"))
|
|
82
|
+
plan = chronological_folds(panel, lag_days=2)
|
|
83
|
+
candidates = [LastMatchingWeekday, MeanMatchingWeekdays, RollingLevelMean]
|
|
84
|
+
validation = [evaluate(candidate, panel, plan) for candidate in candidates]
|
|
85
|
+
selection = select(validation, min_improvement=0.02)
|
|
86
|
+
saved = selection.to_json().encode("utf-8")
|
|
87
|
+
Path("selection.json").write_bytes(saved) # Before any holdout scoring.
|
|
88
|
+
restored = Selection.from_json(saved.decode("utf-8"))
|
|
89
|
+
report = holdout_report(restored, panel, candidates)
|
|
90
|
+
assert Path("selection.json").read_bytes() == saved
|
|
91
|
+
assert report.selected_model == "rolling_mean28"
|
|
92
|
+
assert report.selected.metrics.mae == 164 / 28
|
|
93
|
+
print(report.selected.metrics)
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
`evaluate` scores validation only. `select` refuses holdout results.
|
|
97
|
+
`holdout_report` checks the frozen candidate definitions and validation truth,
|
|
98
|
+
returns separate scores, and cannot choose a different winner. Each forecast uses
|
|
99
|
+
only dates through `target_date - (lag_days + 1)`, including historical feature
|
|
100
|
+
construction. Evaluation refits every seven days by default.
|
|
101
|
+
|
|
102
|
+
Append `CatBoostCountModel` to `candidates` to include the optional challenger
|
|
103
|
+
(after importing it from `event_forecast`). It uses seed 42, one CPU thread and
|
|
104
|
+
the archived fixed settings. A challenger needs at least 2% lower validation MAE
|
|
105
|
+
than the best baseline. Holidays are disabled unless explicitly enabled.
|
|
106
|
+
|
|
107
|
+
The local-file CLI runs the same policy and creates a new output directory:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
event-forecast run --events examples/github_issues_v1/events.csv --coverage examples/github_issues_v1/coverage.json --output artifacts/github
|
|
111
|
+
# Add --catboost for the optional challenger.
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Outputs include `selection.json` (written before holdout scoring), validation and
|
|
115
|
+
holdout JSON, holdout prediction CSVs and the selected model refitted on the supplied
|
|
116
|
+
panel. The CLI has the archived 2-day lag, 2 x 14-day validation and 14-day holdout
|
|
117
|
+
defaults; use the Python API for other policies. Predictions are nonnegative,
|
|
118
|
+
half-up rounded per group. Totals are sums of those rounded group counts.
|
|
119
|
+
|
|
120
|
+
## Documentation and verification
|
|
121
|
+
|
|
122
|
+
- [The three rules and their limits](https://github.com/PeterPorzuczek/event-forecast/blob/v0.1.1/docs/three-rules.md)
|
|
123
|
+
- [Bring your own model](https://github.com/PeterPorzuczek/event-forecast/blob/v0.1.1/docs/bring-your-own-model.md)
|
|
124
|
+
- [API, dependencies and extraction differences](https://github.com/PeterPorzuczek/event-forecast/blob/v0.1.1/docs/extraction-report.md)
|
|
125
|
+
- [Exact parity results and fixture provenance](https://github.com/PeterPorzuczek/event-forecast/blob/v0.1.1/docs/parity.md)
|
|
126
|
+
- [Building and publishing instructions](https://github.com/PeterPorzuczek/event-forecast/blob/v0.1.1/docs/publishing.md)
|
|
127
|
+
- [Changelog](https://github.com/PeterPorzuczek/event-forecast/blob/v0.1.1/CHANGELOG.md)
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
python -m pip install ".[test,catboost]"
|
|
131
|
+
python -m pytest
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
CI tests Linux, Windows and macOS with Python 3.10 through 3.13, both without
|
|
135
|
+
and with CatBoost. Every matrix cell builds distributions, checks their metadata,
|
|
136
|
+
installs the wheel into an isolated environment, and executes the README examples.
|
|
137
|
+
|
|
138
|
+
The archived GitHub study is exploratory: the level baseline was introduced after
|
|
139
|
+
an initial holdout inspection. Reproducing its numbers does not turn that earlier
|
|
140
|
+
research decision into an untouched confirmatory experiment. See the parity notes.
|
|
141
|
+
|
|
142
|
+
## Citation
|
|
143
|
+
|
|
144
|
+
Please cite the upstream archived methodology and data,
|
|
145
|
+
[DOI 10.5281/zenodo.24713711](https://doi.org/10.5281/zenodo.24713711),
|
|
146
|
+
and identify the installed `event-forecast` version when using this extraction. The DOI belongs to
|
|
147
|
+
the source release, not to this new package; machine-readable metadata is in
|
|
148
|
+
[CITATION.cff](https://github.com/PeterPorzuczek/event-forecast/blob/v0.1.1/CITATION.cff).
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# event-forecast
|
|
2
|
+
|
|
3
|
+
Daily event-count forecasting with explicit completeness, causal information delay,
|
|
4
|
+
and a model decision frozen before holdout scoring. A standalone extraction of
|
|
5
|
+
[nyc311-forecasting v1.1.1](https://doi.org/10.5281/zenodo.24713711).
|
|
6
|
+
|
|
7
|
+
Python 3.10 or later. Core dependencies: NumPy and pandas. MIT licensed.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
python -m pip install event-forecast
|
|
11
|
+
# Optional fixed CPU CatBoost candidate:
|
|
12
|
+
python -m pip install "event-forecast[catboost]"
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## First example: missing is not zero
|
|
16
|
+
|
|
17
|
+
```python
|
|
18
|
+
import pandas as pd
|
|
19
|
+
from event_forecast import CoverageSpec, prepare_daily_panel
|
|
20
|
+
|
|
21
|
+
coverage = CoverageSpec(
|
|
22
|
+
timezone="UTC", groups=(("project", "issue"),),
|
|
23
|
+
start="2026-01-01", end="2026-01-03",
|
|
24
|
+
complete_dates=("2026-01-01", "2026-01-02"),
|
|
25
|
+
)
|
|
26
|
+
events = [{"event_id": "1", "created_at": "2026-01-03T10:00:00Z",
|
|
27
|
+
"area": "project", "category": "issue"}]
|
|
28
|
+
panel = prepare_daily_panel(events, coverage)
|
|
29
|
+
assert panel.loc[1, "count"] == 0 # Complete, with no events.
|
|
30
|
+
assert panel.loc[2, "observed_count"] == 1
|
|
31
|
+
assert pd.isna(panel.loc[2, "count"]) # Observed, but not a training label.
|
|
32
|
+
print(panel[["date", "count", "observed_count", "complete"]])
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Events require `event_id`, `created_at`, `area`, `category`. Coverage declares all
|
|
36
|
+
area/category pairs and complete local dates. No category is added implicitly.
|
|
37
|
+
Naive timestamps are interpreted in the declared timezone; offset-aware timestamps
|
|
38
|
+
are converted into it. Completeness is never inferred from event rows.
|
|
39
|
+
|
|
40
|
+
## Validation, frozen selection, then holdout
|
|
41
|
+
|
|
42
|
+
Run from a repository checkout with the bundled, unchanged GitHub fixture:
|
|
43
|
+
|
|
44
|
+
```python
|
|
45
|
+
from pathlib import Path
|
|
46
|
+
from event_forecast import (
|
|
47
|
+
LastMatchingWeekday, MeanMatchingWeekdays, RollingLevelMean, Selection,
|
|
48
|
+
chronological_folds, evaluate, select, holdout_report, prepare_daily_panel,
|
|
49
|
+
)
|
|
50
|
+
from event_forecast.io import read_events, read_coverage
|
|
51
|
+
|
|
52
|
+
folder = Path("examples/github_issues_v1")
|
|
53
|
+
panel = prepare_daily_panel(read_events(folder / "events.csv"),
|
|
54
|
+
read_coverage(folder / "coverage.json"))
|
|
55
|
+
plan = chronological_folds(panel, lag_days=2)
|
|
56
|
+
candidates = [LastMatchingWeekday, MeanMatchingWeekdays, RollingLevelMean]
|
|
57
|
+
validation = [evaluate(candidate, panel, plan) for candidate in candidates]
|
|
58
|
+
selection = select(validation, min_improvement=0.02)
|
|
59
|
+
saved = selection.to_json().encode("utf-8")
|
|
60
|
+
Path("selection.json").write_bytes(saved) # Before any holdout scoring.
|
|
61
|
+
restored = Selection.from_json(saved.decode("utf-8"))
|
|
62
|
+
report = holdout_report(restored, panel, candidates)
|
|
63
|
+
assert Path("selection.json").read_bytes() == saved
|
|
64
|
+
assert report.selected_model == "rolling_mean28"
|
|
65
|
+
assert report.selected.metrics.mae == 164 / 28
|
|
66
|
+
print(report.selected.metrics)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
`evaluate` scores validation only. `select` refuses holdout results.
|
|
70
|
+
`holdout_report` checks the frozen candidate definitions and validation truth,
|
|
71
|
+
returns separate scores, and cannot choose a different winner. Each forecast uses
|
|
72
|
+
only dates through `target_date - (lag_days + 1)`, including historical feature
|
|
73
|
+
construction. Evaluation refits every seven days by default.
|
|
74
|
+
|
|
75
|
+
Append `CatBoostCountModel` to `candidates` to include the optional challenger
|
|
76
|
+
(after importing it from `event_forecast`). It uses seed 42, one CPU thread and
|
|
77
|
+
the archived fixed settings. A challenger needs at least 2% lower validation MAE
|
|
78
|
+
than the best baseline. Holidays are disabled unless explicitly enabled.
|
|
79
|
+
|
|
80
|
+
The local-file CLI runs the same policy and creates a new output directory:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
event-forecast run --events examples/github_issues_v1/events.csv --coverage examples/github_issues_v1/coverage.json --output artifacts/github
|
|
84
|
+
# Add --catboost for the optional challenger.
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Outputs include `selection.json` (written before holdout scoring), validation and
|
|
88
|
+
holdout JSON, holdout prediction CSVs and the selected model refitted on the supplied
|
|
89
|
+
panel. The CLI has the archived 2-day lag, 2 x 14-day validation and 14-day holdout
|
|
90
|
+
defaults; use the Python API for other policies. Predictions are nonnegative,
|
|
91
|
+
half-up rounded per group. Totals are sums of those rounded group counts.
|
|
92
|
+
|
|
93
|
+
## Documentation and verification
|
|
94
|
+
|
|
95
|
+
- [The three rules and their limits](https://github.com/PeterPorzuczek/event-forecast/blob/v0.1.1/docs/three-rules.md)
|
|
96
|
+
- [Bring your own model](https://github.com/PeterPorzuczek/event-forecast/blob/v0.1.1/docs/bring-your-own-model.md)
|
|
97
|
+
- [API, dependencies and extraction differences](https://github.com/PeterPorzuczek/event-forecast/blob/v0.1.1/docs/extraction-report.md)
|
|
98
|
+
- [Exact parity results and fixture provenance](https://github.com/PeterPorzuczek/event-forecast/blob/v0.1.1/docs/parity.md)
|
|
99
|
+
- [Building and publishing instructions](https://github.com/PeterPorzuczek/event-forecast/blob/v0.1.1/docs/publishing.md)
|
|
100
|
+
- [Changelog](https://github.com/PeterPorzuczek/event-forecast/blob/v0.1.1/CHANGELOG.md)
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
python -m pip install ".[test,catboost]"
|
|
104
|
+
python -m pytest
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
CI tests Linux, Windows and macOS with Python 3.10 through 3.13, both without
|
|
108
|
+
and with CatBoost. Every matrix cell builds distributions, checks their metadata,
|
|
109
|
+
installs the wheel into an isolated environment, and executes the README examples.
|
|
110
|
+
|
|
111
|
+
The archived GitHub study is exploratory: the level baseline was introduced after
|
|
112
|
+
an initial holdout inspection. Reproducing its numbers does not turn that earlier
|
|
113
|
+
research decision into an untouched confirmatory experiment. See the parity notes.
|
|
114
|
+
|
|
115
|
+
## Citation
|
|
116
|
+
|
|
117
|
+
Please cite the upstream archived methodology and data,
|
|
118
|
+
[DOI 10.5281/zenodo.24713711](https://doi.org/10.5281/zenodo.24713711),
|
|
119
|
+
and identify the installed `event-forecast` version when using this extraction. The DOI belongs to
|
|
120
|
+
the source release, not to this new package; machine-readable metadata is in
|
|
121
|
+
[CITATION.cff](https://github.com/PeterPorzuczek/event-forecast/blob/v0.1.1/CITATION.cff).
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Bring your own model
|
|
2
|
+
|
|
3
|
+
Implement `fit(panel) -> self` and
|
|
4
|
+
`predict(panel, target_date, data_through_date) -> numpy.ndarray`. Return one finite,
|
|
5
|
+
nonnegative expected count in the panel's first-occurrence `(area, category)` order.
|
|
6
|
+
The evaluator performs the shared integer rounding, so do not round in your model.
|
|
7
|
+
Use the neutral `date`, `area`, `category`, `count` and `complete` columns.
|
|
8
|
+
|
|
9
|
+
Each factory invocation must return a fresh object. `fit` must return it. The
|
|
10
|
+
evaluator supplies only the prefix through the cutoff to both methods; fitting
|
|
11
|
+
must ignore missing counts. Historical feature construction must use the same
|
|
12
|
+
per-row lag. Do not retain a pre-fitted model trained on later labels or read other
|
|
13
|
+
data behind the evaluator's back.
|
|
14
|
+
|
|
15
|
+
The following is an adapter pattern for your own estimator, not a new bundled model:
|
|
16
|
+
|
|
17
|
+
```python
|
|
18
|
+
from event_forecast import Candidate, Model, evaluate, holdout_report, select
|
|
19
|
+
|
|
20
|
+
# YourEstimator implements Model and is configured with the same lag as plan.
|
|
21
|
+
custom = Candidate(
|
|
22
|
+
name="my_estimator",
|
|
23
|
+
factory=lambda: YourEstimator(lag_days=plan.lag_days),
|
|
24
|
+
baseline=False,
|
|
25
|
+
parameters_json='{"lag_days": 2}',
|
|
26
|
+
)
|
|
27
|
+
results = [evaluate(factory, panel, plan) for factory in [*baselines, custom]]
|
|
28
|
+
decision = select(results) # Includes at least one baseline.
|
|
29
|
+
saved_decision = decision.to_json() # Persist before requesting the holdout.
|
|
30
|
+
report = holdout_report(decision, panel, [*baselines, custom])
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Declare every configuration value in `parameters_json` and keep factories stable.
|
|
34
|
+
If the model exposes `lag_days`, it must equal `plan.lag_days`. Candidate definitions
|
|
35
|
+
are checked against the saved decision before holdout evaluation. A protocol
|
|
36
|
+
cannot verify the contents of arbitrary custom Python code or whether its declared
|
|
37
|
+
parameters accurately describe the implementation. The custom-model author owns
|
|
38
|
+
those guarantees and model persistence. The built-in `save_model` intentionally
|
|
39
|
+
accepts only built-in model classes.
|
|
40
|
+
|
|
41
|
+
Choose folds and candidates before examining holdout scores. Return new arrays;
|
|
42
|
+
do not mutate the supplied panel. `EvaluationResult.predictions` returns a fresh
|
|
43
|
+
DataFrame, and editing it cannot change the frozen result or decision.
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Extraction report, 0.1.1
|
|
2
|
+
|
|
3
|
+
## Public API
|
|
4
|
+
|
|
5
|
+
All symbols below are imported from `event_forecast` unless qualified otherwise.
|
|
6
|
+
|
|
7
|
+
| Symbol | Contract |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| `CoverageSpec` | Frozen timezone, ordered groups, date span and complete dates; `from_json`/`to_json` perform no file I/O. |
|
|
10
|
+
| `prepare_daily_panel` | Build a dense daily panel; complete empty days are zero and incomplete labels stay NaN. |
|
|
11
|
+
| `ValidationError` | Typed invalid-data/configuration error, derived from ValueError. |
|
|
12
|
+
| `ModelingError` | Typed forecast/training failure, derived from ValueError. |
|
|
13
|
+
| `OptionalDependencyError` | Actionable missing-extra error, derived from ImportError. |
|
|
14
|
+
| `Model` | Runtime-checkable protocol: `fit(panel)` returns self; `predict(panel, target_date, data_through_date)` returns ordered expected counts. |
|
|
15
|
+
| `LastMatchingWeekday` | Last available matching weekday through the cutoff. |
|
|
16
|
+
| `MeanMatchingWeekdays` | Mean of up to n available matching weekdays; n=4 by default. |
|
|
17
|
+
| `RollingLevelMean` | Mean of an exact complete consecutive window; 28 days by default. |
|
|
18
|
+
| `CatBoostConfig` | Frozen settings for the optional archived CPU regressor, default seed 42, one thread and no holidays. |
|
|
19
|
+
| `CatBoostCountModel` | Shared count regressor with causal features and additive MAE or logarithmic Poisson offset. |
|
|
20
|
+
| `data_through_date` | Compute target date minus lag_days+1, with lag_days=2 by default. |
|
|
21
|
+
| `integer_counts` | Validate and half-up round nonnegative group forecasts to int64. |
|
|
22
|
+
| `ROUNDING_POLICY` | Stable identifier `nonnegative_round_half_up_per_group_v1`. |
|
|
23
|
+
| `Candidate` | Name a fresh custom-model factory and freeze its declared JSON parameters/baseline status. |
|
|
24
|
+
| `FoldPlan` | Immutable chronological validation and holdout dates, lag and refit policy. |
|
|
25
|
+
| `chronological_folds` | Reserve final whole dates: defaults 2x14 validation, 14 holdout, 28 minimum training days and 7-day refits. |
|
|
26
|
+
| `EvaluationResult` | Immutable scored records/metrics/phase; `.predictions` returns an independent DataFrame. |
|
|
27
|
+
| `evaluate` | Score a fresh-model factory on validation dates only. |
|
|
28
|
+
| `Selection` | Frozen decision, model definitions, scores, scope and truth digest, with safe JSON roundtrip. |
|
|
29
|
+
| `select` | Choose by validation MAE, requiring at least 2% gain for a challenger over the best baseline. |
|
|
30
|
+
| `HoldoutReport` | Separate scored comparisons linked to the frozen decision digest, with `.selected` access. |
|
|
31
|
+
| `holdout_report` | Verify each refit's definition against Selection, then score the reserved holdout without choosing a new winner. |
|
|
32
|
+
| `paired_mae_interval` | Paired circular date-block bootstrap of candidate-minus-reference MAE. |
|
|
33
|
+
| `__version__` | Package version `0.1.1`. |
|
|
34
|
+
| `io.read_events` | Read a local CSV while preserving string event IDs and labels. |
|
|
35
|
+
| `io.read_coverage` | Read an explicit local coverage JSON document. |
|
|
36
|
+
| `io.write_json` | Exclusively create a UTF-8 JSON file, refusing overwrites. |
|
|
37
|
+
| `io.save_model` | Save a fitted built-in baseline as JSON or CatBoost as native CBM plus JSON metadata. |
|
|
38
|
+
| `io.load_model` | Load only allowlisted formats, verify native checksum and feature names, never execute pickle. |
|
|
39
|
+
| `cli.main` | Local-file experiment entry point behind `event-forecast run`. |
|
|
40
|
+
|
|
41
|
+
Returned metrics contain MAE, RMSE, bias, WAPE and sample count. WAPE is a ratio
|
|
42
|
+
and is null when total observed count is zero. Group/date rows have equal MAE
|
|
43
|
+
weight; totals are sums of individually rounded group forecasts.
|
|
44
|
+
|
|
45
|
+
## Dependencies
|
|
46
|
+
|
|
47
|
+
Python >=3.10. Direct core runtime dependencies: `numpy>=1.24,<3` and
|
|
48
|
+
`pandas>=2.2.3,<3`. Optional runtime extra: `catboost>=1.2.10,<2`, imported only on
|
|
49
|
+
model fitting or native loading. Development test extra: `pytest>=8,<10`.
|
|
50
|
+
Build backend: `setuptools>=77` and `wheel`. Build/validation tools used by CI:
|
|
51
|
+
`build`, `twine`, `pytest`; local formatting uses `ruff`. They are not core runtime
|
|
52
|
+
requirements. Transitive dependencies are managed by each upstream package.
|
|
53
|
+
Application lockfiles are intentionally not copied into the library.
|
|
54
|
+
The pandas lower bound excludes releases that predate NumPy 2 compatibility;
|
|
55
|
+
the optional CatBoost lower bound is the version used for archived reproduction.
|
|
56
|
+
|
|
57
|
+
## Deliberately omitted
|
|
58
|
+
|
|
59
|
+
- Jenkins, runtime/process management, deployment and the ops repository: application orchestration.
|
|
60
|
+
- MongoDB, source fetching/revision admission and credentials: caller-owned acquisition/completeness.
|
|
61
|
+
- GitHub network exporter and live APIs: the package works entirely on caller-supplied local data.
|
|
62
|
+
- NYC categories, geographic maps, frontend and route handling: domain-specific application behavior.
|
|
63
|
+
- Git commit discovery, repository-root paths and internal artifact paths: a wheel must run anywhere.
|
|
64
|
+
- Pickle: replaced by allowlisted JSON and native CBM; arbitrary custom Python models own persistence.
|
|
65
|
+
- Tuning, dashboards and new models: outside the requested extraction.
|
|
66
|
+
|
|
67
|
+
## Differences from v1.1.1
|
|
68
|
+
|
|
69
|
+
1. Independent src-layout installable package and small typed API replace Config
|
|
70
|
+
inheritance and the application experiment entry point. Neutral panel names are
|
|
71
|
+
used throughout; there is no runtime NYC column rename layer.
|
|
72
|
+
2. Coverage is immutable and validated at its boundary. Archived `start_date` and
|
|
73
|
+
`end_date` are accepted in coverage JSON alongside canonical `start`/`end`;
|
|
74
|
+
conflicting aliases are rejected. Export metadata is ignored by coverage.
|
|
75
|
+
3. Explicit dense panel, complete-label, group-order, cutoff and candidate guards
|
|
76
|
+
fail early. Insufficient split history raises an error rather than returning
|
|
77
|
+
empty folds. Partial evaluation dates cannot silently disappear.
|
|
78
|
+
4. `evaluate` is validation-only; frozen Selection includes model configurations,
|
|
79
|
+
validation truth digest and date/group scope. Holdout checks each new instance
|
|
80
|
+
before fitting and refuses changed validation truth or model parameters.
|
|
81
|
+
Mutable experiment dictionaries are replaced with frozen records. Custom-model
|
|
82
|
+
declarations remain the caller's responsibility, not a sandbox guarantee.
|
|
83
|
+
5. CatBoost is lazy and optional. Failures are explicit exceptions; there is no
|
|
84
|
+
infrastructure failure record or silent removal of a failed candidate. Seasonal
|
|
85
|
+
baselines can still be run independently without installing the extra.
|
|
86
|
+
6. Holiday features default to none. Explicit `us_federal` preserves the original
|
|
87
|
+
holiday calendar. Fixed GitHub experiment numeric settings/features are retained.
|
|
88
|
+
7. Baseline persistence is plain JSON; CatBoost uses CBM with JSON configuration,
|
|
89
|
+
group order, fitted cutoff, feature names and checksum. All-zero models use JSON
|
|
90
|
+
alone because the original algorithm fits no trees in that case. No pickle or
|
|
91
|
+
automatic class import is allowed. Checksums detect corruption, not authenticity.
|
|
92
|
+
8. The local-file CLI uses the archived experiment defaults and a new output
|
|
93
|
+
schema. It writes selection before holdout, refuses existing output directories
|
|
94
|
+
and retains all successful candidate comparisons. Programmatic API parameters
|
|
95
|
+
replace the old application configuration schema. The original configuration
|
|
96
|
+
JSON is bundled as provenance, not interpreted as a new CLI configuration file.
|
|
97
|
+
9. With explicit user approval, the inherited unsigned-count bootstrap subtraction
|
|
98
|
+
bug is corrected in this package and upstream v1.1.2. Python integer arithmetic
|
|
99
|
+
preserves differences before floating aggregation; archived comparisons are unchanged. This is the
|
|
100
|
+
sole intended numerical correction relative to v1.1.1. It is not model tuning.
|
|
101
|
+
10. Candidate rejection reason is named `challenger_gain_below_threshold` for
|
|
102
|
+
custom models as well as CatBoost. Built-in candidate IDs, ranking/tie policy,
|
|
103
|
+
2% rule, rounding, metric definitions and bootstrap sampling are preserved.
|
|
104
|
+
11. The CLI's saved final model is refitted on the supplied panel. For later
|
|
105
|
+
predictions the caller still supplies a valid history and the required cutoff.
|
|
106
|
+
No publication schedule, future network fetch or model registry is created.
|
|
107
|
+
|
|
108
|
+
v1.1.1 and its DOI remain the methodological reference. The user separately
|
|
109
|
+
authorized a versioned upstream repair after the inherited bug was reported;
|
|
110
|
+
neither the historical tag nor its archive is rewritten. The NYC deployment and
|
|
111
|
+
ops source are outside this work.
|
|
112
|
+
|
|
113
|
+
## Limits and open questions
|
|
114
|
+
|
|
115
|
+
- Version 0.1.1 is prepared for the separately authorized public PyPI release;
|
|
116
|
+
the publishing procedure and account setup are in [publishing.md](publishing.md).
|
|
117
|
+
- Completeness must come from the data owner. Retrospective CSVs do not recreate historical knowledge snapshots.
|
|
118
|
+
- Fixed-seed CatBoost metric parity is checked at absolute tolerance 1e-10; binary model bytes are not promised identical across platforms.
|
|
119
|
+
- The archived study introduced the level baseline after initial holdout inspection. Its comparisons remain exploratory.
|
|
120
|
+
- Floating arithmetic follows the existing numerical validation scale; integer counts beyond exact floating representation are not a high-precision arithmetic guarantee.
|
|
121
|
+
|
|
122
|
+
Exact reproduction values and data hashes are in [parity.md](parity.md) and
|
|
123
|
+
[fixture-provenance.json](fixture-provenance.json). Review findings and their
|
|
124
|
+
resolution are retained in [review-stop.md](review-stop.md).
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source_repository": "https://github.com/PeterPorzuczek/nyc311-forecasting",
|
|
3
|
+
"source_tag": "v1.1.1",
|
|
4
|
+
"source_tag_commit": "8cd0d97095b7eacf4df6edaf00804d82ab3de035",
|
|
5
|
+
"doi": "10.5281/zenodo.24713711",
|
|
6
|
+
"files": [
|
|
7
|
+
{
|
|
8
|
+
"path": "examples/github_categories/coverage.json",
|
|
9
|
+
"sha256": "3142bd20c3b18de98b02cc225ae03b4297a575d5a067d287b47b385931c715b0",
|
|
10
|
+
"bytes": 6520
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"path": "examples/github_categories/events.csv",
|
|
14
|
+
"sha256": "24ce1cebbcff231cbe7bad6713b5c304ab9aea28e5dc8b62925219e696342172",
|
|
15
|
+
"bytes": 258620
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"path": "examples/github_categories/fetch_manifest.json",
|
|
19
|
+
"sha256": "fe8b2918d9d37be0f3966bc9e4fdb6218580db6af6d5cbf88e8492e7d0893e68",
|
|
20
|
+
"bytes": 16194
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"path": "examples/github_categories/labels.csv",
|
|
24
|
+
"sha256": "46a4f4fcbdbb1f03e08d154fbef2adfa2f6f81db9fc692e837c7dda634268990",
|
|
25
|
+
"bytes": 236090
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"path": "examples/github_issues_v1/coverage.json",
|
|
29
|
+
"sha256": "4b81cebb92c3c7d669ce2ffa0ffe564a779313f4460d26dbd1861ad54ef80356",
|
|
30
|
+
"bytes": 4101
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"path": "examples/github_issues_v1/events.csv",
|
|
34
|
+
"sha256": "bb881ddb250e29e325c4f5a2aaedcd134afbc3d4e7af7450fe1507e448ebcf4d",
|
|
35
|
+
"bytes": 171090
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"path": "examples/github_issues_v1/fetch_manifest.json",
|
|
39
|
+
"sha256": "0e29e9cbf671c0c1cf52f13fa853835808de315612de6a62ad88315bb90112b5",
|
|
40
|
+
"bytes": 3518
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"path": "examples/github_level_experiment.json",
|
|
44
|
+
"sha256": "944f69ebdf4490154e900cb8625ef4ea574320c6ddf7f3424e585a2fa44185ac",
|
|
45
|
+
"bytes": 320
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Standalone event-forecast implementation plan
|
|
2
|
+
|
|
3
|
+
**Goal:** Extract the supplied v1.1.1 methodology into an independent 0.1.0 library without modifying either source repository or the running deployment.
|
|
4
|
+
|
|
5
|
+
**Architecture:** A src-layout package owns coverage validation, neutral panel preparation, cutoff-aware baselines and causal CatBoost features, immutable validation/selection records, paired comparisons, and safe JSON/native model persistence. Network export and application orchestration are excluded. Core depends only on NumPy and pandas; CatBoost is optional and lazy. Public functions return values, with filesystem work confined to I/O and CLI modules.
|
|
6
|
+
|
|
7
|
+
**Spec:** User attachment dated 2026-12-01 plus the explicit instruction to pull latest source changes and leave original code unchanged.
|
|
8
|
+
|
|
9
|
+
**Reference:** v1.1.1 is 8cd0d97095b7eacf4df6edaf00804d82ab3de035. Read-only source checkout after pull is b8b5ba1. Relevant extraction modules do not differ between these revisions. Source environment: Python3.12.3, NumPy2.1.3, pandas2.2.3, CatBoost1.2.10. PyPI event-forecast JSON endpoint returned404 on2026-12-01; this is a name check, not a reservation.
|
|
10
|
+
|
|
11
|
+
## Decisions
|
|
12
|
+
|
|
13
|
+
- `CoverageSpec` is immutable; its JSON reader accepts archived start_date/end_date as well as canonical start/end and rejects conflicting values. Explicit groups are never expanded or assigned an implicit OTHER.
|
|
14
|
+
- Baselines infer group order from a validated prepared panel at fit. Predictions enforce target minus lag_days+1; evaluation also truncates training to that cutoff. Built-in CatBoost refuses prediction with weights fitted after the requested cutoff.
|
|
15
|
+
- `chronological_folds` returns an immutable FoldPlan. `evaluate` returns validation-only immutable records; `select` rejects holdout records and freezes scores, scope, lag/refit policy and model specifications. `holdout_report` only scores dates after validation and checks the requested model definitions against the frozen record. The CLI writes selection.json before any holdout scoring.
|
|
16
|
+
- Candidate names retain neutral archived identifiers (seasonal_naive, weekday_mean4, rolling_mean28, catboost_mae). Public baseline classes have descriptive names. CatBoost feature names/column order retain their numeric meaning with neutral group/count columns; holiday flags default off.
|
|
17
|
+
- Save baselines as allowlisted JSON. CatBoost uses JSON metadata and its native CBM file; no dynamic imports or executable serialization on load.
|
|
18
|
+
- Bundle byte-identical GitHub event/coverage files and record hashes. Runtime dependencies use ranges; parity evidence records actual versions. Baselines must match exact archived rational metrics; CatBoost tolerance is documented and never tuned to mask differences.
|
|
19
|
+
- Create a private GitHub repository after local verification; run the requested24-cell OS/Python/extra CI matrix there. No PyPI/TestPyPI upload or Jenkins action.
|
|
20
|
+
- If extraction reveals an original bug or ambiguity, stop and describe it as explicitly requested.
|
|
21
|
+
|
|
22
|
+
## Tasks
|
|
23
|
+
|
|
24
|
+
- [x] Port panel/calendar/comparison tests; implement CoverageSpec, typed errors, panel and comparison.
|
|
25
|
+
- [x] Implement tested cutoff-aware baselines, original rounding, immutable folds/evaluation/selection/holdout.
|
|
26
|
+
- [x] Extract optional CatBoost features/model with one-thread deterministic parity and safe native persistence.
|
|
27
|
+
- [x] Reproduce both archived datasets and bootstrap; save exact numerical evidence and all deviations.
|
|
28
|
+
- [x] Add thin I/O/CLI, README quickstart/full experiment, custom-model and three-rules docs, license/citation/changelog.
|
|
29
|
+
- [x] Build/test wheel and sdist, clean core-only and extra installs, static import/dependency checks, fresh code review.
|
|
30
|
+
- [x] Create/push new private repository, run CI matrix and artifact checks, report API/dependencies/parity/limits and source clean status.
|
|
31
|
+
|
|
32
|
+
## Review focus
|
|
33
|
+
|
|
34
|
+
Empty complete days versus incomplete observations; duplicate/conflicting identities; timezone/DST date boundaries; poison values after each cutoff; immutable selection and no holdout reuse as validation; changed model parameters between selection and holdout; missing/untrusted model files; optional import without CatBoost; group order and exact rounding/parity; existing source repositories untouched.
|
|
35
|
+
|
|
36
|
+
## Ledger
|
|
37
|
+
|
|
38
|
+
2026-12-01: Source pulled (already up to date); source and operations working trees clean. New sibling repository initialized. No source modifications, server access or deployment commands used.
|
|
39
|
+
|
|
40
|
+
2026-12-01: Extraction paused under the user's explicit stop-on-original-bug instruction. Independent review and a second read-only reproduction confirmed unsigned integer underflow in upstream and extracted paired_mae_interval. See review-stop.md. No GitHub repository, commit, deployment or package publication has been made. This working tree is unfinished; a newly added regression test for the separate extraction-only holdout factory issue is intentionally failing pending implementation. Existing archived numerical parity tests passed before this finding.
|
|
41
|
+
|
|
42
|
+
2026-12-01: User authorized the unsigned arithmetic repair in both repositories and an upstream v1.1.2 release, retaining v1.1.1 unchanged. Regression tests reproduced the error before repair. A review caught float operand precision loss, so the final repair preserves Python integer arithmetic until the paired difference is computed. All 36 comparison tests passed and four archived full reports matched exactly. The new holdout guard is repaired and reviewed. Upstream fix committed as e9a6c727e64318b5249173ced9be43a9660595b3. Packaging, full standalone suite and final review are in progress. No Jenkins action or ops edits.
|
|
43
|
+
|
|
44
|
+
2026-12-01: Upstream v1.1.2 published with 216 successful hosted tests and exact archived comparison replay. Standalone final local suite: 91 passed, zero failures/errors/skips; NumPy2.5.5, pandas2.3.3, CatBoost1.2.10, Python3.12.3. Ruff, pip check, build, twine check, CLI and isolated core/extra README runs passed. Final review approved after a local-file-only CSV reader fix. Lower dependency bounds exclude pandas releases predating NumPy2 compatibility and retain the CatBoost version used in reproduction. Next: create the separate private repository and verify all 24 hosted matrix cells.
|
|
45
|
+
|
|
46
|
+
2026-12-01: Completed and published private GitHub release v0.1.0 at a90c29534e186566fa74f3f12936d60f7c16a56c. All 24 matrix cells passed in https://github.com/PeterPorzuczek/event-forecast/actions/runs/46714704034. The wheel checker now resolves filesystem aliases on macOS; one job was retried after waiting for a runner. Release assets include wheel, sdist, verification, full API/differences report, parity results, fixture provenance and SHA256 hashes. Downloaded assets were verified against the manifest. No PyPI/TestPyPI publication or Jenkins action. This final ledger update changes documentation only; the tested release tag remains fixed.
|
|
47
|
+
|
|
48
|
+
## Separately authorized public publication
|
|
49
|
+
|
|
50
|
+
2026-12-01: The user explicitly requested a public repository and actual PyPI
|
|
51
|
+
publication under `event-forecast`. Repository visibility was changed to public.
|
|
52
|
+
Version 0.1.1 updates installation documentation and adds a manually dispatched
|
|
53
|
+
Trusted Publishing workflow. The existing v0.1.0 tag and assets are preserved;
|
|
54
|
+
the only change under `src/` is `__version__`. The GitHub `pypi` environment
|
|
55
|
+
permits `v*` tags only. PyPI account binding and the first upload remain pending.
|