Ligeng Zhu commited on
Commit
8063620
0 Parent(s):

Updated the tvm_commit file with a new version and sha256 size

Browse files
Files changed (4) hide show
  1. .gitattributes +1 -0
  2. .gitignore +1 -0
  3. main.py +47 -0
  4. tvm_commit.jsonl +3 -0
.gitattributes ADDED
@@ -0,0 +1 @@
 
 
1
+ tvm_commit.jsonl filter=lfs diff=lfs merge=lfs -text
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ tvm/
main.py ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import subprocess
2
+ import openai
3
+ import markdown, re
4
+ from PyInquirer import prompt as py_inquirer_prompt, style_from_dict, Token
5
+
6
+
7
+ def run_command(command):
8
+ process = subprocess.run(command, shell=True, capture_output=True, text=True)
9
+ if process.returncode != 0:
10
+ raise Exception(f"Command {command} failed with exit code {process.returncode}")
11
+ return process.stdout
12
+
13
+ jsonl = []
14
+
15
+ init_cid = "cc8cce50fabb5a92e5830bb81b5fa96fb613a698"
16
+
17
+ run_command(f'''cd tvm; git reset --hard {init_cid}''')
18
+
19
+ count = 0
20
+ while True:
21
+ commit_id = run_command('''cd tvm; git log -1 --format="%H"''')
22
+ commit_msg_short = run_command('''cd tvm; git log -1 --pretty=%s''')
23
+ commit_msg_full = run_command('''cd tvm; git log -1 --pretty=%B''')
24
+ commit_log = run_command('''cd tvm; git log -1''')
25
+ code_diff = run_command('''cd tvm; git diff main main~1''')
26
+
27
+ from pprint import pprint
28
+
29
+ msg = {
30
+ commit_id.strip(): {
31
+ "short": commit_msg_short.strip(),
32
+ "full": commit_msg_full.strip(),
33
+ "code_diff": code_diff.strip(),
34
+ "commit_log": commit_log.strip(),
35
+ }
36
+ }
37
+
38
+ jsonl.append(msg)
39
+
40
+ with open("tvm_commit.jsonl", "w") as f:
41
+ for line in jsonl:
42
+ f.write(str(line) + "\n")
43
+ #
44
+ run_command("cd tvm; git reset --hard HEAD~1")
45
+ count += 1
46
+ print(count)
47
+
tvm_commit.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6f5a79bcaa30777cd09b101fd03a189634899d4bdde078e2443f9669f7da916b
3
+ size 197234037