File tree Expand file tree Collapse file tree 1 file changed +31
-7
lines changed Expand file tree Collapse file tree 1 file changed +31
-7
lines changed Original file line number Diff line number Diff line change 1
1
set -e
2
2
3
- export LLM_MODEL=" anthropic/claude-3-5-sonnet-20241022"
4
-
3
+ OH_DIR=" $( dirname " $0 " ) /.."
5
4
if [[ -z " $TMP_DIR " ]]; then
6
5
TMP_DIR=" /tmp"
7
6
fi
7
+
8
+ export DEBUG=1
9
+ export LLM_MODEL=" anthropic/claude-3-5-sonnet-20241022"
10
+
11
+ OUTPUT_DIR=" $TMP_DIR /resolver-output"
12
+ OUTPUT_FILE=" $OUTPUT_DIR /output.jsonl"
13
+
14
+ ISSUE_NUMBER=15
15
+ ISSUE_TYPE=issue
16
+
8
17
LOG_FILE=" $TMP_DIR /tmp.log"
9
18
10
19
if [[ -z " $LLM_API_KEY " ]]; then
@@ -15,15 +24,30 @@ if [[ -z "$LLM_API_KEY" ]]; then
15
24
export LLM_API_KEY=$ANTHROPIC_API_KEY
16
25
fi
17
26
18
- export DEBUG=1
27
+ TARGET_REPO=" $OUTPUT_DIR /workspace/${ISSUE_TYPE} _${ISSUE_NUMBER} "
28
+
29
+ rm -f $OUTPUT_FILE
30
+
31
+ echo " Target repo at: $TARGET_REPO "
32
+
33
+ # only cd if the directory exists
34
+ if [ -d " $TARGET_REPO " ]; then
35
+ cd " $TARGET_REPO "
36
+ diff=$( git diff)
37
+ if [ -n " $diff " ]; then
38
+ echo " Make sure that the repo is clean. Current diff:"
39
+ echo " $diff "
40
+ fi
41
+ fi
42
+ echo " Logging to \" $LOG_FILE \" ..."
19
43
20
- echo -e " Logging to \" $LOG_FILE \" \n "
44
+ cd " $OH_DIR "
21
45
22
46
python -m openhands.resolver.resolve_issue \
23
47
--repo replayio-public/bench-devtools-10609 \
24
- --issue-number 15 \
25
- --issue-type issue \
48
+ --issue-number $ISSUE_NUMBER \
49
+ --issue-type $ISSUE_TYPE \
26
50
--max-iterations 50 \
27
51
--comment-id 2526444494 \
28
- --output-dir " $TMP_DIR /resolver-output " \
52
+ --output-dir " $OUTPUT_DIR " \
29
53
> " $LOG_FILE " 2>&1
You can’t perform that action at this time.
0 commit comments