-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathrun_analyzer.sh
More file actions
36 lines (28 loc) · 782 Bytes
/
run_analyzer.sh
File metadata and controls
36 lines (28 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
# Set environment variable for LEROBOT_DATA_DIR
export LEROBOT_DATA_DIR="../../analyzer_data/"
# Configuration variables
HOST="0.0.0.0"
PORT=7862
N_ACTION_STEPS=10
# Define paths
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ANALYZER_DIR="${SCRIPT_DIR}/src/analyzer"
# Change to analyzer directory
cd "$ANALYZER_DIR" || {
echo "Error: Failed to change directory to $ANALYZER_DIR"
exit 1
}
# Run the analyzer script with specified arguments
python main.py \
--host $HOST \
--port $PORT \
--n_action_steps $N_ACTION_STEPS
# Capture exit code
EXIT_CODE=$?
# Return to original directory
cd - > /dev/null || {
echo "Warning: Failed to return to original directory"
}
# Exit with the same code as the Python script
exit $EXIT_CODE