power-fm-foresight 0.3.0__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.
Files changed (93) hide show
  1. power_fm_foresight-0.3.0/LICENSE +208 -0
  2. power_fm_foresight-0.3.0/PKG-INFO +465 -0
  3. power_fm_foresight-0.3.0/README.md +235 -0
  4. power_fm_foresight-0.3.0/pyproject.toml +30 -0
  5. power_fm_foresight-0.3.0/setup.cfg +4 -0
  6. power_fm_foresight-0.3.0/src/power_fm_foresight/__init__.py +15 -0
  7. power_fm_foresight-0.3.0/src/power_fm_foresight/_artifacts.py +47 -0
  8. power_fm_foresight-0.3.0/src/power_fm_foresight/_compat.py +13 -0
  9. power_fm_foresight-0.3.0/src/power_fm_foresight/_config.py +70 -0
  10. power_fm_foresight-0.3.0/src/power_fm_foresight/_data/__init__.py +1 -0
  11. power_fm_foresight-0.3.0/src/power_fm_foresight/_data/assets.py +144 -0
  12. power_fm_foresight-0.3.0/src/power_fm_foresight/_data/coordinates.py +87 -0
  13. power_fm_foresight-0.3.0/src/power_fm_foresight/_data/dataset.py +240 -0
  14. power_fm_foresight-0.3.0/src/power_fm_foresight/_data/event_helpers.py +49 -0
  15. power_fm_foresight-0.3.0/src/power_fm_foresight/_data/event_policy.py +26 -0
  16. power_fm_foresight-0.3.0/src/power_fm_foresight/_data/events.py +106 -0
  17. power_fm_foresight-0.3.0/src/power_fm_foresight/_data/generate.py +52 -0
  18. power_fm_foresight-0.3.0/src/power_fm_foresight/_data/generation_summary.py +38 -0
  19. power_fm_foresight-0.3.0/src/power_fm_foresight/_data/labeling.py +168 -0
  20. power_fm_foresight-0.3.0/src/power_fm_foresight/_data/network.py +105 -0
  21. power_fm_foresight-0.3.0/src/power_fm_foresight/_data/parity.py +164 -0
  22. power_fm_foresight-0.3.0/src/power_fm_foresight/_data/subset.py +99 -0
  23. power_fm_foresight-0.3.0/src/power_fm_foresight/_solver/__init__.py +1 -0
  24. power_fm_foresight-0.3.0/src/power_fm_foresight/_solver/adapter.py +183 -0
  25. power_fm_foresight-0.3.0/src/power_fm_foresight/_solver/checks.py +152 -0
  26. power_fm_foresight-0.3.0/src/power_fm_foresight/_training/__init__.py +1 -0
  27. power_fm_foresight-0.3.0/src/power_fm_foresight/_training/audits.py +34 -0
  28. power_fm_foresight-0.3.0/src/power_fm_foresight/_training/evaluation.py +15 -0
  29. power_fm_foresight-0.3.0/src/power_fm_foresight/_training/forecast.py +103 -0
  30. power_fm_foresight-0.3.0/src/power_fm_foresight/_training/forecaster.py +222 -0
  31. power_fm_foresight-0.3.0/src/power_fm_foresight/_training/headlines.py +11 -0
  32. power_fm_foresight-0.3.0/src/power_fm_foresight/_training/inputs.py +109 -0
  33. power_fm_foresight-0.3.0/src/power_fm_foresight/_training/loop.py +271 -0
  34. power_fm_foresight-0.3.0/src/power_fm_foresight/_training/metrics.py +56 -0
  35. power_fm_foresight-0.3.0/src/power_fm_foresight/_training/physics.py +65 -0
  36. power_fm_foresight-0.3.0/src/power_fm_foresight/_training/state.py +121 -0
  37. power_fm_foresight-0.3.0/src/power_fm_foresight/assessment.py +266 -0
  38. power_fm_foresight-0.3.0/src/power_fm_foresight/campaign.py +338 -0
  39. power_fm_foresight-0.3.0/src/power_fm_foresight/cli.py +118 -0
  40. power_fm_foresight-0.3.0/src/power_fm_foresight/data.py +10 -0
  41. power_fm_foresight-0.3.0/src/power_fm_foresight/genco.py +80 -0
  42. power_fm_foresight-0.3.0/src/power_fm_foresight/grids.py +126 -0
  43. power_fm_foresight-0.3.0/src/power_fm_foresight/preparation.py +193 -0
  44. power_fm_foresight-0.3.0/src/power_fm_foresight/reporting.py +129 -0
  45. power_fm_foresight-0.3.0/src/power_fm_foresight/resources/grids.yaml +16 -0
  46. power_fm_foresight-0.3.0/src/power_fm_foresight/resources/julia/Manifest.toml +596 -0
  47. power_fm_foresight-0.3.0/src/power_fm_foresight/resources/julia/Project.toml +14 -0
  48. power_fm_foresight-0.3.0/src/power_fm_foresight/resources/julia/reference.jl +9 -0
  49. power_fm_foresight-0.3.0/src/power_fm_foresight/resources/julia/worker.jl +103 -0
  50. power_fm_foresight-0.3.0/src/power_fm_foresight/resources/networks/LICENSE +31 -0
  51. power_fm_foresight-0.3.0/src/power_fm_foresight/resources/networks/pglib_opf_case30_ieee.m +272 -0
  52. power_fm_foresight-0.3.0/src/power_fm_foresight/resources/protocols/regression.json +18 -0
  53. power_fm_foresight-0.3.0/src/power_fm_foresight/resources/protocols/reproducibility.json +22 -0
  54. power_fm_foresight-0.3.0/src/power_fm_foresight/resources/v3.yaml +187 -0
  55. power_fm_foresight-0.3.0/src/power_fm_foresight/resources/v4.yaml +257 -0
  56. power_fm_foresight-0.3.0/src/power_fm_foresight/scoring.py +197 -0
  57. power_fm_foresight-0.3.0/src/power_fm_foresight/solver.py +3 -0
  58. power_fm_foresight-0.3.0/src/power_fm_foresight/temporal.py +253 -0
  59. power_fm_foresight-0.3.0/src/power_fm_foresight/training.py +11 -0
  60. power_fm_foresight-0.3.0/src/power_fm_foresight/verification.py +181 -0
  61. power_fm_foresight-0.3.0/src/power_fm_foresight.egg-info/PKG-INFO +465 -0
  62. power_fm_foresight-0.3.0/src/power_fm_foresight.egg-info/SOURCES.txt +91 -0
  63. power_fm_foresight-0.3.0/src/power_fm_foresight.egg-info/dependency_links.txt +1 -0
  64. power_fm_foresight-0.3.0/src/power_fm_foresight.egg-info/entry_points.txt +3 -0
  65. power_fm_foresight-0.3.0/src/power_fm_foresight.egg-info/requires.txt +15 -0
  66. power_fm_foresight-0.3.0/src/power_fm_foresight.egg-info/top_level.txt +1 -0
  67. power_fm_foresight-0.3.0/tests/test_a0.py +48 -0
  68. power_fm_foresight-0.3.0/tests/test_adapter.py +89 -0
  69. power_fm_foresight-0.3.0/tests/test_case_identity.py +124 -0
  70. power_fm_foresight-0.3.0/tests/test_cli.py +325 -0
  71. power_fm_foresight-0.3.0/tests/test_config.py +97 -0
  72. power_fm_foresight-0.3.0/tests/test_data.py +128 -0
  73. power_fm_foresight-0.3.0/tests/test_evaluation.py +70 -0
  74. power_fm_foresight-0.3.0/tests/test_evaluation_controls.py +20 -0
  75. power_fm_foresight-0.3.0/tests/test_evidence.py +23 -0
  76. power_fm_foresight-0.3.0/tests/test_final_continuation.py +48 -0
  77. power_fm_foresight-0.3.0/tests/test_fleet.py +69 -0
  78. power_fm_foresight-0.3.0/tests/test_gate_b_diagnostics.py +51 -0
  79. power_fm_foresight-0.3.0/tests/test_model.py +82 -0
  80. power_fm_foresight-0.3.0/tests/test_monitor.py +43 -0
  81. power_fm_foresight-0.3.0/tests/test_multigrid.py +80 -0
  82. power_fm_foresight-0.3.0/tests/test_pilot_repair.py +61 -0
  83. power_fm_foresight-0.3.0/tests/test_pilots.py +109 -0
  84. power_fm_foresight-0.3.0/tests/test_recovery.py +71 -0
  85. power_fm_foresight-0.3.0/tests/test_solver.py +47 -0
  86. power_fm_foresight-0.3.0/tests/test_subset_parity.py +24 -0
  87. power_fm_foresight-0.3.0/tests/test_training.py +37 -0
  88. power_fm_foresight-0.3.0/tests/test_training_chain.py +70 -0
  89. power_fm_foresight-0.3.0/tests/test_v2_diagnosis.py +53 -0
  90. power_fm_foresight-0.3.0/tests/test_v2_harness.py +173 -0
  91. power_fm_foresight-0.3.0/tests/test_v2_stage1.py +122 -0
  92. power_fm_foresight-0.3.0/tests/test_variant_masks.py +31 -0
  93. power_fm_foresight-0.3.0/tests/test_variants.py +15 -0
@@ -0,0 +1,208 @@
1
+ Apache License Version 2.0
2
+ Apache License
3
+
4
+ Version 2.0, January 2004
5
+
6
+ http://www.apache.org/licenses/
7
+
8
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
9
+
10
+ # SOURCE: https://docs.oracle.com/en/industries/hospitality/token-proxy/19.3/lgopi/c_apache_license_version_2.0.htm
11
+
12
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
13
+
14
+ 1. Definitions.
15
+
16
+ "License" shall mean the terms and conditions for use, reproduction,
17
+ and distribution as defined by Sections 1 through 9 of this document.
18
+
19
+ "Licensor" shall mean the copyright owner or entity authorized by
20
+ the copyright owner that is granting the License.
21
+
22
+ "Legal Entity" shall mean the union of the acting entity and all
23
+ other entities that control, are controlled by, or are under common
24
+ control with that entity. For the purposes of this definition,
25
+ "control" means (i) the power, direct or indirect, to cause the
26
+ direction or management of such entity, whether by contract or
27
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
28
+ outstanding shares, or (iii) beneficial ownership of such entity.
29
+
30
+ "You" (or "Your") shall mean an individual or Legal Entity
31
+ exercising permissions granted by this License.
32
+
33
+ "Source" form shall mean the preferred form for making modifications,
34
+ including but not limited to software source code, documentation
35
+ source, and configuration files.
36
+
37
+ "Object" form shall mean any form resulting from mechanical
38
+ transformation or translation of a Source form, including but
39
+ not limited to compiled object code, generated documentation,
40
+ and conversions to other media types.
41
+
42
+ "Work" shall mean the work of authorship, whether in Source or
43
+ Object form, made available under the License, as indicated by a
44
+ copyright notice that is included in or attached to the work
45
+ (an example is provided in the Appendix below).
46
+
47
+ "Derivative Works" shall mean any work, whether in Source or Object
48
+ form, that is based on (or derived from) the Work and for which the
49
+ editorial revisions, annotations, elaborations, or other modifications
50
+ represent, as a whole, an original work of authorship. For the purposes
51
+ of this License, Derivative Works shall not include works that remain
52
+ separable from, or merely link (or bind by name) to the interfaces of,
53
+ the Work and Derivative Works thereof.
54
+
55
+ "Contribution" shall mean any work of authorship, including
56
+ the original version of the Work and any modifications or additions
57
+ to that Work or Derivative Works thereof, that is intentionally
58
+ submitted to Licensor for inclusion in the Work by the copyright owner
59
+ or by an individual or Legal Entity authorized to submit on behalf of
60
+ the copyright owner. For the purposes of this definition, "submitted"
61
+ means any form of electronic, verbal, or written communication sent
62
+ to the Licensor or its representatives, including but not limited to
63
+ communication on electronic mailing lists, source code control systems,
64
+ and issue tracking systems that are managed by, or on behalf of, the
65
+ Licensor for the purpose of discussing and improving the Work, but
66
+ excluding communication that is conspicuously marked or otherwise
67
+ designated in writing by the copyright owner as "Not a Contribution."
68
+
69
+ "Contributor" shall mean Licensor and any individual or Legal Entity
70
+ on behalf of whom a Contribution has been received by Licensor and
71
+ subsequently incorporated within the Work.
72
+
73
+ 2. Grant of Copyright License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ copyright license to reproduce, prepare Derivative Works of,
77
+ publicly display, publicly perform, sublicense, and distribute the
78
+ Work and such Derivative Works in Source or Object form.
79
+
80
+ 3. Grant of Patent License. Subject to the terms and conditions of
81
+ this License, each Contributor hereby grants to You a perpetual,
82
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
83
+ (except as stated in this section) patent license to make, have made,
84
+ use, offer to sell, sell, import, and otherwise transfer the Work,
85
+ where such license applies only to those patent claims licensable
86
+ by such Contributor that are necessarily infringed by their
87
+ Contribution(s) alone or by combination of their Contribution(s)
88
+ with the Work to which such Contribution(s) was submitted. If You
89
+ institute patent litigation against any entity (including a
90
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
91
+ or a Contribution incorporated within the Work constitutes direct
92
+ or contributory patent infringement, then any patent licenses
93
+ granted to You under this License for that Work shall terminate
94
+ as of the date such litigation is filed.
95
+
96
+ 4. Redistribution. You may reproduce and distribute copies of the
97
+ Work or Derivative Works thereof in any medium, with or without
98
+ modifications, and in Source or Object form, provided that You
99
+ meet the following conditions:
100
+
101
+ (a) You must give any other recipients of the Work or
102
+ Derivative Works a copy of this License; and
103
+
104
+ (b) You must cause any modified files to carry prominent notices
105
+ stating that You changed the files; and
106
+
107
+ (c) You must retain, in the Source form of any Derivative Works
108
+ that You distribute, all copyright, patent, trademark, and
109
+ attribution notices from the Source form of the Work,
110
+ excluding those notices that do not pertain to any part of
111
+ the Derivative Works; and
112
+
113
+ (d) If the Work includes a "NOTICE" text file as part of its
114
+ distribution, then any Derivative Works that You distribute must
115
+ include a readable copy of the attribution notices contained
116
+ within such NOTICE file, excluding those notices that do not
117
+ pertain to any part of the Derivative Works, in at least one
118
+ of the following places: within a NOTICE text file distributed
119
+ as part of the Derivative Works; within the Source form or
120
+ documentation, if provided along with the Derivative Works; or,
121
+ within a display generated by the Derivative Works, if and
122
+ wherever such third-party notices normally appear. The contents
123
+ of the NOTICE file are for informational purposes only and
124
+ do not modify the License. You may add Your own attribution
125
+ notices within Derivative Works that You distribute, alongside
126
+ or as an addendum to the NOTICE text from the Work, provided
127
+ that such additional attribution notices cannot be construed
128
+ as modifying the License.
129
+
130
+ You may add Your own copyright statement to Your modifications and
131
+ may provide additional or different license terms and conditions
132
+ for use, reproduction, or distribution of Your modifications, or
133
+ for any such Derivative Works as a whole, provided Your use,
134
+ reproduction, and distribution of the Work otherwise complies with
135
+ the conditions stated in this License.
136
+
137
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
138
+ any Contribution intentionally submitted for inclusion in the Work
139
+ by You to the Licensor shall be under the terms and conditions of
140
+ this License, without any additional terms or conditions.
141
+ Notwithstanding the above, nothing herein shall supersede or modify
142
+ the terms of any separate license agreement you may have executed
143
+ with Licensor regarding such Contributions.
144
+
145
+ 6. Trademarks. This License does not grant permission to use the trade
146
+ names, trademarks, service marks, or product names of the Licensor,
147
+ except as required for describing the origin of the Work and
148
+ reproducing the content of the NOTICE file.
149
+
150
+ 7. Disclaimer of Warranty. Unless required by applicable law or
151
+ agreed to in writing, Licensor provides the Work (and each
152
+ Contributor provides its Contributions) on an "AS IS" BASIS,
153
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
154
+ implied, including, without limitation, any warranties or conditions
155
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
156
+ PARTICULAR PURPOSE. You are solely responsible for determining the
157
+ appropriateness of using or redistributing the Work and assume any
158
+ risks associated with Your exercise of permissions under this License.
159
+
160
+ 8. Limitation of Liability. In no event and under no legal theory,
161
+ whether in tort (including negligence), contract, or otherwise,
162
+ unless required by applicable law (such as deliberate and grossly
163
+ negligent acts) or agreed to in writing, shall any Contributor be
164
+ liable to You for damages, including any direct, indirect, special,
165
+ incidental, or consequential damages of any character arising as a
166
+ result of this License or out of the use or inability to use the
167
+ Work (including but not limited to damages for loss of goodwill,
168
+ work stoppage, computer failure or malfunction, or any and all
169
+ other commercial damages or losses), even if such Contributor
170
+ has been advised of the possibility of such damages.
171
+
172
+ 9. Accepting Warranty or Support. While redistributing
173
+ the Work or Derivative Works thereof, You may choose to offer,
174
+ and charge a fee for, acceptance of support, warranty, indemnity,
175
+ or other liability obligations and/or rights consistent with this
176
+ License. However, in accepting such obligations, You may act only
177
+ on Your own behalf and on Your sole responsibility, not on behalf
178
+ of any other Contributor, and only if You agree to indemnify,
179
+ defend, and hold each Contributor harmless for any liability
180
+ incurred by, or claims asserted against, such Contributor by reason
181
+ of your accepting any such warranty or support.
182
+
183
+ END OF TERMS AND CONDITIONS
184
+
185
+ APPENDIX: How to apply the Apache License to your work.
186
+
187
+ To apply the Apache License to your work, attach the following
188
+ boilerplate notice, with the fields enclosed by brackets "[]"
189
+ replaced with your own identifying information. (Don't include
190
+ the brackets!) The text should be enclosed in the appropriate
191
+ comment syntax for the file format. We also recommend that a
192
+ file or class name and description of purpose be included on the
193
+ same "printed page" as the copyright notice for easier
194
+ identification within third-party archives.
195
+
196
+ Copyright 2026 University of Chicago; Argonne National Laboratory, LLC.
197
+
198
+ Licensed under the Apache License, Version 2.0 (the "License");
199
+ you may not use this file except in compliance with the License.
200
+ You may obtain a copy of the License at
201
+
202
+ http://www.apache.org/licenses/LICENSE-2.0
203
+
204
+ Unless required by applicable law or agreed to in writing, software
205
+ distributed under the License is distributed on an "AS IS" BASIS,
206
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
207
+ See the License for the specific language governing permissions and
208
+ limitations under the License.
@@ -0,0 +1,465 @@
1
+ Metadata-Version: 2.4
2
+ Name: power-fm-foresight
3
+ Version: 0.3.0
4
+ Summary: Probabilistic power-system forecasts with a frozen GENCO model
5
+ License: Apache License Version 2.0
6
+ Apache License
7
+
8
+ Version 2.0, January 2004
9
+
10
+ http://www.apache.org/licenses/
11
+
12
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
13
+
14
+ # SOURCE: https://docs.oracle.com/en/industries/hospitality/token-proxy/19.3/lgopi/c_apache_license_version_2.0.htm
15
+
16
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
17
+
18
+ 1. Definitions.
19
+
20
+ "License" shall mean the terms and conditions for use, reproduction,
21
+ and distribution as defined by Sections 1 through 9 of this document.
22
+
23
+ "Licensor" shall mean the copyright owner or entity authorized by
24
+ the copyright owner that is granting the License.
25
+
26
+ "Legal Entity" shall mean the union of the acting entity and all
27
+ other entities that control, are controlled by, or are under common
28
+ control with that entity. For the purposes of this definition,
29
+ "control" means (i) the power, direct or indirect, to cause the
30
+ direction or management of such entity, whether by contract or
31
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
32
+ outstanding shares, or (iii) beneficial ownership of such entity.
33
+
34
+ "You" (or "Your") shall mean an individual or Legal Entity
35
+ exercising permissions granted by this License.
36
+
37
+ "Source" form shall mean the preferred form for making modifications,
38
+ including but not limited to software source code, documentation
39
+ source, and configuration files.
40
+
41
+ "Object" form shall mean any form resulting from mechanical
42
+ transformation or translation of a Source form, including but
43
+ not limited to compiled object code, generated documentation,
44
+ and conversions to other media types.
45
+
46
+ "Work" shall mean the work of authorship, whether in Source or
47
+ Object form, made available under the License, as indicated by a
48
+ copyright notice that is included in or attached to the work
49
+ (an example is provided in the Appendix below).
50
+
51
+ "Derivative Works" shall mean any work, whether in Source or Object
52
+ form, that is based on (or derived from) the Work and for which the
53
+ editorial revisions, annotations, elaborations, or other modifications
54
+ represent, as a whole, an original work of authorship. For the purposes
55
+ of this License, Derivative Works shall not include works that remain
56
+ separable from, or merely link (or bind by name) to the interfaces of,
57
+ the Work and Derivative Works thereof.
58
+
59
+ "Contribution" shall mean any work of authorship, including
60
+ the original version of the Work and any modifications or additions
61
+ to that Work or Derivative Works thereof, that is intentionally
62
+ submitted to Licensor for inclusion in the Work by the copyright owner
63
+ or by an individual or Legal Entity authorized to submit on behalf of
64
+ the copyright owner. For the purposes of this definition, "submitted"
65
+ means any form of electronic, verbal, or written communication sent
66
+ to the Licensor or its representatives, including but not limited to
67
+ communication on electronic mailing lists, source code control systems,
68
+ and issue tracking systems that are managed by, or on behalf of, the
69
+ Licensor for the purpose of discussing and improving the Work, but
70
+ excluding communication that is conspicuously marked or otherwise
71
+ designated in writing by the copyright owner as "Not a Contribution."
72
+
73
+ "Contributor" shall mean Licensor and any individual or Legal Entity
74
+ on behalf of whom a Contribution has been received by Licensor and
75
+ subsequently incorporated within the Work.
76
+
77
+ 2. Grant of Copyright License. Subject to the terms and conditions of
78
+ this License, each Contributor hereby grants to You a perpetual,
79
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
80
+ copyright license to reproduce, prepare Derivative Works of,
81
+ publicly display, publicly perform, sublicense, and distribute the
82
+ Work and such Derivative Works in Source or Object form.
83
+
84
+ 3. Grant of Patent License. Subject to the terms and conditions of
85
+ this License, each Contributor hereby grants to You a perpetual,
86
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
87
+ (except as stated in this section) patent license to make, have made,
88
+ use, offer to sell, sell, import, and otherwise transfer the Work,
89
+ where such license applies only to those patent claims licensable
90
+ by such Contributor that are necessarily infringed by their
91
+ Contribution(s) alone or by combination of their Contribution(s)
92
+ with the Work to which such Contribution(s) was submitted. If You
93
+ institute patent litigation against any entity (including a
94
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
95
+ or a Contribution incorporated within the Work constitutes direct
96
+ or contributory patent infringement, then any patent licenses
97
+ granted to You under this License for that Work shall terminate
98
+ as of the date such litigation is filed.
99
+
100
+ 4. Redistribution. You may reproduce and distribute copies of the
101
+ Work or Derivative Works thereof in any medium, with or without
102
+ modifications, and in Source or Object form, provided that You
103
+ meet the following conditions:
104
+
105
+ (a) You must give any other recipients of the Work or
106
+ Derivative Works a copy of this License; and
107
+
108
+ (b) You must cause any modified files to carry prominent notices
109
+ stating that You changed the files; and
110
+
111
+ (c) You must retain, in the Source form of any Derivative Works
112
+ that You distribute, all copyright, patent, trademark, and
113
+ attribution notices from the Source form of the Work,
114
+ excluding those notices that do not pertain to any part of
115
+ the Derivative Works; and
116
+
117
+ (d) If the Work includes a "NOTICE" text file as part of its
118
+ distribution, then any Derivative Works that You distribute must
119
+ include a readable copy of the attribution notices contained
120
+ within such NOTICE file, excluding those notices that do not
121
+ pertain to any part of the Derivative Works, in at least one
122
+ of the following places: within a NOTICE text file distributed
123
+ as part of the Derivative Works; within the Source form or
124
+ documentation, if provided along with the Derivative Works; or,
125
+ within a display generated by the Derivative Works, if and
126
+ wherever such third-party notices normally appear. The contents
127
+ of the NOTICE file are for informational purposes only and
128
+ do not modify the License. You may add Your own attribution
129
+ notices within Derivative Works that You distribute, alongside
130
+ or as an addendum to the NOTICE text from the Work, provided
131
+ that such additional attribution notices cannot be construed
132
+ as modifying the License.
133
+
134
+ You may add Your own copyright statement to Your modifications and
135
+ may provide additional or different license terms and conditions
136
+ for use, reproduction, or distribution of Your modifications, or
137
+ for any such Derivative Works as a whole, provided Your use,
138
+ reproduction, and distribution of the Work otherwise complies with
139
+ the conditions stated in this License.
140
+
141
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
142
+ any Contribution intentionally submitted for inclusion in the Work
143
+ by You to the Licensor shall be under the terms and conditions of
144
+ this License, without any additional terms or conditions.
145
+ Notwithstanding the above, nothing herein shall supersede or modify
146
+ the terms of any separate license agreement you may have executed
147
+ with Licensor regarding such Contributions.
148
+
149
+ 6. Trademarks. This License does not grant permission to use the trade
150
+ names, trademarks, service marks, or product names of the Licensor,
151
+ except as required for describing the origin of the Work and
152
+ reproducing the content of the NOTICE file.
153
+
154
+ 7. Disclaimer of Warranty. Unless required by applicable law or
155
+ agreed to in writing, Licensor provides the Work (and each
156
+ Contributor provides its Contributions) on an "AS IS" BASIS,
157
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
158
+ implied, including, without limitation, any warranties or conditions
159
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
160
+ PARTICULAR PURPOSE. You are solely responsible for determining the
161
+ appropriateness of using or redistributing the Work and assume any
162
+ risks associated with Your exercise of permissions under this License.
163
+
164
+ 8. Limitation of Liability. In no event and under no legal theory,
165
+ whether in tort (including negligence), contract, or otherwise,
166
+ unless required by applicable law (such as deliberate and grossly
167
+ negligent acts) or agreed to in writing, shall any Contributor be
168
+ liable to You for damages, including any direct, indirect, special,
169
+ incidental, or consequential damages of any character arising as a
170
+ result of this License or out of the use or inability to use the
171
+ Work (including but not limited to damages for loss of goodwill,
172
+ work stoppage, computer failure or malfunction, or any and all
173
+ other commercial damages or losses), even if such Contributor
174
+ has been advised of the possibility of such damages.
175
+
176
+ 9. Accepting Warranty or Support. While redistributing
177
+ the Work or Derivative Works thereof, You may choose to offer,
178
+ and charge a fee for, acceptance of support, warranty, indemnity,
179
+ or other liability obligations and/or rights consistent with this
180
+ License. However, in accepting such obligations, You may act only
181
+ on Your own behalf and on Your sole responsibility, not on behalf
182
+ of any other Contributor, and only if You agree to indemnify,
183
+ defend, and hold each Contributor harmless for any liability
184
+ incurred by, or claims asserted against, such Contributor by reason
185
+ of your accepting any such warranty or support.
186
+
187
+ END OF TERMS AND CONDITIONS
188
+
189
+ APPENDIX: How to apply the Apache License to your work.
190
+
191
+ To apply the Apache License to your work, attach the following
192
+ boilerplate notice, with the fields enclosed by brackets "[]"
193
+ replaced with your own identifying information. (Don't include
194
+ the brackets!) The text should be enclosed in the appropriate
195
+ comment syntax for the file format. We also recommend that a
196
+ file or class name and description of purpose be included on the
197
+ same "printed page" as the copyright notice for easier
198
+ identification within third-party archives.
199
+
200
+ Copyright 2026 University of Chicago; Argonne National Laboratory, LLC.
201
+
202
+ Licensed under the Apache License, Version 2.0 (the "License");
203
+ you may not use this file except in compliance with the License.
204
+ You may obtain a copy of the License at
205
+
206
+ http://www.apache.org/licenses/LICENSE-2.0
207
+
208
+ Unless required by applicable law or agreed to in writing, software
209
+ distributed under the License is distributed on an "AS IS" BASIS,
210
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
211
+ See the License for the specific language governing permissions and
212
+ limitations under the License.
213
+ Requires-Python: >=3.10
214
+ Description-Content-Type: text/markdown
215
+ License-File: LICENSE
216
+ Requires-Dist: numpy
217
+ Requires-Dist: pandas
218
+ Requires-Dist: PyYAML
219
+ Requires-Dist: scipy
220
+ Requires-Dist: matplotlib
221
+ Requires-Dist: huggingface_hub
222
+ Requires-Dist: pyarrow
223
+ Requires-Dist: OmegaConf<2.4,>=2.3
224
+ Requires-Dist: gridfm-datakit==1.1.0
225
+ Requires-Dist: matpowercaseframes
226
+ Requires-Dist: requests
227
+ Provides-Extra: cuda
228
+ Provides-Extra: xpu
229
+ Dynamic: license-file
230
+
231
+ # GENCO Foresight: Package `power-fm-foresight`
232
+
233
+ <img align="left" width="50%" src="./assets/graph_predict.png" alt="GENCO Foresight prediction graph">
234
+
235
+ <p>• <b>MODEL</b>: Extends pre-trained GENCO from AC-OPF solver to a probabilistic forecaster</p>
236
+ <br>
237
+ <p>• <b>DATA</b>: Temporal dimension from EIA ERCOT 2025, operating-stress calibration for voltage and line events</p>
238
+ <br>
239
+ <p>• <b>TRAINING</b>: Synthetic temporal dataset: 10,080 Ipopt-labeled hours driven by EIA ERCOT 2025 demand</p>
240
+ <br>
241
+ <p>• <b>OPTIMIZER</b> Anticipatory solver warm starts evaluated against cold starts (no solver benefit observed at 2.93× cost)</p>
242
+ <br>
243
+ <p>• <b>SYSTEM</b> Reproducible on Aurora (XPU) HPC and NVIDIA (CUDA) systems, with CPU fallback</p>
244
+
245
+ <br clear="all">
246
+
247
+ The v0.2.0 tag collects all weekend experiments' code and the [run index](RUNS.md).
248
+ The [final consolidation gate](reports/v2/final_consolidation.md) passed the full
249
+ test suite and the existing case30 regression. Failed and budget-capped experiments
250
+ retain their recorded outcomes; this tag does not assert that every training gate passed.
251
+
252
+ ## Motivation
253
+
254
+ ## Method
255
+
256
+ ## Empirical Highlights
257
+
258
+ ## Conclusion
259
+
260
+ ## References
261
+ Below, the key references.
262
+
263
+ [GridFM graphkit](https://gridfm.github.io/gridfm-graphkit/) - A library to train, finetune and interact with a foundation model for the electric power grid. (Puech, et al., 2025).
264
+ ```bash
265
+ @article{puech2025gridfmdatakitv1pythonlibraryscalable,
266
+ title={gridfm-datakit-v1: A Python Library for Scalable and Realistic Power Flow and Optimal Power Flow Data Generation},
267
+ author={Alban Puech and Matteo Mazzonelli and Celia Cintas and Tamara R. Govindasamy and Mangaliso Mngomezulu and Jonas Weiss and Matteo Baù and Anna Varbella and François Mirallès and Kibaek Kim and Le Xie and Hendrik F. Hamann and Etienne Vos and Thomas Brunschwiler},
268
+ journal={arXiv preprint arXiv:2512.14658},
269
+ year={2025},
270
+ url={https://arxiv.org/abs/2512.14658}
271
+ }
272
+ ```
273
+
274
+ [GENCO](https://arxiv.org/abs/2608.09921) - A Unified Neural Solver Embedded in a Development Framework for Steady-State Grid Analysis; (<u>GE</u>ometric <u>N</u>eural <u>C</u>orrective <u>O</u>ptimizer) (Puech et. al, 2026)
275
+
276
+ ```bash
277
+ @article{puech2026gencounifiedneural,
278
+ title={GENCO - A Unified Neural Solver Embedded in a Development Framework for Steady-State Grid Analysis},
279
+ author={Alban Puech and Matteo Mazzonelli and Tamara R. Govindasamy and Mangaliso Mngomezulu and Héctor Maeso-García and Thomas Tolhurst and Javad Bayazi and Ali Moeini and Naomi Simumba and Celia Cintas and David Nelischer and Romeo Kienzler and Jonas Weiss and Anna Varbella and Florian Dörfler and Gabriela Hug and Martin Mevissen and Juan Bernabé-Moreno and François Mirallès and Hendrik F. Hamann and Etienne Vos and Thomas Brunschwiler},
280
+ journal={arXiv preprint arXiv:2608.09921},
281
+ year={2026},
282
+ url={https://arxiv.org/abs/2608.09921}
283
+ }
284
+ ```
285
+
286
+ [IPOPT](https://cepac.cheme.cmu.edu/pasilectures/biegler/ipopt.pdf) - On the implementation of an interior-point filter line-search
287
+ algorithm for large-scale nonlinear programming (Wächter, Biegler, 2005)
288
+
289
+ ```bash
290
+ @article{wachter2006implementation,
291
+ title={On the implementation of an interior-point filter line-search algorithm for large-scale nonlinear programming},
292
+ author={W{\"a}chter, Andreas and Biegler, Lorenz T},
293
+ journal={Mathematical programming},
294
+ volume={106},
295
+ number={1},
296
+ pages={25--57},
297
+ year={2006},
298
+ publisher={Springer}
299
+ }
300
+ ```
301
+
302
+ [PowerModels.jl](https://arxiv.org/abs/1711.01728) - An Open-Source Framework for Exploring Power Flow Formulations (Coffrin, et al., 2017)
303
+ ```bash
304
+ @inproceedings{coffrin2018powermodels,
305
+ title={Powermodels. jl: An open-source framework for exploring power flow formulations},
306
+ author={Coffrin, Carleton and Bent, Russell and Sundar, Kaarthik and Ng, Yeesian and Lubin, Miles},
307
+ booktitle={2018 Power Systems Computation Conference (PSCC)},
308
+ pages={1--8},
309
+ year={2018},
310
+ organization={IEEE}
311
+ }
312
+ ```
313
+
314
+ [ERCO: EIA's Hourly Electric Grid Monitor](https://www.eia.gov/electricity/gridmonitor/dashboard/electric_overview/balancing_authority/ERCO) from the Electric Reliability Council of Texas, Inc. (ERCO)
315
+
316
+ ```bash
317
+ @misc{eia_erco,
318
+ author = {{U.S. Energy Information Administration}},
319
+ title = {Hourly Electric Grid Monitor: Electric Reliability Council of Texas ({ERCO})},
320
+ url = {https://www.eia.gov/electricity/gridmonitor/dashboard/electric_overview/balancing_authority/ERCO},
321
+ note = {Accessed: 2026-10-24}
322
+ }
323
+ ```
324
+
325
+ ## V2 production policy
326
+
327
+ Determinism OFF is **adopted with disclosure** for new V2 production runs; use
328
+ `configs/v2/production.yaml`. Historical v3/v4 configurations and manifests retain
329
+ ON, as do evaluation and resume-mechanism checks. The case30 OFF selection-ES mean
330
+ is 0.290849888 versus 0.285553075 for historical ON seeds (Δ = +0.005296813).
331
+ Mean test ES is 0.307292007 versus 0.300798303 (Δ = +0.006493704); the three-seed
332
+ comparison does not establish statistical equivalence, and some voltage metrics
333
+ also differ. Two OFF seeds exceed the historical selected-ES range. This operational
334
+ adoption does not turn the earlier failed gates into passes. See the complete
335
+ [Stage 1 verdict](reports/v2/stage1_verdict.md), including seed identities, stopping
336
+ reasons, all test metrics and the separate confirmation-job exceedance.
337
+
338
+ ## Multigrid CPU format support
339
+
340
+ The V2 A0 and λ ablations use separate run identities and a 3.3-hour worker cap.
341
+ Apply `configs/v2/a0.yaml`, `lambda01.yaml`, or `lambda10.yaml` as overrides through
342
+ `load_config`; they are not standalone complete configurations. A0 freezes latent
343
+ conditioning and runs GENCO under `no_grad`, then adds final-state innovations and
344
+ recomputes differentiable physics. Its demand head still receives direct demand-ES
345
+ gradients. The conditioned adapter remains the production model. The frozen GENCO
346
+ path and the default adapter forward were checked before these experiments.
347
+
348
+ This repository supports case14, case30, case57, case118, case500, and case2000.
349
+ Select a case with `GENCO_CONFIG=configs/multigrid/case118_ieee.yaml`; the selector
350
+ uses the v4 recipe and separate output paths. `GridSpec` supplies dimensions,
351
+ reference buses, generator mappings, and offline masks.
352
+
353
+ Run `python -m scripts.multigrid_smoke` for CPU loading and formatting checks, then
354
+ `python -m scripts.multigrid_report` to refresh [the support report](reports/multigrid/support.md).
355
+ These checks launch no solver, training, or PBS job. Bulk artifacts stay on `/lus/flare`;
356
+ the existing Torch/Transformers environment is retained.
357
+
358
+ ## Python package
359
+
360
+ The distribution is `power-fm-foresight` (development version 0.3.0.dev0); import it as
361
+ `power_fm_foresight`. The Python API is also exposed by the five `pff` verbs below.
362
+ `genco`, `temporal`, `grids`, `data`, `solver`, `scoring`, and `training` expose
363
+ existing implementations. Private submodules retain the original module boundaries.
364
+ Experiment drivers, PBS scripts, gates and controllers live in `experiments/`
365
+ and are excluded from the wheel. Historical module paths remain deprecated aliases.
366
+ Install the package before using those paths from a checkout.
367
+
368
+ ### Install matrix
369
+
370
+ Provision the torch stack first. Torch, PyG, scatter and Graphkit are deliberately
371
+ absent from `install_requires`; `[cuda]` and `[xpu]` are empty selection markers.
372
+ The commands below are pinned installation recipes. The packaging gate runs on
373
+ Aurora; CUDA and CPU wheel compatibility is documented, not hardware-validated here.
374
+ See the [PyTorch version matrix](https://pytorch.org/get-started/previous-versions/)
375
+ and [PyG wheel matrix](https://pytorch-geometric.readthedocs.io/en/stable/notes/installation.html).
376
+
377
+ | Target | Python | Torch stack | Installation policy |
378
+ | --- | --- | --- | --- |
379
+ | CUDA 12.8 | 3.12 | Torch 2.10.0, PyG 2.8.0, scatter 2.1.2 | Fresh environment, commands below |
380
+ | CPU | 3.12 | Torch 2.10.0, PyG 2.8.0, scatter 2.1.2 | CPU wheels, commands below |
381
+ | Aurora XPU | vendor 3.12.12 | Torch 2.13.0a0+gitcf30153, PyG 2.8.0.post1, scatter 2.1.2 | Preserve frameworks/2026.1.0 and base constraints |
382
+
383
+ CUDA, optionally after `conda env create -f environment-cuda.yml` and
384
+ `conda activate power-fm-foresight-cuda`:
385
+
386
+ ```bash
387
+ python -m pip install torch==2.10.0 torchvision==0.25.0 torchaudio==2.10.0 --index-url https://download.pytorch.org/whl/cu128
388
+ python -m pip install torch-geometric==2.8.0
389
+ python -m pip install --no-deps torch-scatter==2.1.2 -f https://data.pyg.org/whl/torch-2.10.0+cu128.html
390
+ ```
391
+
392
+ CPU in a fresh Python 3.12 environment:
393
+
394
+ ```bash
395
+ python -m pip install torch==2.10.0 torchvision==0.25.0 torchaudio==2.10.0 --index-url https://download.pytorch.org/whl/cpu
396
+ python -m pip install torch-geometric==2.8.0
397
+ python -m pip install --no-deps torch-scatter==2.1.2 -f https://data.pyg.org/whl/torch-2.10.0+cpu.html
398
+ ```
399
+
400
+ For either fresh environment, install the existing GENCO runtime prerequisites
401
+ and Graphkit without allowing it to replace the chosen torch stack:
402
+
403
+ ```bash
404
+ python -m pip install lightning==2.6.6 opt-einsum==3.4.0 seaborn==0.13.2 plotly==7.1.0
405
+ python -m pip install --no-deps "gridfm-graphkit @ git+https://github.com/gridfm/gridfm-graphkit.git@f104900245cba26d1380037eea562cf633a97484"
406
+ python -m pip install -e .
407
+ ```
408
+
409
+ Aurora uses the existing frameworks modules and environment. Do not install a
410
+ PyPI torch wheel or upgrade vendor torch, Transformers or their dependencies.
411
+ The installed PyG is a vendor build, not a request to fetch that version from PyPI.
412
+ For a new Aurora environment, follow [the recorded installation](install_on_aurora.md)
413
+ and preserve its `base-constraints.txt`/`PIP_CONSTRAINT` policy:
414
+
415
+ ```bash
416
+ # Only if absent, use the recorded vendor PyG source/build, not a CUDA wheel.
417
+ # Scatter is built against the active vendor torch:
418
+ MAX_JOBS=2 python -m pip install --no-deps --no-build-isolation --no-binary=torch-scatter torch-scatter==2.1.2
419
+ # Graphkit needs newer isolated build tools; the runtime environment stays constrained.
420
+ env -u PIP_CONSTRAINT python -m pip install --no-deps "gridfm-graphkit @ git+https://github.com/gridfm/gridfm-graphkit.git@f104900245cba26d1380037eea562cf633a97484"
421
+ python -m pip install --no-deps --no-build-isolation -e .
422
+ ```
423
+
424
+ The Aurora module setup is recorded in `experiments/package/verify.pbs`.
425
+ These commands are instructions for provisioning, not permission to replace
426
+ packages in a working vendor environment. Existing runtime dependencies,
427
+ including OmegaConf, Datakit, matpowercaseframes and requests, are declared in
428
+ `pyproject.toml`. Graphkit's optional CLI/evaluator extras remain separate.
429
+ Ipopt uses the packaged pinned Julia project and an explicitly configured Julia
430
+ executable/depot; installing the wheel does not install Julia or download assets.
431
+
432
+ Packaged recipes use `PFF_ROOT` as the bulk storage root and `PFF_JULIA` and
433
+ `PFF_JULIA_DEPOT` for the solver. Explicit legacy configs retain their original
434
+ `${base}` interpolation and paths. With a wheel, the default remains the v3 recipe;
435
+ choose the packaged v4 recipe explicitly:
436
+
437
+ ```python
438
+ from importlib.resources import files
439
+ from power_fm_foresight.data import load_config
440
+ from power_fm_foresight.grids import grid_config, registry
441
+
442
+ recipe = files("power_fm_foresight").joinpath("resources/v4.yaml")
443
+ config = load_config(recipe)
444
+ case = registry()["case_ids"][30]
445
+ config = grid_config(case, config)
446
+ ```
447
+
448
+ Set `PFF_ROOT`, `PFF_JULIA` and `PFF_JULIA_DEPOT` before resolving a packaged
449
+ recipe, or supply explicit path overrides. Package import itself does not need
450
+ these variables. New manifests hash the relocated source; historical manifests
451
+ are never rewritten and incompatible training resumes remain rejected.
452
+
453
+ ## pff CLI (0.3.0.dev0)
454
+
455
+ `pff` and `power-fm-foresight` invoke the same five argparse commands:
456
+ `prepare`, `train`, `evaluate`, `report`, and `verify`. Run `pff VERB --help` for the
457
+ supported flags. Configuration precedence is command flags, then `--config` YAML,
458
+ then the recipe. Each command records its effective configuration, package/source
459
+ identity, device, seeds and paths. The package has no PBS submission backend.
460
+
461
+ [Weekend reproduction commands](experiments/README.md) cover the fleet, deeper
462
+ ensembles, A0, lambda sweep and pilots, plus the external Aurora wrapper. Reports
463
+ use persisted results only. CLI verification is documented in
464
+ [the Phase 3 report](reports/package/phase3.md). This development phase does not
465
+ publish a wheel to TestPyPI or PyPI.