Skip to content

Commit

Permalink
fix(ci): include mermaid diagrams as png and svg (technical)
Browse files Browse the repository at this point in the history
For a while, we have suffered from random timeouts when rendering the book.
The log-output from GHA during the "Render book" stage just ended with:

|.............................................| 100% output file: advanced_technical_aspects_of_mlr3.knit.md

Error: The operation was canceled.

after hitting the maximum runtime of 6 hours.
(the success rate was around 50/50).

When rendering with the --execute-debug flag
more log-output was given.
The log output at the end of rendering the technical chapter (pdf) was:

|
|.............................................| 100%

output file: advanced_technical_aspects_of_mlr3.knit.md

[knitr engine]: writing results
[knitr engine]: exiting
Error: The operation was canceled.

for the other chapters when rendering to pdf, the output was

|............................................| 100%

output file: preprocessing.knit.md

[knitr engine]: writing results
[knitr engine]: exiting
[knitr engine]: postprocess
[knitr engine]: writing results
[knitr engine]: exiting

--> something with the postprocessing went wrong and the bug was identified to be in the technical chapter

The problem was NOT the large-scale benchmarking chapter

quarto-dev/quarto-actions#45 (comment)
  • Loading branch information
sebffischer committed Nov 7, 2023
1 parent 366dcc8 commit 6cadb8e
Show file tree
Hide file tree
Showing 7 changed files with 178 additions and 62 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/book-weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ jobs:
restore-keys: ${{ runner.os }}-openml-

- name: Render book
run: quarto render book/ --cache-refresh
run: quarto render book/ --cache-refresh --execute-debug
2 changes: 1 addition & 1 deletion .github/workflows/build-book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
restore-keys: ${{ runner.os }}-openml-

- name: Render book
run: quarto render book/ --cache-refresh
run: quarto render book/ --cache-refresh --execute-debug

- name: Add .lycheeignore
run: cp .lycheeignore book/_book/.lycheeignore
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 54 additions & 0 deletions book/chapters/chapter10/Figures/cpu_utilization_1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 51 additions & 0 deletions book/chapters/chapter10/Figures/cpu_utilization_2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
131 changes: 71 additions & 60 deletions book/chapters/chapter10/advanced_technical_aspects_of_mlr3.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -372,66 +372,77 @@ In contrast, if we parallelize the inner benchmark (@fig-parallel-inner) then th
future::plan(list("sequential", "multisession"))
```

```{mermaid}
%%| fig-width: 5.5
%%| fig-responsive: false
%%| label: fig-parallel-outer
%%| fig-cap: CPU utilization for four CPUs while parallelizing the outer five-fold CV with a sequential two-fold CV inside. Jobs are labeled as [iteration outer]-[iteration inner].
gantt
title CPU Utilization
dateFormat s
axisFormat %S
section C1
Iteration 1-1 :done, 0, 4s
Iteration 1-2 :done, 4, 4s
Iteration 5-1 :done, 8, 4s
Iteration 5-2 :done, 12, 4s
section C2
Iteration 2-1 :done, 0, 4s
Iteration 2-2 :done, 4, 4s
Idle :8, 8s
section C3
Iteration 3-1 :done, 0, 4s
Iteration 3-2 :done, 4, 4s
Idle :8, 8s
section C4
Iteration 4-1 :done, 0, 4s
Iteration 4-2 :done, 4, 4s
Idle :8, 8s
```

```{mermaid}
%%| fig-width: 5.5
%%| fig-responsive: false
%%| label: fig-parallel-inner
%%| fig-cap: CPU utilization for four cores while parallelizing the inner benchmarking (consisting of two holdout evaluations) with a sequential five-fold CV outside. Jobs are labeled as [iteration outer]-[iteration inner].
gantt
title CPU Utilization
dateFormat s
axisFormat %S
section C1
Iteration 1-1 :done, 0, 4s
Iteration 2-1 :done, 4, 4s
Iteration 3-1 :done, 8, 4s
Iteration 4-1 :done, 12, 4s
Iteration 5-1 :done, 16, 4s
section C2
Iteration 1-2 :done, 0, 4s
Iteration 2-2 :done, 4, 4s
Iteration 3-2 :done, 8, 4s
Iteration 4-2 :done, 12, 4s
Iteration 5-2 :done, 16, 4s
section C3
Idle :0, 20s
section C4
Idle :0, 20s
```{r, cpu-utilization-1}
#| echo: false
#| fig-width: 5.5
#| label: fig-parallel-outer
#| fig-cap: CPU utilization for four CPUs while parallelizing the outer five-fold CV with a sequential two-fold CV inside. Jobs are labeled as [iteration outer]-[iteration inner].
include_multi_graphics("cpu_utilization_1")
```


```{r, include = FALSE}
#| fig-responsive: false
#gantt
# title CPU Utilization
# dateFormat s
# axisFormat %S
# section C1
# Iteration 1-1 :done, 0, 4s
# Iteration 1-2 :done, 4, 4s
# Iteration 5-1 :done, 8, 4s
# Iteration 5-2 :done, 12, 4s
#
# section C2
# Iteration 2-1 :done, 0, 4s
# Iteration 2-2 :done, 4, 4s
# Idle :8, 8s
#
# section C3
# Iteration 3-1 :done, 0, 4s
# Iteration 3-2 :done, 4, 4s
# Idle :8, 8s
#
# section C4
# Iteration 4-1 :done, 0, 4s
# Iteration 4-2 :done, 4, 4s
# Idle :8, 8s
```


```{r, cpu-utilization-2}
#| echo: false
#| fig-width: 5.5
#| label: fig-parallel-inner
#| fig-cap: CPU utilization for four cores while parallelizing the inner benchmarking (consisting of two holdout evaluations) with a sequential five-fold CV outside. Jobs are labeled as [iteration outer]-[iteration inner].
include_multi_graphics("cpu_utilization_2")
```

```{r, include = FALSE}
#| fig-responsive: false
#gantt
# title CPU Utilization
# dateFormat s
# axisFormat %S
# section C1
# Iteration 1-1 :done, 0, 4s
# Iteration 2-1 :done, 4, 4s
# Iteration 3-1 :done, 8, 4s
# Iteration 4-1 :done, 12, 4s
# Iteration 5-1 :done, 16, 4s
#
# section C2
# Iteration 1-2 :done, 0, 4s
# Iteration 2-2 :done, 4, 4s
# Iteration 3-2 :done, 8, 4s
# Iteration 4-2 :done, 12, 4s
# Iteration 5-2 :done, 16, 4s
#
# section C3
# Idle :0, 20s
#
# section C4
# Idle :0, 20s
```

In this example, both possibilities for parallelization are not exploiting the full potential of the four cores.
Expand Down

0 comments on commit 6cadb8e

Please sign in to comment.