From e5a28cba2f04d3a5156bae8a684ec4fe336c2180 Mon Sep 17 00:00:00 2001 From: zch-cc <136044586+zch-cc@users.noreply.github.com> Date: Fri, 22 Mar 2024 09:01:48 -0700 Subject: [PATCH] Evaluation: Fix bug on python path on run.sh (#98) * Move regression tests to evaluation/ * use pythnon instead of docker in the script * add model para * change python to python3 * bug fix * add python path * add readme --- evaluation/regression/README.md | 11 +++++++++++ evaluation/regression/run.sh | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/evaluation/regression/README.md b/evaluation/regression/README.md index fb192f3c6a..36bca7663a 100644 --- a/evaluation/regression/README.md +++ b/evaluation/regression/README.md @@ -16,3 +16,14 @@ echo "write a hello world script" >> ./agent/regression/cases/$name/task.txt # Single out your test case using the TEST_CASE environment variable TEST_CASE=$name ./agent/regression/run.sh ``` + +To add agent to regreesion test: +```bash +add agent pair to directory_class_pairs variable in run.sh +key is the directory name in /agenthub and value is the class name +``` + +To run regresion test: +```bash +./run.sh and enter DEBUG, OPENAI_API_KEY and Model name in the prompt. +``` \ No newline at end of file diff --git a/evaluation/regression/run.sh b/evaluation/regression/run.sh index 357611ee23..b97b347089 100755 --- a/evaluation/regression/run.sh +++ b/evaluation/regression/run.sh @@ -29,6 +29,11 @@ else MODEL="$model" fi +echo "Running with model: $MODEL" + +# add python path +export PYTHONPATH="$PYTHONPATH:$SCRIPT_DIR/../../" + # hardcode pairs for directory to python class mapping declare -A directory_class_pairs=( [langchains_agent]="LangchainsAgent"