Skip to content

Commit c00c383

Browse files
committed
Actualización del Workflow
1 parent 06d41dc commit c00c383

1 file changed

Lines changed: 1 addition & 56 deletions

File tree

.github/workflows/benchmarks.yml

Lines changed: 1 addition & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -472,59 +472,4 @@ jobs:
472472
name: firmware-build-${{ inputs.target_arch || 'arm' }}
473473
path: build/generated/
474474
retention-days: 7
475-
476-
# ------------------------------------------------------------------
477-
# JOB 3: Benchmark & Performance Metrics (Opcional)
478-
benchmark:
479-
name: 📊 Performance Benchmarks
480-
needs: build-firmware
481-
runs-on: ubuntu-latest
482-
if: github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, '[benchmark]')
483-
484-
steps:
485-
- uses: actions/checkout@v4
486-
487-
- name: Setup Python
488-
uses: actions/setup-python@v4
489-
with:
490-
python-version: '3.10'
491-
492-
- run: pip install .
493-
494-
- name: Run Embedded Benchmarks
495-
run: |
496-
cat <<'PYEOF' > benchmark_embedded.py
497-
import miniml
498-
import time
499-
500-
# Benchmark: Tiempo de entrenamiento y tamaño de modelo
501-
xor_data = [[0.0, 0.0, 0], [0.0, 1.0, 1], [1.0, 0.0, 1], [1.0, 1.0, 0]]
502-
503-
print("=== Benchmark: Neural Network Embebido ===\n")
504-
505-
# Entrenamiento
506-
start = time.time()
507-
result = miniml.train_pipeline(
508-
"bench_nn", xor_data, "neural_network",
509-
params={"n_inputs": 2, "n_hidden": 4, "n_outputs": 1, "epochs": 2000},
510-
scaling="minmax"
511-
)
512-
train_time = time.time() - start
513-
514-
# Exportación
515-
start = time.time()
516-
c_code = miniml.export_to_c("bench_nn")
517-
export_time = time.time() - start
518-
519-
# Métricas
520-
model = result['model']
521-
code_size = len(c_code)
522-
523-
print(f"Tiempo de entrenamiento: {train_time:.3f}s")
524-
print(f"Tiempo de exportación: {export_time:.3f}s")
525-
print(f"Tamaño del código C: {code_size} bytes")
526-
print(f"act_scales: {getattr(model, 'act_scales', 'N/A')}")
527-
print(f"Cuantificado: {getattr(model, 'quantized', False)}")
528-
PYEOF
529-
530-
python benchmark_embedded.py
475+
#-----------------------------------------------------------------

0 commit comments

Comments
 (0)