小明同学 102e38a620 Update test file 2 weeks ago
..
configs 01e3c17bcb 重新组织功率预测模块目录 2 weeks ago
docs 102e38a620 Update test file 2 weeks ago
examples 102e38a620 Update test file 2 weeks ago
models 01e3c17bcb 重新组织功率预测模块目录 2 weeks ago
output 102e38a620 Update test file 2 weeks ago
pv_forecast 102e38a620 Update test file 2 weeks ago
test_data 102e38a620 Update test file 2 weeks ago
tests 102e38a620 Update test file 2 weeks ago
.DS_Store 102e38a620 Update test file 2 weeks ago
README.md 102e38a620 Update test file 2 weeks ago
SHA256SUMS.json 102e38a620 Update test file 2 weeks ago
config.json 102e38a620 Update test file 2 weeks ago
deployment_config.json 01e3c17bcb 重新组织功率预测模块目录 2 weeks ago
input_schema.json 01e3c17bcb 重新组织功率预测模块目录 2 weeks ago
install.sh 102e38a620 Update test file 2 weeks ago
pv_inputs.py 102e38a620 Update test file 2 weeks ago
pv_io.py 102e38a620 Update test file 2 weeks ago
requirements.txt 102e38a620 Update test file 2 weeks ago
run.py 102e38a620 Update test file 2 weeks ago
run.sh 102e38a620 Update test file 2 weeks ago
test.sh 102e38a620 Update test file 2 weeks ago
test_deployment.py 102e38a620 Update test file 2 weeks ago
ultra_short_pv.py 102e38a620 Update test file 2 weeks ago
超短期光伏预测部署文档.docx 102e38a620 Update test file 2 weeks ago
输入输出与接入说明.md 102e38a620 Update test file 2 weeks ago

README.md

超短期光伏预测交付包

统一E10-A,三站独立参数。交付给A封装FastAPI,模型权重不变。

部署与验证

在本目录执行:

bash install.sh
bash test.sh

出现“部署测试通过”且退出码0即通过;报告为output/deployment_test.json。 已有Python 3.10环境可用 PYTHON_BIN=/path/to/python bash test.sh。

运行一次实际预测

修改config.json,填写场站、起报时间、功率CSV、EC目录、EC接收记录和输出目录,然后执行:

bash run.sh

输出在output,16行,单位kW、三位小数、北京时间。配置中的数据路径是示例,需要替换。

A的Python调用

from ultra_short_pv import PVForecaster
model = PVForecaster("JMJD01")  # 服务启动时加载一次
result = model.predict(issue_time, power_history, future_raw)

历史数组48×7,未来数组16×20,列顺序见input_schema.json。返回可序列化为JSON的字典,含16个预测点。CSV预处理可复用pv_inputs.prepare_from_csv,见run.py。

  • 模型及原源码:models/、pv_forecast/。
  • 调用样例:examples/call_model.py。
  • 部署说明:docs/超短期光伏预测部署文档.docx。
  • 特征字段:docs/输入输出与接入说明.md。

本包不启动HTTP服务;FastAPI、调度和写库由A接入。不要改名pv_forecast或混用其他实验权重。