Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

cluster_pilots.py shows a traceback for a bad --k and leaves outputs when --truth is invalid

Abierto Apto para principiantes
#232 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 4 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
83/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python
Área
cli, testing

Línea de trabajo

Empieza por inference/cluster_pilots.py y las pruebas de CLI en tests/test_cluster_pilots.py; compara cómo se gestiona un --k no válido con el error de uso existente --truth-without---k. Comprueba que las entradas truth no válidas se rechacen antes de escribir ningún CSV. El trabajo está terminado cuando las entradas incorrectas muestran un error de uso de una sola línea con código de salida 2 y las ejecuciones fallidas no dejan archivos de salida.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

area:ml bug python

Describe the bug
Two behaviours of inference/cluster_pilots.py on the #225 branch. An out-of-range --k ends in a raw ValueError traceback. If --truth is invalid, the group and centre CSVs have already been written when the error is raised, so a failed run leaves half its outputs.

To Reproduce

  1. Run generate_synthetic_pilots.py, then compute_features.py on its output.
  2. python inference/cluster_pilots.py --k 1 prints a traceback ending ValueError: k must be 2 to 5 for 15 pilots, got 1.
  3. Repeat a row in inference/Data/synthetic_pilot_tiers.csv, then run python inference/cluster_pilots.py --k 3 --truth inference/Data/synthetic_pilot_tiers.csv. pilot_clusters.csv and group_centres.csv are written, then ValueError: Pilot(s) repeated in truth: P01.

Expected behavior
A one-line usage error and exit status 2 for a bad --k, as --truth without --k already gives. No output files when the run fails.

Screenshots
Not applicable.

Additional context
Fit and score first, then write; use parser.error for input errors. Needs CLI tests in tests/test_cluster_pilots.py.

Lenguaje dominante
Rust
Estrellas
4
Forks
8
Merge medio
3 d 12 h
PR fusionados (30 d)
16

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de oss-slu/PilotDataSynchronization

Todos los issues de oss-slu/PilotDataSynchronization

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.