Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion delphi/polismath/replay/certify.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ def default_ledger_path() -> Path:
# ---------------------------------------------------------------------------
ACCEPTANCE_EXCLUDED_KEYS = frozenset({"subgroup-clusters", "subgroup-votes", "subgroup-repness"})
ACCEPTANCE_KEYS = PREP_MAIN_KEYS - ACCEPTANCE_EXCLUDED_KEYS
ACCEPTANCE_NOTICE = "subgroup-* keys excluded from acceptance (CLOJURE_QUIRKS.md Q7)"
ACCEPTANCE_NOTICE = (
"subgroup-* keys excluded from acceptance (CLOJURE_QUIRKS.md Q7); "
"large-conv mini-batch PCA disabled in the clj driver — full-PCA path "
"certified at every size (Q10)"
)


def project_acceptance(blob: dict[str, Any]) -> dict[str, Any]:
Expand Down
20 changes: 18 additions & 2 deletions math/dev/replay.clj
Original file line number Diff line number Diff line change
Expand Up @@ -190,15 +190,31 @@
;; One full replay pass: seed → reduce conv-update, keeping conv per step.
;; ---------------------------------------------------------------------------

;; Q10 carve-out (CLOJURE_QUIRKS.md): conv-update's large-conv dispatch
;; (n-ptpts > 10000 OR n-cmts > 5000, conversation.clj:784-815) runs
;; mini-batch partial-pca on an UNSEEDED random row sample — no
;; deterministic reference exists on that path, even between two Clojure
;; runs. Certification pins both cutoffs huge so every step takes the
;; deterministic full-PCA (small-conv) path at any size. Logged per run
;; here and by certify.py's acceptance notice.
(def certify-conv-opts
{:ptpt-cutoff 1000000000
:cmt-cutoff 1000000000})

(defn run-once
"Returns a vector of [step conv-after-update] pairs, one per cut slot.
The reduce threading the conv IS the implicit warm-start chain."
The reduce threading the conv IS the implicit warm-start chain.
conv-update runs with certify-conv-opts (Q10 full-PCA carve-out)."
[zid meta-tids steps]
(binding [*out* *err*]
(println "Q10 carve-out: large-conv mini-batch PCA disabled"
"(ptpt/cmt cutoffs pinned to 10^9; full PCA at every size)"))
(let [seed (-> (conv/new-conv) (assoc :zid zid :meta-tids (set meta-tids)))]
(loop [conv seed [s & more] steps acc []]
(if (nil? s)
acc
(let [conv' (conv/conv-update conv (->conv-votes (:votes s)))]
(let [conv' (conv/conv-update conv (->conv-votes (:votes s))
certify-conv-opts)]
(recur conv' more (conj acc [s conv'])))))))

;; ---------------------------------------------------------------------------
Expand Down
Loading