marcosremar
commited on
Commit
Β·
a0b0ea2
1
Parent(s):
667b369
Fix YAML syntax in SkyPilot test (use heredoc for Python blocks)
Browse files
scripts/cloud/skypilot_test_minimal.yaml
CHANGED
|
@@ -114,7 +114,7 @@ run: |
|
|
| 114 |
|
| 115 |
# Test 7: Python imports
|
| 116 |
echo "π Testing Python imports..."
|
| 117 |
-
python3
|
| 118 |
import sys
|
| 119 |
import numpy as np
|
| 120 |
import soundfile as sf
|
|
@@ -131,7 +131,7 @@ print(' β numpy array creation works')
|
|
| 131 |
# Test librosa
|
| 132 |
rms = librosa.feature.rms(y=audio)[0].mean()
|
| 133 |
print(f' β librosa feature extraction works (RMS: {rms:.4f})')
|
| 134 |
-
|
| 135 |
echo ""
|
| 136 |
|
| 137 |
# Test 8: Synthetic data generation (1 sample)
|
|
@@ -151,7 +151,7 @@ print(f' β librosa feature extraction works (RMS: {rms:.4f})')
|
|
| 151 |
|
| 152 |
# Test audio loading
|
| 153 |
FIRST_AUDIO=$(find test_data_tmp -name "*.wav" | head -1)
|
| 154 |
-
python3
|
| 155 |
import soundfile as sf
|
| 156 |
import librosa
|
| 157 |
|
|
@@ -160,12 +160,12 @@ print(f' β Audio loading works: {len(audio)/sr:.1f}s @ {sr}Hz')
|
|
| 160 |
|
| 161 |
rms = librosa.feature.rms(y=audio)[0].mean()
|
| 162 |
print(f' β Feature extraction: RMS={rms:.4f}')
|
| 163 |
-
|
| 164 |
echo ""
|
| 165 |
|
| 166 |
# Test 9: Voting system
|
| 167 |
echo "π³οΈ Testing ensemble voting..."
|
| 168 |
-
python3
|
| 169 |
import sys
|
| 170 |
sys.path.insert(0, '.')
|
| 171 |
|
|
@@ -180,8 +180,8 @@ predictions = [
|
|
| 180 |
voter = WeightedVoting()
|
| 181 |
result = voter.vote(predictions, key='label')
|
| 182 |
|
| 183 |
-
print(f' β Voting works: {result[
|
| 184 |
-
|
| 185 |
echo ""
|
| 186 |
|
| 187 |
# Cleanup
|
|
|
|
| 114 |
|
| 115 |
# Test 7: Python imports
|
| 116 |
echo "π Testing Python imports..."
|
| 117 |
+
python3 << 'PYTHON_EOF'
|
| 118 |
import sys
|
| 119 |
import numpy as np
|
| 120 |
import soundfile as sf
|
|
|
|
| 131 |
# Test librosa
|
| 132 |
rms = librosa.feature.rms(y=audio)[0].mean()
|
| 133 |
print(f' β librosa feature extraction works (RMS: {rms:.4f})')
|
| 134 |
+
PYTHON_EOF
|
| 135 |
echo ""
|
| 136 |
|
| 137 |
# Test 8: Synthetic data generation (1 sample)
|
|
|
|
| 151 |
|
| 152 |
# Test audio loading
|
| 153 |
FIRST_AUDIO=$(find test_data_tmp -name "*.wav" | head -1)
|
| 154 |
+
python3 << PYTHON_EOF2
|
| 155 |
import soundfile as sf
|
| 156 |
import librosa
|
| 157 |
|
|
|
|
| 160 |
|
| 161 |
rms = librosa.feature.rms(y=audio)[0].mean()
|
| 162 |
print(f' β Feature extraction: RMS={rms:.4f}')
|
| 163 |
+
PYTHON_EOF2
|
| 164 |
echo ""
|
| 165 |
|
| 166 |
# Test 9: Voting system
|
| 167 |
echo "π³οΈ Testing ensemble voting..."
|
| 168 |
+
python3 << 'PYTHON_EOF3'
|
| 169 |
import sys
|
| 170 |
sys.path.insert(0, '.')
|
| 171 |
|
|
|
|
| 180 |
voter = WeightedVoting()
|
| 181 |
result = voter.vote(predictions, key='label')
|
| 182 |
|
| 183 |
+
print(f' β Voting works: {result["label"]} ({result["confidence"]:.2%})')
|
| 184 |
+
PYTHON_EOF3
|
| 185 |
echo ""
|
| 186 |
|
| 187 |
# Cleanup
|