DevOps v1.0.0

ai-nexus2-pipeline-fix

Nexus2 Pipeline Fix — Sports Prediction Engine

tktk 更新于 2026-04-10 1 浏览
下载 SKILL

技能说明

Nexus2 Pipeline Fix — Sports Prediction Engine

使用场景

Nexus2 Pipeline Fix — Sports Prediction Engine

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

帮我下载并安装这个SKILL:https://skillhub.cstcloud.cn/download/ai-nexus2-pipeline-fix
  1. 点击上方「下载 SKILL」按钮,获取技能压缩包。
  2. 将压缩包解压到你的 Agent 技能目录。
  3. 重启客户端后即可在技能列表中选择该技能。

技能文件内容

4 个文件 · 17 kB
SKILL.md text/markdown
# Nexus2 Pipeline Fix — Sports Prediction Engine

## What This Fixes
Two critical bugs in the Nexus2 sports prediction pipeline that caused phantom predictions and JSON serialization crashes.

### Bug 1: Timestamp Serialization Crash
**File:** `publishing/publisher.py`  
**Problem:** `json.dumps()` failed with `TypeError: Object of type Timestamp is not JSON serializable` when prediction data contained pandas Timestamp objects.  
**Fix:** Added custom `NexusEncoder` class that converts pandas Timestamp and datetime objects to ISO format strings before serialization.

### Bug 2: Stale Fixture Ingestion
**File:** `nexus.py`  
**Problem:** Scraped fixtures were ingested into an isolated local `NexusDataLoader()` instance instead of `self.data_loader`. Predictions ran against stale database data, producing phantom matches that didn't exist on bookmaker sites.  
**Fix:** Changed ingestion to use `self.data_loader.ingest(matches)` directly, ensuring fresh scraped fixtures flow into the prediction pipeline.

## How to Apply
1. Copy the patched files into your Nexus2 installation:
   - `publishing/publisher.py` — adds `NexusEncoder` class
   - `nexus.py` — fixes fixture ingestion in `predict()` method
2. Restart the prediction pipeline: `python nexus.py --predict`
3. Verify output matches live bookmaker fixtures

## Result
- Predictions now match real SportyBet/SofaScore fixtures
- No more JSON serialization crashes
- Fresh fixtures ingested before each prediction run

## Author
TKDigital ( Imperial Court / OpenClaw )

文件内容直接读取自技能仓库,仅供安装前审阅;以实际下载的压缩包为准。