mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-08 22:48:25 -05:00
This reverts commit eda177da84.
This commit is contained in:
@@ -2,14 +2,14 @@
|
||||
# extract asts from process replay artifacts
|
||||
import os, pickle
|
||||
from tinygrad.helpers import db_connection, getenv, VERSION
|
||||
from test.external.process_replay.process_replay import _run_differ
|
||||
from test.external.process_replay.process_replay import _pmap
|
||||
|
||||
PAGE_SIZE = 100
|
||||
RUN_ID = os.getenv("GITHUB_RUN_ID", "HEAD")
|
||||
TABLE_NAME = f"process_replay_{RUN_ID}_{getenv('GITHUB_RUN_ATTEMPT')}_{VERSION}"
|
||||
LOGOPS = os.getenv("LOGOPS", "/tmp/sops")
|
||||
|
||||
def extract_ast(offset:int):
|
||||
def extract_ast(offset:int) -> bool:
|
||||
logops = open(LOGOPS, "a")
|
||||
conn = db_connection()
|
||||
for row in conn.execute(f"SELECT val FROM '{TABLE_NAME}' LIMIT ? OFFSET ?", (PAGE_SIZE, offset)).fetchall():
|
||||
@@ -19,4 +19,4 @@ def extract_ast(offset:int):
|
||||
if __name__ == "__main__":
|
||||
conn = db_connection()
|
||||
row_count = conn.execute(f"SELECT COUNT(*) FROM '{TABLE_NAME}'").fetchone()[0]
|
||||
_run_differ(row_count, extract_ast)
|
||||
_pmap(row_count, extract_ast)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
export LOGOPS=/tmp/sops
|
||||
export LOGOPS=/tmp/ops
|
||||
export RUN_PROCESS_REPLAY=1
|
||||
rm $LOGOPS
|
||||
test/external/process_replay/reset.py
|
||||
|
||||
Reference in New Issue
Block a user