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

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或混用其他实验权重。