Skip to content

Commit

Permalink
more robust resolver script
Browse files Browse the repository at this point in the history
  • Loading branch information
Domiii committed Dec 9, 2024
1 parent 09019a6 commit 32b17ae
Showing 1 changed file with 31 additions and 7 deletions.
38 changes: 31 additions & 7 deletions scripts/resolver_10609.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
set -e

export LLM_MODEL="anthropic/claude-3-5-sonnet-20241022"

OH_DIR="$(dirname "$0")/.."
if [[ -z "$TMP_DIR" ]]; then
TMP_DIR="/tmp"
fi

export DEBUG=1
export LLM_MODEL="anthropic/claude-3-5-sonnet-20241022"

OUTPUT_DIR="$TMP_DIR/resolver-output"
OUTPUT_FILE="$OUTPUT_DIR/output.jsonl"

ISSUE_NUMBER=15
ISSUE_TYPE=issue

LOG_FILE="$TMP_DIR/tmp.log"

if [[ -z "$LLM_API_KEY" ]]; then
Expand All @@ -15,15 +24,30 @@ if [[ -z "$LLM_API_KEY" ]]; then
export LLM_API_KEY=$ANTHROPIC_API_KEY
fi

export DEBUG=1
TARGET_REPO="$OUTPUT_DIR/workspace/${ISSUE_TYPE}_${ISSUE_NUMBER}"

rm -f $OUTPUT_FILE

echo "Target repo at: $TARGET_REPO"

# only cd if the directory exists
if [ -d "$TARGET_REPO" ]; then
cd "$TARGET_REPO"
diff=$(git diff)
if [ -n "$diff" ]; then
echo "Make sure that the repo is clean. Current diff:"
echo "$diff"
fi
fi
echo "Logging to \"$LOG_FILE\"..."

echo -e "Logging to \"$LOG_FILE\"\n"
cd "$OH_DIR"

python -m openhands.resolver.resolve_issue \
--repo replayio-public/bench-devtools-10609 \
--issue-number 15 \
--issue-type issue \
--issue-number $ISSUE_NUMBER \
--issue-type $ISSUE_TYPE \
--max-iterations 50 \
--comment-id 2526444494 \
--output-dir "$TMP_DIR/resolver-output" \
--output-dir "$OUTPUT_DIR" \
> "$LOG_FILE" 2>&1

0 comments on commit 32b17ae

Please sign in to comment.