Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ evaluation/data/langmemeval
evaluation/*tmp/
evaluation/results
evaluation/.env
evaluation/scripts/*.sh
evaluation/configs/*
.env

Expand Down
44 changes: 44 additions & 0 deletions evaluation/scripts/run_locomo_eval.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash
Copy link

Copilot AI Jul 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding set -euo pipefail after the shebang to ensure the script exits on any error and detects undefined variables.

Copilot uses AI. Check for mistakes.


# Common parameters for all scripts
LIB="memos"
VERSION="063001"
WORKERS=10
TOPK=20

echo "Running locomo_ingestion.py..."
CUDA_VISIBLE_DEVICES=0 python scripts/locomo/locomo_ingestion.py --lib $LIB --version $VERSION --workers $WORKERS
if [ $? -ne 0 ]; then
echo "Error running locomo_ingestion.py"
exit 1
fi

echo "Running locomo_search.py..."
CUDA_VISIBLE_DEVICES=0 python scripts/locomo/locomo_search.py --lib $LIB --version $VERSION --top_k $TOPK --workers $WORKERS
if [ $? -ne 0 ]; then
echo "Error running locomo_search.py"
exit 1
fi

echo "Running locomo_responses.py..."
python scripts/locomo/locomo_responses.py --lib $LIB --version $VERSION
if [ $? -ne 0 ]; then
echo "Error running locomo_responses.py."
exit 1
fi

echo "Running locomo_eval.py..."
python scripts/locomo/locomo_eval.py --lib $LIB --version $VERSION --workers $WORKERS --num_runs 3
if [ $? -ne 0 ]; then
echo "Error running locomo_eval.py"
exit 1
fi

echo "Running locomo_metric.py..."
python scripts/locomo/locomo_metric.py --lib $LIB --version $VERSION
if [ $? -ne 0 ]; then
echo "Error running locomo_metric.py"
exit 1
fi
Comment on lines +9 to +42
Copy link

Copilot AI Jul 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The error-checking and execution pattern is repeated for each script; consider extracting a helper function (e.g., run_step) to reduce duplication and improve readability.

Suggested change
echo "Running locomo_ingestion.py..."
CUDA_VISIBLE_DEVICES=0 python scripts/locomo/locomo_ingestion.py --lib $LIB --version $VERSION --workers $WORKERS
if [ $? -ne 0 ]; then
echo "Error running locomo_ingestion.py"
exit 1
fi
echo "Running locomo_search.py..."
CUDA_VISIBLE_DEVICES=0 python scripts/locomo/locomo_search.py --lib $LIB --version $VERSION --top_k $TOPK --workers $WORKERS
if [ $? -ne 0 ]; then
echo "Error running locomo_search.py"
exit 1
fi
echo "Running locomo_responses.py..."
python scripts/locomo/locomo_responses.py --lib $LIB --version $VERSION
if [ $? -ne 0 ]; then
echo "Error running locomo_responses.py."
exit 1
fi
echo "Running locomo_eval.py..."
python scripts/locomo/locomo_eval.py --lib $LIB --version $VERSION --workers $WORKERS --num_runs 3
if [ $? -ne 0 ]; then
echo "Error running locomo_eval.py"
exit 1
fi
echo "Running locomo_metric.py..."
python scripts/locomo/locomo_metric.py --lib $LIB --version $VERSION
if [ $? -ne 0 ]; then
echo "Error running locomo_metric.py"
exit 1
fi
# Helper function to run a script and check for errors
run_step() {
local script=$1
shift
echo "Running $script..."
"$@"
if [ $? -ne 0 ]; then
echo "Error running $script"
exit 1
fi
}
run_step "locomo_ingestion.py" CUDA_VISIBLE_DEVICES=0 python scripts/locomo/locomo_ingestion.py --lib $LIB --version $VERSION --workers $WORKERS
run_step "locomo_search.py" CUDA_VISIBLE_DEVICES=0 python scripts/locomo/locomo_search.py --lib $LIB --version $VERSION --top_k $TOPK --workers $WORKERS
run_step "locomo_responses.py" python scripts/locomo/locomo_responses.py --lib $LIB --version $VERSION
run_step "locomo_eval.py" python scripts/locomo/locomo_eval.py --lib $LIB --version $VERSION --workers $WORKERS --num_runs 3
run_step "locomo_metric.py" python scripts/locomo/locomo_metric.py --lib $LIB --version $VERSION

Copilot uses AI. Check for mistakes.


echo "All scripts completed successfully!"