wilsonwangwang commited on
Commit
b4aa26d
·
verified ·
1 Parent(s): 8422007

Delete gap_supplement/GAP_SUPPLEMENT_README.md with huggingface_hub

Browse files
gap_supplement/GAP_SUPPLEMENT_README.md DELETED
@@ -1,23 +0,0 @@
1
- # Gap 补充数据说明(trades_fix_gap / quant_fix_gap / users_fix_gap)
2
-
3
- ## 背景
4
-
5
- - 上游 Hugging Face `orderfilled` 与链上 `OrderFilled` 存在**稀疏或未收录**区块;开源仓库 `Polymarket_data` 通过 RPC 按区间拉取两合约日志并解码,得到与 `format_batch` 一致的 parquet(本地命名 `gap_<start>_<end>.parquet` 等)。
6
- - 本目录下 `trades_fix_gap.parquet` 等为**单文件或少量 gap 样本**走仓库**原有** `extract_trades` → `clean_trades_df` / `clean_users_df` 的产物,用于验证管线及向 `Polymarket_data_fixed` 数据集增量补充。
7
-
8
- ## 处理方法(与仓库一致)
9
-
10
- 1. 读取 gap 行(OrderFilled 解码列,17 列)。
11
- 2. `polymarket.processors.trades.extract_trades`(可选 `load_token_mapping(markets.parquet)`)。
12
- 3. `polymarket.processors.cleaner.clean_trades_df` → quant;`clean_users_df` → users。
13
- 4. 去重键与仓库一致:trades 侧常用 `(timestamp, transaction_hash, maker, taker)`(见生成脚本)。
14
-
15
- ## 使用
16
-
17
- - 本地生成:`python3 update_utils/gap_sample_to_trades_quant_users_hf.py ...`
18
- - 上传:设置 `HF_TOKEN` 后加 `--push`;勿将 token 写入仓库。
19
- - 仅上传(轻量环境):`/path/to/.venv/bin/python update_utils/gap_sample_to_trades_quant_users_hf.py --upload-only`
20
-
21
- ## 与全量合并
22
-
23
- 将 `trades_fix_gap.parquet` 与全量 `trades.parquet` 纵向合并后按主键去重,再重新跑 quant/users 全量构建,可得到更完整的面板数据(本脚本仅演示单 gap 样本)。