11#! /bin/bash
2- LIB=" mem0 "
2+ LIB=" rag "
33VERSION=" default"
4+ DATA_SET=" locomo"
5+ CHUNK_SIZE=128
6+ NUM_CHUNKS=1
7+ export HF_ENDPOINT=https://hf-mirror.com
8+ mkdir -p results/$DATA_SET /$LIB -$VERSION /
9+ echo " The result saved in:results/$DATA_SET /$LIB -$VERSION /"
410
511echo " The complete evaluation steps for generating the RAG and full context!"
612
713echo " Running locomo_rag.py..."
8- python scripts/locomo/locomo_rag.py --chunk_size 512 --num_chunks 1 --output_folder results/locomo/mem0-default/
14+ python scripts/locomo/locomo_rag.py \
15+ --chunk_size $CHUNK_SIZE \
16+ --num_chunks $NUM_CHUNKS \
17+ --frame $LIB \
18+ --output_folder " results/$DATA_SET /$LIB -$VERSION /"
19+
920if [ $? -ne 0 ]; then
1021 echo " Error running locomo_rag.py"
1122 exit 1
@@ -27,3 +38,23 @@ if [ $? -ne 0 ]; then
2738 exit 1
2839fi
2940echo " ✅✅✅Evaluation score have been generated!"
41+
42+ echo " Save the experimental results of this round..."
43+ DIR=" results/$DATA_SET /"
44+ cd " $DIR " || { echo " Unable to enter directory $DIR " ; exit 1; }
45+
46+ # Rename the folder to avoid being overwritten by new results
47+ OLD_NAME=" $LIB -$VERSION "
48+ NEW_NAME=" $LIB -$CHUNK_SIZE -$NUM_CHUNKS "
49+
50+ if [ -d " $OLD_NAME " ]; then
51+ # Rename the folder
52+ mv " $OLD_NAME " " $NEW_NAME "
53+
54+ # Output prompt information
55+ echo " Already rename the folder: $OLD_NAME → $NEW_NAME "
56+ else
57+ echo " Error:Folder $OLD_NAME is not exist"
58+ exit 1
59+ fi
60+ echo " ✅✅✅✅ All the experiment has been successful..."
0 commit comments