-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathmain.py
More file actions
executable file
·25 lines (21 loc) · 913 Bytes
/
main.py
File metadata and controls
executable file
·25 lines (21 loc) · 913 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import logging
from hyperagent import HyperAgent
from argparse import ArgumentParser
logging.basicConfig(
level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s"
)
logging.getLogger('hyperagent').setLevel(logging.WARNING)
logger = logging.getLogger(__name__)
def parse():
args = ArgumentParser()
args.add_argument("--repo", type=str, required=True)
args.add_argument("--commit", type=str, default="")
args.add_argument("--language", type=str, default="python")
args.add_argument("--prompt", type=str, default="How to add new memory efficient fine-tuning technique to the project?")
return args.parse_args()
if __name__ == "__main__":
logger.info("Start!")
args = parse()
pilot = HyperAgent(args.repo, commit=args.commit, language=args.language, clone_dir="data/repos")
logger.info("Setup done!")
print(pilot.query_codebase(args.question))