getappmap / navie-benchmark

Navie benchmarks
MIT License
0 stars 0 forks source link

Set APPMAP_NAVIE_MINI_MODEL as appropriate #60

Open kgilpin opened 2 months ago

kgilpin commented 2 months ago

In some cases, Navie supports APPMAP_NAVIE_MINI_MODEL. Set this env var in solve.yml as appropriate.

github-actions[bot] commented 2 months ago

Title:

Set APPMAP_NAVIE_MINI_MODEL environment variable in solve.yml as appropriate

Problem:

The APPMAP_NAVIE_MINI_MODEL environment variable needs to be set in .github/workflows/solve.yml when appropriate. Currently, this environment variable is not being set, which could result in the Navie mini model not being used when needed.

Analysis:

To solve this problem, we need to identify the scenarios in which APPMAP_NAVIE_MINI_MODEL should be set and make the necessary updates in the solve.yml workflow. This will involve examining the conditions under which different LLM models are used and appropriately configuring the environment variable for the Navie mini model. The existing sections of the solve.yml file that handle environment variables for different LLMs (gpt-4o, claude, etc.) will need to be updated to include the APPMAP_NAVIE_MINI_MODEL when the conditions are met.

Proposed Changes:

  1. File: .github/workflows/solve.yml
    • Section: Locate the section of the workflow where the LLM-specific environment variables are set.
    • Modification: Add a new condition for setting the APPMAP_NAVIE_MINI_MODEL environment variable.

Specific Changes:

  1. Edit the section starting at line 197 in .github/workflows/solve.yml:
    • Modify the logic to include a condition that sets the APPMAP_NAVIE_MINI_MODEL environment variable.
- name: Solve instances
  run: |
    pip install virtualenv
    virtualenv venv
    . ./venv/bin/activate
    pip install -e .

    export PYTHONPATH=$PYTHONPATH:$(pwd)
    export APPMAP_COMMAND="node $(pwd)/submodules/appmap-js/packages/cli/built/cli.js"

    git config --global init.defaultBranch swe-bench-2
    git config --global user.email "actions@example.com"
    git config --global user.name "GitHub Workflow"

    llm="${LLM:-gpt-4o}"
    if [[ $llm == "gpt-4o"* ]]; then
      export APPMAP_NAVIE_MODEL="${llm}"
      export OPENAI_API_KEY="${{ secrets.OPENAI_API_KEY }}"
    elif [[ $llm == "claude"* ]]; then
      export APPMAP_NAVIE_MODEL="${llm}"
      export ANTHROPIC_API_KEY="${{ secrets.ANTHROPIC_API_KEY }}"
    fi

    # New condition to set APPMAP_NAVIE_MINI_MODEL as appropriate
    if [[ $llm == "mini-model" ]]; then
      export APPMAP_NAVIE_MINI_MODEL="${llm}"
      # Set additional environment variables if needed for mini model
    fi

By adding this condition, you ensure that the APPMAP_NAVIE_MINI_MODEL environment variable is appropriately set when the selected LLM model matches the criteria for the mini model. This will enable the use of the Navie mini model when required.