Spaces:
Sleeping
Sleeping
Amy Roberts
commited on
Commit
β’
6b0b6fd
1
Parent(s):
18ec458
Tidy up
Browse files- app.py +2 -2
- build_embeddings.py +1 -1
- build_saved_issues.py β fetch.py +4 -0
- find_similar_issues.py +1 -0
app.py
CHANGED
@@ -6,11 +6,11 @@ import requests
|
|
6 |
|
7 |
from defaults import OWNER, REPO
|
8 |
|
9 |
-
from build_saved_issues import get_issues
|
10 |
-
from update_stored_issues import update_issues
|
11 |
import build_issue_dict
|
12 |
import build_embeddings
|
13 |
import shutil
|
|
|
|
|
14 |
|
15 |
|
16 |
|
|
|
6 |
|
7 |
from defaults import OWNER, REPO
|
8 |
|
|
|
|
|
9 |
import build_issue_dict
|
10 |
import build_embeddings
|
11 |
import shutil
|
12 |
+
from fetch import get_issues
|
13 |
+
from update_stored_issues import update_issues
|
14 |
|
15 |
|
16 |
|
build_embeddings.py
CHANGED
@@ -87,7 +87,7 @@ def embed_issues(
|
|
87 |
logger.info(f"Skipping issue {issue_id} as it has no body")
|
88 |
continue
|
89 |
|
90 |
-
if issue_type == "
|
91 |
logger.info(f"Skipping issue {issue_id} as it is not a pull request")
|
92 |
continue
|
93 |
|
|
|
87 |
logger.info(f"Skipping issue {issue_id} as it has no body")
|
88 |
continue
|
89 |
|
90 |
+
if issue_type == "pull" and "pull_request" not in issue:
|
91 |
logger.info(f"Skipping issue {issue_id} as it is not a pull request")
|
92 |
continue
|
93 |
|
build_saved_issues.py β fetch.py
RENAMED
@@ -1,3 +1,7 @@
|
|
|
|
|
|
|
|
|
|
1 |
import json
|
2 |
|
3 |
import argparse
|
|
|
1 |
+
"""
|
2 |
+
Script to fetch issues from the transformers repo and save them to a json file
|
3 |
+
"""
|
4 |
+
|
5 |
import json
|
6 |
|
7 |
import argparse
|
find_similar_issues.py
CHANGED
@@ -98,6 +98,7 @@ def get_similar_issues(issue_no, query, top_k=5, token=TOKEN, owner=OWNER, repo=
|
|
98 |
|
99 |
if __name__ == "__main__":
|
100 |
parser = argparse.ArgumentParser()
|
|
|
101 |
parser.add_argument("--issue_no", type=int, default=None)
|
102 |
parser.add_argument("--query", type=str, default=None)
|
103 |
parser.add_argument("--top_k", type=int, default=5)
|
|
|
98 |
|
99 |
if __name__ == "__main__":
|
100 |
parser = argparse.ArgumentParser()
|
101 |
+
parser.add_argument("")
|
102 |
parser.add_argument("--issue_no", type=int, default=None)
|
103 |
parser.add_argument("--query", type=str, default=None)
|
104 |
parser.add_argument("--top_k", type=int, default=5)
|