Skip to content

Commit f55fcba

Browse files
committed
Use exact conda activation pattern from check_remote_status.sh
- eval "$(conda shell.bash hook)" (exact copy from working script) - Removed source ~/.bashrc approach - Removed debug output - Matches check_remote_status.sh line-for-line Ref: #38
1 parent 5d2e9bd commit f55fcba

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

check_hf_status.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,16 @@ eval "$SSH_CMD \"$USERNAME@$SERVER_ADDRESS\" 'bash -s'" << 'ENDSSH'
9393
# Change to project directory
9494
cd ~/llm-stylometry || { echo "ERROR: Project directory ~/llm-stylometry not found"; exit 1; }
9595
96-
# Create temporary Python script first
96+
# Activate conda environment
97+
if ! command -v conda &> /dev/null; then
98+
echo "ERROR: conda not found"
99+
exit 1
100+
fi
101+
102+
eval "$(conda shell.bash hook)" 2>/dev/null || { echo "ERROR: Failed to initialize conda"; exit 1; }
103+
conda activate llm-stylometry 2>/dev/null || { echo "ERROR: llm-stylometry environment not found"; exit 1; }
104+
105+
# Create temporary Python script
97106
cat > /tmp/check_hf_status.py << 'ENDPYTHON'
98107
#!/usr/bin/env python
99108
"""Check HuggingFace training status."""
@@ -238,8 +247,8 @@ if in_progress_count > 0 or completed_count < 8:
238247
239248
ENDPYTHON
240249
241-
# Execute the Python script with conda environment activated
242-
source ~/.bashrc && conda activate llm-stylometry && python3 /tmp/check_hf_status.py
250+
# Execute the Python script
251+
python3 /tmp/check_hf_status.py
243252
244253
# Clean up
245254
rm -f /tmp/check_hf_status.py

0 commit comments

Comments
 (0)