Project-MONAI / Project-MONAI/tutorials

The execution of `runner.sh` is timing out due to the large dataset

Abierto
#1,728 0 comentarios 1 reacción 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Lenguaje dominante
Jupyter Notebook
Estrellas
2.5k
Forks
803
Merge medio
6 d 22 h
PR fusionados (30 d)
3

Descripción

Describe the bug

When I previously submitted a new tutorial via a PR #1696 , I encountered a timeout issue while verifying the code using runner.sh. Subsequently, I tried to verify other notebooks already in monai/tutorials (e.g., spleen_segmentation_3d.ipynb) using the same method and faced similar issues. However, the timeout problem with these notebooks is sometimes not due to the code itself but because the dataset size is huge, causing the download to take too much time. Therefore, I suggest adding a block in runner.sh to check the time taken for the notebook to download the dataset. Although runner.sh shows the line number of the exit code when a timeout occurs, the timeout issue may not necessarily be caused by that line of code.

To Reproduce
Execute the following commands locally
./runner.sh -t 3d_segmentation/brats_segmentation_3d.ipynb
./runner.sh -t 3d_segmentation/spleen_segmentation_3d.ipynb

Expected behavior

There is a section in runner.sh that checks for the presence of "Setup imports" and whether the block following it is for importing various required packages for the notebook.

        # if import is used, then it should have the Setup import(s) markdown
        if [[ $(${NB_TEST} verify -f "$fname" -k "(^import|[\n\r]import|^from|[\n\r]from)" --type code) == true ]]
        then
            if [[ $(${NB_TEST} verify -f "$fname" -i $((code_ind + 1)) -k "Setup import") != true ]]; then
                print_error_msg "Missing the \"Setup imports\" after the first code cell of file: $fname"
                standardized=false
            fi

            if [[ $(${NB_TEST} verify -f "$fname" -i $((code_ind + 2)) -k "print_config()" --type code) != true ]]; then
                print_error_msg "print_config() cannot be found after the \"Setup imports\" markdown cell in file: $fname"
                standardized=false
            fi
        fi

We could use a similar method to add a block of code that checks for the presence of "Download dataset" and measures the download time for the subsequent block. With this update, we can better understand the cause of the timeout when verifying notebooks using runner.sh.

Guía de contribución

Abrir la guía de contribución

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.

Línea de trabajo

Comienza con runner.sh y reproduce el tiempo de espera agotado con los dos comandos para brats_segmentation_3d.ipynb y spleen_segmentation_3d.ipynb. Lee el bloque de validación existente "Setup imports" y determina cómo una sección "Download dataset" podría informar del tiempo de descarga. Se considera terminado cuando runner.sh permite distinguir la contribución de la descarga del conjunto de datos a un tiempo de espera agotado.

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

Evaluación

Stack tecnológico
jupyter-notebook, shell
Área
testing-qa, tooling
Tipo de issue
Nueva funcionalidad
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.