eggfuse 0.2.1__py3-none-any.whl
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.
- eggfuse/__init__.py +1 -0
- eggfuse/ripsat/__init__.py +1 -0
- eggfuse/ripsat/__main__.py +4 -0
- eggfuse/ripsat/assets/calculus.egg +31 -0
- eggfuse/ripsat/assets/calculus.json +1 -0
- eggfuse/ripsat/assets/comparison.html +12 -0
- eggfuse/ripsat/assets/corpus_worker.rs +122 -0
- eggfuse/ripsat/batching.py +91 -0
- eggfuse/ripsat/cli.py +120 -0
- eggfuse/ripsat/data.py +476 -0
- eggfuse/ripsat/device_tmp.py +35 -0
- eggfuse/ripsat/encoding.py +41 -0
- eggfuse/ripsat/evaluation.py +174 -0
- eggfuse/ripsat/graphs.py +210 -0
- eggfuse/ripsat/model.py +222 -0
- eggfuse/ripsat/native.py +97 -0
- eggfuse/ripsat/rollout.py +133 -0
- eggfuse/ripsat/sampling.py +84 -0
- eggfuse/ripsat/training.py +265 -0
- eggfuse/ripsat/viz.py +175 -0
- eggfuse-0.2.1.dist-info/METADATA +133 -0
- eggfuse-0.2.1.dist-info/RECORD +40 -0
- eggfuse-0.2.1.dist-info/WHEEL +5 -0
- eggfuse-0.2.1.dist-info/entry_points.txt +2 -0
- eggfuse-0.2.1.dist-info/top_level.txt +2 -0
- ripsat/__init__.py +1 -0
- ripsat/__main__.py +4 -0
- ripsat/batching.py +7 -0
- ripsat/cli.py +7 -0
- ripsat/data.py +7 -0
- ripsat/device_tmp.py +7 -0
- ripsat/encoding.py +7 -0
- ripsat/evaluation.py +7 -0
- ripsat/graphs.py +7 -0
- ripsat/model.py +7 -0
- ripsat/native.py +7 -0
- ripsat/rollout.py +7 -0
- ripsat/sampling.py +7 -0
- ripsat/training.py +7 -0
- ripsat/viz.py +7 -0
eggfuse/ripsat/viz.py
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
"""Standalone, offline graph and request comparison in the reference e-class namespace."""
|
|
2
|
+
|
|
3
|
+
import gzip
|
|
4
|
+
import json
|
|
5
|
+
import shutil
|
|
6
|
+
import subprocess
|
|
7
|
+
from html import escape
|
|
8
|
+
from itertools import islice
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
|
|
11
|
+
from .graphs import canonical, matched_rows, runtime_rows
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def read_comparison(evaluation, index=0):
|
|
15
|
+
if index < 0:
|
|
16
|
+
raise ValueError("index must be nonnegative")
|
|
17
|
+
with gzip.open(Path(evaluation) / "comparisons.jsonl.gz", "rt") as src:
|
|
18
|
+
row = next(islice(src, index, None), None)
|
|
19
|
+
if row is None:
|
|
20
|
+
raise IndexError(f"No comparison at index {index}")
|
|
21
|
+
return json.loads(row)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _diagram(rows):
|
|
25
|
+
"""Draw native e-classes with their member expressions and ordered dependencies."""
|
|
26
|
+
if not shutil.which("dot"):
|
|
27
|
+
return ""
|
|
28
|
+
from collections import defaultdict
|
|
29
|
+
|
|
30
|
+
groups = defaultdict(list)
|
|
31
|
+
for op, args, cls in runtime_rows(rows):
|
|
32
|
+
groups[cls].append((op, args))
|
|
33
|
+
classes = {c: i for i, c in enumerate(groups)}
|
|
34
|
+
dot = [
|
|
35
|
+
'digraph G {rankdir=LR; graph [bgcolor="transparent"]; node [fontname="Helvetica",fontsize=10];'
|
|
36
|
+
]
|
|
37
|
+
for cls, members in groups.items():
|
|
38
|
+
i = classes[cls]
|
|
39
|
+
dot.append(
|
|
40
|
+
f'subgraph cluster_{i} {{ label={json.dumps(str(cls))}; color="#b9c8d4";'
|
|
41
|
+
)
|
|
42
|
+
for j, (op, args) in enumerate(members):
|
|
43
|
+
literal = op in ("RipenInput", "Const", "Var")
|
|
44
|
+
name = op + (" " + str(args[0]) if literal and args else "")
|
|
45
|
+
dot.append(f"n{i}_{j} [label={json.dumps(name)}, shape=box];")
|
|
46
|
+
dot.append("}")
|
|
47
|
+
for cls, members in groups.items():
|
|
48
|
+
for j, (op, args) in enumerate(members):
|
|
49
|
+
if op not in ("RipenInput", "Const", "Var"):
|
|
50
|
+
for k, arg in enumerate(args):
|
|
51
|
+
dot.append(
|
|
52
|
+
f'n{classes[cls]}_{j} -> n{classes[arg]}_0 [label="{k}",fontsize=8];'
|
|
53
|
+
)
|
|
54
|
+
svg = subprocess.run(
|
|
55
|
+
["dot", "-Tsvg"],
|
|
56
|
+
input="\n".join(dot + ["}"]),
|
|
57
|
+
text=True,
|
|
58
|
+
capture_output=True,
|
|
59
|
+
check=True,
|
|
60
|
+
).stdout
|
|
61
|
+
return (
|
|
62
|
+
'<details><summary>查看 e-graph 接线图</summary><div class="diagram">'
|
|
63
|
+
+ svg[svg.index("<svg") :].strip()
|
|
64
|
+
+ "</div></details>"
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def visualize(world, completion, output):
|
|
69
|
+
"""Render the initial graph, verified closure, model progress and exact signed tape."""
|
|
70
|
+
reference = runtime_rows(world["final"])
|
|
71
|
+
initial = runtime_rows(world["initial"])
|
|
72
|
+
if completion["windows"] and canonical(
|
|
73
|
+
runtime_rows(completion["windows"][0]["before"]), pin_boundaries=True
|
|
74
|
+
) != canonical(initial, pin_boundaries=True):
|
|
75
|
+
raise ValueError("Completion was generated from a different initial graph")
|
|
76
|
+
|
|
77
|
+
def ordered(rows):
|
|
78
|
+
return sorted(
|
|
79
|
+
matched_rows(runtime_rows(rows), reference),
|
|
80
|
+
key=lambda x: (str(x[1]), x[0][0], repr(x[0][1])),
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
def formatted(row):
|
|
84
|
+
(op, args), cls = row
|
|
85
|
+
return f"{cls} ← {op}({', '.join(map(str, args))})"
|
|
86
|
+
|
|
87
|
+
base = set(ordered(world["initial"]))
|
|
88
|
+
targets = ordered(world["final"])
|
|
89
|
+
windows = completion["windows"]
|
|
90
|
+
states = [w["before"] for w in windows] + [completion["final"]]
|
|
91
|
+
gains = dict(completion["credit"]["origins"])
|
|
92
|
+
|
|
93
|
+
def table(rows, missing=frozenset()):
|
|
94
|
+
return (
|
|
95
|
+
"<ul>"
|
|
96
|
+
+ "".join(
|
|
97
|
+
'<li class="'
|
|
98
|
+
+ ("missing" if r in missing else "base" if r in base else "new")
|
|
99
|
+
+ '">'
|
|
100
|
+
+ escape(formatted(r))
|
|
101
|
+
+ "</li>"
|
|
102
|
+
for r in rows
|
|
103
|
+
)
|
|
104
|
+
+ "</ul>"
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
def raw_graph(rows):
|
|
108
|
+
return (
|
|
109
|
+
"<details><summary>本图原生 e-class 与字段</summary><pre>"
|
|
110
|
+
+ escape(json.dumps(runtime_rows(rows), ensure_ascii=False, indent=1))
|
|
111
|
+
+ "</pre></details>"
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
panels = []
|
|
115
|
+
reference_diagram = _diagram(world["final"])
|
|
116
|
+
for i, state in enumerate(states):
|
|
117
|
+
actual = ordered(state)
|
|
118
|
+
missing = set(targets) - set(actual)
|
|
119
|
+
current = windows[i] if i < len(windows) else None
|
|
120
|
+
if current:
|
|
121
|
+
run = current["run"]
|
|
122
|
+
requests = [t for t in completion["tape"] if t["run"] == run]
|
|
123
|
+
caption = f"Run {run} · 发布后,签发前"
|
|
124
|
+
trace = (
|
|
125
|
+
"END"
|
|
126
|
+
if current["end"]
|
|
127
|
+
else f"{len(current['raw'])} 提案,{len(requests)} 枚付费请求"
|
|
128
|
+
)
|
|
129
|
+
else:
|
|
130
|
+
requests = []
|
|
131
|
+
caption = "执行终图"
|
|
132
|
+
trace = f"{completion['reason']} · 共 {len(completion['tape'])} 枚付费请求"
|
|
133
|
+
tokens = [
|
|
134
|
+
f"#{t['token']} rule {t['rule']} ("
|
|
135
|
+
+ ", ".join(
|
|
136
|
+
f"{p['address']['token']}.{p['address']['op']}@v{p['version']}"
|
|
137
|
+
for p in t["parents"]
|
|
138
|
+
)
|
|
139
|
+
+ f") · 有效操作 {gains.get(t['token'], 0)}"
|
|
140
|
+
for t in requests
|
|
141
|
+
]
|
|
142
|
+
panels.append(
|
|
143
|
+
f'<section class="step" {"hidden" if i + 1 < len(states) else ""}><h2>{caption}</h2><p>{escape(trace)}</p><pre>{escape(chr(10).join(tokens))}</pre><div class="cols"><article><h3>原生参考终图 · {len(targets)} 行</h3>{table(targets, missing)}{reference_diagram}</article><article><h3>模型已产生 · {len(actual)} 行</h3>{table(actual)}{_diagram(state)}{raw_graph(state)}</article></div></section>'
|
|
144
|
+
)
|
|
145
|
+
exact = canonical(reference, pin_boundaries=True) == canonical(
|
|
146
|
+
runtime_rows(completion["final"]), pin_boundaries=True
|
|
147
|
+
)
|
|
148
|
+
original = f"<details><summary>原始输入 · {len(base)} 行</summary><pre>{escape(world.get('entry', ''))}</pre>{table(sorted(base, key=repr))}{_diagram(world['initial'])}{raw_graph(world['initial'])}</details>"
|
|
149
|
+
reference_raw = (
|
|
150
|
+
"<details><summary>Teacher 原始终图及具名请求</summary>"
|
|
151
|
+
+ raw_graph(world["final"])
|
|
152
|
+
)
|
|
153
|
+
if "teacher_requests" in world:
|
|
154
|
+
reference_raw += (
|
|
155
|
+
"<pre>"
|
|
156
|
+
+ escape(
|
|
157
|
+
json.dumps(world["teacher_requests"], ensure_ascii=False, indent=1)
|
|
158
|
+
)
|
|
159
|
+
+ "</pre>"
|
|
160
|
+
)
|
|
161
|
+
reference_raw += "</details>"
|
|
162
|
+
markup = Path(__file__).with_name("assets").joinpath("comparison.html").read_text()
|
|
163
|
+
import string
|
|
164
|
+
|
|
165
|
+
markup = string.Template(markup).substitute(
|
|
166
|
+
uid=escape(world["uid"]),
|
|
167
|
+
status="整图饱和" if exact else "尚未达到参考终图",
|
|
168
|
+
original=original,
|
|
169
|
+
reference=reference_raw,
|
|
170
|
+
panels="".join(panels),
|
|
171
|
+
)
|
|
172
|
+
output = Path(output)
|
|
173
|
+
output.parent.mkdir(parents=True, exist_ok=True)
|
|
174
|
+
output.write_text(markup, encoding="utf-8")
|
|
175
|
+
return output.resolve()
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: eggfuse
|
|
3
|
+
Version: 0.2.1
|
|
4
|
+
Summary: Native-verified e-graph saturation with PyTorch Cell Completion
|
|
5
|
+
Project-URL: Repository, https://github.com/MilkBlock/eggfuse
|
|
6
|
+
Project-URL: Documentation, https://github.com/MilkBlock/eggfuse/blob/main/benchmarks/ripsat-cell-completion/PACKAGE.md
|
|
7
|
+
Requires-Python: >=3.11
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
Requires-Dist: numpy
|
|
10
|
+
Requires-Dist: torch>=2.2
|
|
11
|
+
Requires-Dist: igraph==1.0.0
|
|
12
|
+
Provides-Extra: tracking
|
|
13
|
+
Requires-Dist: swanlab[dashboard]>=0.10.6; extra == "tracking"
|
|
14
|
+
|
|
15
|
+
# EggFuse Python 包
|
|
16
|
+
|
|
17
|
+
发行包名为 `eggfuse`。八规则微积分的单 Ruleset Completion 位于 `eggfuse.ripsat` 子包,命令行入口为 `ripsat`。给定初始 e-graph,PyTorch Transformer + Dynamic Pointer 提案完整具名 Cell;EggFuse 执行并发布下一轮公开状态。训练使用 Random Subset Completion、普通完整 Cell CE 和经原生确认的 END。
|
|
18
|
+
|
|
19
|
+
## 安装及工具链
|
|
20
|
+
|
|
21
|
+
从 PyPI 安装发布版使用 `python -m pip install eggfuse`。从仓库根目录安装开发版:
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
python -m pip install ./benchmarks/ripsat-cell-completion
|
|
25
|
+
ripsat --help
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
从旧发行包迁移时,先运行 `python -m pip uninstall eggfuse-ripsat`,再执行上面的安装命令。两个发行包共用旧导入路径和命令行文件。新版保留 `from ripsat...` 的兼容导入,新的代码示例统一使用 `eggfuse.ripsat`。
|
|
29
|
+
|
|
30
|
+
Python 包需要 Python 3.11 或更高版本。采集使用 POSIX 文件锁,本次端到端验证平台是 macOS arm64。Wheel 含模型、完整推理及训练代码、固定 Recipe 的编译 IR、对应的 .egg 与 Rust worker 源码。独立图校验依赖 egglog CLI。权重、采集的数据、Rust 二进制分别存放。
|
|
31
|
+
|
|
32
|
+
- **使用已有数据训练**只需要 Python 包。训练直接读取经过核验的分片。
|
|
33
|
+
- **采集**需要 egglog 在 PATH 上,并提供 EggFuse worker。**自主执行和原生重放**只需要该 worker。可以直接设置 `RIPSAT_WORKER`,指向已有的 `ripsat-window-worker`。
|
|
34
|
+
- **从源码构建 worker** 时,使用支持具名请求、窗口快照和原生审计的 EggFuse research checkout。可使用已验证的公开提交 [505a8a8f](https://github.com/MilkBlock/eggfuse/tree/505a8a8f6f3d4aff43826daca773fe100f2c0b78)。命令输出编译后的绝对路径。Cargo 构建目录以及数据目录可放在外置盘。
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
ripsat build-worker "$EGGFUSE_CHECKOUT" "$BUILD"
|
|
38
|
+
export RIPSAT_WORKER="$BUILD/target/release/ripsat-window-worker"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## 直接使用 PyTorch
|
|
42
|
+
|
|
43
|
+
数据、模型和原生执行可以分别使用。已有分片可直接读成 map-style 样本列表,传给自己的 DataLoader。下面是参考模型的完整训练步骤;优化器、设备、批大小、采样器和保存时机由调用方控制。
|
|
44
|
+
|
|
45
|
+
```python
|
|
46
|
+
import json
|
|
47
|
+
from pathlib import Path
|
|
48
|
+
import torch
|
|
49
|
+
from torch.utils.data import DataLoader
|
|
50
|
+
from eggfuse.ripsat.batching import load_states, collate_cells
|
|
51
|
+
from eggfuse.ripsat.model import CalculusPointer
|
|
52
|
+
|
|
53
|
+
root = Path("dataset")
|
|
54
|
+
core = json.loads((root / "data/program.json").read_bytes())["source_core"]
|
|
55
|
+
model = CalculusPointer(len(core["tables"]), len(core["rulesets"][0]["rules"]), use_end=True)
|
|
56
|
+
loader = DataLoader(load_states(root), batch_size=64, shuffle=True, collate_fn=collate_cells)
|
|
57
|
+
optimizer = torch.optim.AdamW(model.parameters(), lr=5e-4)
|
|
58
|
+
|
|
59
|
+
for batch in loader:
|
|
60
|
+
weights = batch.pop("weights")
|
|
61
|
+
optimizer.zero_grad(set_to_none=True)
|
|
62
|
+
log_p = model(**batch)
|
|
63
|
+
loss = -(log_p * weights).sum() / len(batch["rows"])
|
|
64
|
+
loss.backward()
|
|
65
|
+
optimizer.step()
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
`collate_cells` 只做领域相关的整理:随机抽取本窗口的草稿子集,将公开端口补齐为 `rows[B,N,F]`,将 `draft` 与剩余 `targets` 写成整型张量,每行是 `(batch_index, rule, *parent_indices)`;短接口在右端用 −1 补齐。`end_states` 给出经核验的终态索引。参考模型用 Teacher Forcing 返回每个剩余完整 Cell 的联合 log 概率,再接各个 END 的 log 概率。`weights` 给同一状态的剩余目标均分权重,终态权重为 1,因此上面一行负对数似然保持原实验的逐状态 CE。仅调用 `model(rows)` 仍可读到该模型的 Memory 表示。
|
|
69
|
+
|
|
70
|
+
自定义模型可以直接消费这些张量,也可以给 DataLoader 传自己的 `collate_fn`。八规则参考模型采用二父解码;数据整理保留实际父数。仓库中 [可执行的训练示例](https://github.com/MilkBlock/eggfuse/blob/main/benchmarks/ripsat-cell-completion/examples/train_torch.py) 展示了设备放置和标准 `state_dict` 的保存。
|
|
71
|
+
|
|
72
|
+
要让自己的模型走原生执行,可传入 `complete(model.eval(), initial, policy=sample)`,或 `evaluate(root, model.eval(), output, policy=sample)`。普通函数 `sample(model, public_frame, capacity, generator)` 返回不超过容量的非空提案列表(等长时也可直接返回整型 Tensor),每项是 `(rule, *parent_indices)`,或返回 `None` 表示 END。父索引按当前 `public_frame["updates"]` 的顺序编号。包负责同窗完全相同请求的合并、解析具名地址、签发与计量。回调只读取公开帧;参考终图只参与离线比较。内置采集、整图评分与 checkpoint 预设当前在八规则微积分上验收。
|
|
73
|
+
|
|
74
|
+
## 从采集到图对照
|
|
75
|
+
|
|
76
|
+
将 DATA 和 RUN 设为可写路径。以下为快速贯通示例;研究配置使用至少 500,000 次完整 Cell 曝光。训练和评估各使用新的输出目录。复用相同采集配置时,采集会读取已完成的分片并续写。
|
|
77
|
+
|
|
78
|
+
```sh
|
|
79
|
+
ripsat collect "$DATA" --train 32 --validation 8 --test 8 --jobs 2
|
|
80
|
+
ripsat verify "$DATA" --split train
|
|
81
|
+
ripsat train "$DATA" "$RUN/model" --worlds 32 --size 20k --batch 16 --exposure 1024
|
|
82
|
+
ripsat evaluate "$DATA" "$RUN/model" "$RUN/test" --budget 64 --seed 193
|
|
83
|
+
ripsat compare "$RUN/test" "$RUN/comparison.html" --index 0
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
在浏览器打开 `comparison.html`。默认显示模型停止时的结果;用 ← / → 回看每个原生发布窗口、模型当时提交的具体 Token、父引用版本和原生贡献。页内可展开初图、参考终图及模型的原生快照。安装 Graphviz 并使 `dot` 在 PATH 上,即可同时生成可展开的接线图。HTML 包含全部图和数据,可以离线打开。边序号为操作数位置,虚线框或分组框内的节点属于同一 e-class。
|
|
87
|
+
|
|
88
|
+
列表将模型产生的构造对齐到参考终图的等价类,标出初图已有、新增和仍缺的行。即使构造行全部出现,模型仍可能缺少合并;整图饱和判定会另行比较保留具体边界身份的完整图。每窗内的请求共享发布前快照。
|
|
89
|
+
|
|
90
|
+
## Python API
|
|
91
|
+
|
|
92
|
+
```python
|
|
93
|
+
from pathlib import Path
|
|
94
|
+
from eggfuse.ripsat.data import collect, verify, worlds, check_program
|
|
95
|
+
from eggfuse.ripsat.model import CalculusPointer
|
|
96
|
+
from eggfuse.ripsat.evaluation import load_model, complete, evaluate
|
|
97
|
+
from eggfuse.ripsat.viz import read_comparison, visualize
|
|
98
|
+
|
|
99
|
+
# root 是 collect 的输出目录;checkpoint 包含 config.json 和 weights.pt。
|
|
100
|
+
world = next(worlds(root, "test"))
|
|
101
|
+
model = load_model(checkpoint, check_program(root))
|
|
102
|
+
result = complete(model, world["initial"], budget=64, seed=193)
|
|
103
|
+
page = visualize(world, result, Path("comparison.html"))
|
|
104
|
+
|
|
105
|
+
# 也可以直接从原生评估账本导出某张图,无需再运行模型。
|
|
106
|
+
record = read_comparison(evaluation_directory, index=0)
|
|
107
|
+
visualize(record["world"], record["completion"], Path("saved-comparison.html"))
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
`CalculusPointer` 是 torch.nn.Module;前向输入是形状 [batch, 可见公开端口数, 4] 的整型张量和可选的当前窗口提案集合。八规则预设中的动作通过规则指针及两个父引用位置构成,签发前映射回 (token, op, version)。使用种子进行批量评估时会加上初图 UID 的前缀以生成图级种子,实际使用的种子写入每条 completion;单图 complete 直接使用传入的种子。
|
|
111
|
+
|
|
112
|
+
## 产物与检验
|
|
113
|
+
|
|
114
|
+
| 阶段 | 产物与口径 |
|
|
115
|
+
|---|---|
|
|
116
|
+
| collect | data/program.json、collection.json、压缩分片和 card.json。卡片报告 Uin、Uout、ER、已知 DEPTH 及 Unknown 数量;初图和终图均按结构隔离分区。新分片保留所有分区的初图、Teacher 终图、原始表达式和具名请求。 |
|
|
117
|
+
| verify | 从归档初图重新原生捕获、重放,核对边界固定的初图与终图、结构身份、目标与 END、DEPTH,以及已保存的 Teacher 请求。首次采集时 egglog CLI 独立核对初图和终图。 |
|
|
118
|
+
| train | 20k、100k、1m、10m 四档;默认 CPU。config.json、weights.pt、training.json 和 live.jsonl 记录参数量、训练时间、曝光、CE 及吞吐。预算按完整 Cell 目标曝光计;END 独立计数,最后一批可能跨过预算。 |
|
|
119
|
+
| evaluate | metrics.json 和 comparisons.jsonl.gz。记录整图饱和、Coverage、EPT、EPS、提前 END、重复率、DEPTH 分组、具名请求、原生回执、窗口和终图。统计只计真实执行;绘图与参考图比较在计时之外。 |
|
|
120
|
+
| compare | 可携带的离线 HTML。支持旧 Scaling checkpoint 和具有原生快照的旧测试分片。旧训练分片若仅存监督张量,可用于训练。 |
|
|
121
|
+
|
|
122
|
+
本地 SwanLab 使用安装额外依赖后的 `ripsat train ... --swanlog "$SWANLOG"`,以实际曝光记录训练和验证。安装命令为 `python -m pip install './benchmarks/ripsat-cell-completion[tracking]'`;使用 uv 且其解析器拦截 swanboard 预发行依赖时,可显式传入 `--prerelease allow`。可用 `swanlab watch "$SWANLOG"` 打开本地面板。CPU 已用于原生自主执行验收;训练可选择 CPU、MPS 或 CUDA。
|
|
123
|
+
|
|
124
|
+
对原生执行,`--policy autonomous` 允许模型 END;`fixed` 保留固定生成对照。历史无 END 权重可选 `historical-wor` 或 `historical-first`,因子化随机对照可用 `factorized-random`。预算为实际签发上限。参考终图和 Teacher 绑定始终只用于采集监督、离线比较与验收。
|
|
125
|
+
|
|
126
|
+
包迁移验收使用既有 1,134,537 参数权重、生成种子 193、实付上限 64。在原 160 个留出初图上,具名请求、每窗提案、回执、原生贡献、停止原因和终图逐项复现;144 张整图饱和。研究数据与实验结论见同目录 reasoning-scaling.md。
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
## 维护者发布更新
|
|
130
|
+
|
|
131
|
+
在本目录的 `pyproject.toml` 提升版本并合并到 `main`。Python package CI 从源码包构建 wheel,在独立目录安装并测试。打开 [Python package → Run workflow](https://github.com/MilkBlock/eggfuse/actions/workflows/python-package.yml),选 `main` 并输入完整版本号。PyPI 上传使用通过测试的同一份构建产物;普通 push 和 PR 只运行检查。
|
|
132
|
+
|
|
133
|
+
首次发布前,在 PyPI 配置 GitHub Trusted Publisher,项目 `eggfuse`、Owner `MilkBlock`、Repository `eggfuse`、Workflow `python-package.yml`、Environment `pypi`。
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
eggfuse/__init__.py,sha256=rgrJ8Cc_p2RyHbVWcYWBk_emXJdEzYWlow6Qf8Bg6Vg,40
|
|
2
|
+
eggfuse/ripsat/__init__.py,sha256=LLA6Fr61uyYqZgARveWlyYOQIObj4REPSjaV6zIKenY,75
|
|
3
|
+
eggfuse/ripsat/__main__.py,sha256=MSmt_5Xg84uHqzTN38JwgseJK8rsJn_11A8WD99VtEo,61
|
|
4
|
+
eggfuse/ripsat/batching.py,sha256=cTiic0bzJN8d8YoOJDYEpEeN2dmSXammuTnIcxlpEpA,3235
|
|
5
|
+
eggfuse/ripsat/cli.py,sha256=S2kZFZnyCRrtj0pbIyoFH31zU1pg-huPeEalxYbBUqg,4164
|
|
6
|
+
eggfuse/ripsat/data.py,sha256=gHA6hwKJa_UNOIYxPEojSi26AxLopsVMD8dGDp5j960,17079
|
|
7
|
+
eggfuse/ripsat/device_tmp.py,sha256=PQF012UOA-fvsHYP2Ywnoa6_FBZNjjYckoQooZx70_Q,1317
|
|
8
|
+
eggfuse/ripsat/encoding.py,sha256=rRYE45cQqlKarGM804EhgQq4_CPvalUXBHEqZPZx0M0,1270
|
|
9
|
+
eggfuse/ripsat/evaluation.py,sha256=pU7-19QM9ZMFgxTrL18JP9OvifX-13BJvuYCS3KNVCY,5578
|
|
10
|
+
eggfuse/ripsat/graphs.py,sha256=Epn_bntqKf7FqZlPYvabns_qF9sHKlkLE8C-AAXiOIU,6721
|
|
11
|
+
eggfuse/ripsat/model.py,sha256=24L5MKsUfWwvpdJzNjMFSfpJ-ivThyZwaVnokKQkxXc,9455
|
|
12
|
+
eggfuse/ripsat/native.py,sha256=uYz5W1fuMTg-ca87NqXoOZeNqsForyb3cGqkdzjyOyY,3357
|
|
13
|
+
eggfuse/ripsat/rollout.py,sha256=00XsIGN43Dq1lDOz-DYkfuT47krqyHMJhCW9U2aYJtY,5341
|
|
14
|
+
eggfuse/ripsat/sampling.py,sha256=Fy_3OrAi72RbYI6UE6b9W2UOGyj9ahSuxTyDqr4teEs,2788
|
|
15
|
+
eggfuse/ripsat/training.py,sha256=k1r3mXOx4Ok5miX9MeWtE88VEp8qfLNcCGLM7NfIuXA,9133
|
|
16
|
+
eggfuse/ripsat/viz.py,sha256=lgSsHgG059xSrmCVxwLuKLjNZC5T0WBQ7Lum0sRSxsA,6750
|
|
17
|
+
eggfuse/ripsat/assets/calculus.egg,sha256=L-OeSN7u0f6wF1uUn9o1Ls90BLOtbhxBD7pp3-7SGoI,842
|
|
18
|
+
eggfuse/ripsat/assets/calculus.json,sha256=qPUavOsGOr4pAx3qmx2-bK4blCALIth04UDQCcbfwXA,50626
|
|
19
|
+
eggfuse/ripsat/assets/comparison.html,sha256=mcd4Ou4BSF6Rs1LJzGlZ_Iaj47mDLDNixhDGeoXLYog,2032
|
|
20
|
+
eggfuse/ripsat/assets/corpus_worker.rs,sha256=BjDDfE9oCJuOVJcDiddYT9LFWUbTb4lPtSvMlCTsVpc,5288
|
|
21
|
+
ripsat/__init__.py,sha256=XWBjPKVfU0giw5gwtuGfu6OmDCQea5dcMbOL-49CLXs,87
|
|
22
|
+
ripsat/__main__.py,sha256=x1zb5BryaaeBvNjiZzAnU_KiizyV-F2os24GN1rXxeg,75
|
|
23
|
+
ripsat/batching.py,sha256=MHbkNToPGsdvvAsEiRcoh-nkbE00i0Q10361nO8mGkQ,139
|
|
24
|
+
ripsat/cli.py,sha256=t57cNOw7Cd63-kCI3c_lRRTizCMS6fQyVvMVkdjuWyU,124
|
|
25
|
+
ripsat/data.py,sha256=0393RRxhCit_oNcZN9Nu5iSm16RgE2bsMIWK5MHuj3Y,127
|
|
26
|
+
ripsat/device_tmp.py,sha256=Css--aNvzpdCz4V4BQ6GgXOiXL-tnptjrkX4n4BfIrw,145
|
|
27
|
+
ripsat/encoding.py,sha256=lESkWH89FKBVVZP8QrmrhM4OPN3K7m1v3x6Qb9xP0QI,139
|
|
28
|
+
ripsat/evaluation.py,sha256=qQMqUzXPr1q5zT61T9ekSl80ydt2Nrv3bfmO9mqAKnw,145
|
|
29
|
+
ripsat/graphs.py,sha256=CHUI3osirFOUkIFpplpUt8lLbvhZ5k_ADmb1GItHt24,133
|
|
30
|
+
ripsat/model.py,sha256=GEUmJaaPou5Eo41e1d-iVaCvCUqI12a8DC0vU3_OoCw,130
|
|
31
|
+
ripsat/native.py,sha256=acyusf9QQhCANfQLtGZp_55aOav7K0ujAiOzcMjquLE,133
|
|
32
|
+
ripsat/rollout.py,sha256=2tokXuyg-WybYMwYQEc-_aqVFkLpo7XrALZcxVT5HMo,136
|
|
33
|
+
ripsat/sampling.py,sha256=XncHzaV_K7QEE_DdDrIRrXpfTeBOnhjv3HpBxtk3u-A,139
|
|
34
|
+
ripsat/training.py,sha256=PjXHMuvh-PtJ5cSpkMK9OfcK0LvW4P3TweUvNewARoM,139
|
|
35
|
+
ripsat/viz.py,sha256=8-JLw1OuNS23wqml5iu4zhg3hpyIEXupJrZUN-1kTzw,124
|
|
36
|
+
eggfuse-0.2.1.dist-info/METADATA,sha256=kG1eiUcVUvmpqeExymoNYmWAoTOlpkjx6MH3fVf8tgE,10843
|
|
37
|
+
eggfuse-0.2.1.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
38
|
+
eggfuse-0.2.1.dist-info/entry_points.txt,sha256=qlQFKALQ6_aIxdPaC2uIx-acewUgibU2z6c5QDummaE,51
|
|
39
|
+
eggfuse-0.2.1.dist-info/top_level.txt,sha256=_1a6ntRBpOAaAk5MkLNXvetE36j1WcApge6k_eW7qYY,15
|
|
40
|
+
eggfuse-0.2.1.dist-info/RECORD,,
|
ripsat/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Compatibility namespace for code written before the eggfuse distribution rename."""
|
ripsat/__main__.py
ADDED
ripsat/batching.py
ADDED
ripsat/cli.py
ADDED
ripsat/data.py
ADDED
ripsat/device_tmp.py
ADDED
ripsat/encoding.py
ADDED
ripsat/evaluation.py
ADDED
ripsat/graphs.py
ADDED
ripsat/model.py
ADDED
ripsat/native.py
ADDED
ripsat/rollout.py
ADDED
ripsat/sampling.py
ADDED
ripsat/training.py
ADDED