diff --git a/.clean_local_env.sh b/.clean_local_env.sh new file mode 100755 index 0000000..4b877d2 --- /dev/null +++ b/.clean_local_env.sh @@ -0,0 +1,6 @@ +# This script undoes the effect of .setup_local_env.sh + +rm ./src/**/lib +rm ./src/**/.latexmkrc +rm ./src/**/src + diff --git a/.setup_local_env.sh b/.setup_local_env.sh new file mode 100755 index 0000000..5f096c4 --- /dev/null +++ b/.setup_local_env.sh @@ -0,0 +1,25 @@ +# This script sets up the environment to be able to compile the latex source +# files from within the 'src' directory with latexmk. +# +# Context: The project is set up in such a way that running make from the root +# directory compiles all documents. When using vimtex, however, when compiling +# a document it is always assumed that the root directory is that of the +# document currently being edited. Running this script enables the documents in +# 'src' to be edited and compiled with vimtex as well. + +SRC_DIRS=$(ls src) + +for SRC_DIR in $SRC_DIRS; do + # Create the latexmkrc file. Note the -cd option which changes the working + # directory + echo '$pdflatex="pdflatex -shell-escape -interaction=nonstopmode -synctex=1 %O %S -cd ./../..";' > ./src/$SRC_DIR/.latexmkrc + echo '$out_dir = "build";' >> ./src/$SRC_DIR/.latexmkrc + echo '$pdf_mode = 1;' >> ./src/$SRC_DIR/.latexmkrc + + # Changing the working driectory using the -cd option seems to only affect + # source files. + #ln -s `pwd`/src ./src + ln -s `pwd`/lib ./src/$SRC_DIR/lib + ln -s `pwd`/src ./src/$SRC_DIR/src +done + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7726442 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM ubuntu:24.04 + +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt update -y && apt upgrade -y +RUN apt install make texlive latexmk texlive-pictures -y +RUN apt install texlive-publishers texlive-science texlive-fonts-extra texlive-latex-extra -y +RUN apt install biber texlive-bibtex-extra -y + +RUN apt install python3 python3-pygments -y + +# The 'bbm' package insists on generating stuff in the home directory. In +# order to guarantee access to the home directory no matter the user the +# docker container is run with, create a temporary one anyone can write to +RUN mkdir /tmp/home +RUN chmod -R 777 /tmp/home +ENV HOME=/tmp/home + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..06572f8 --- /dev/null +++ b/Makefile @@ -0,0 +1,7 @@ +all: + mkdir -p build/build + + latexmk src/2024-12-03/presentation.tex + mv build/presentation.pdf build/presentation_2024-12-03.pdf +clean: + rm -rf build diff --git a/README.md b/README.md new file mode 100644 index 0000000..d3f855e --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ +# CEL Presentation + +LaTeX sources for a presentation held at CEL on the 21.06.2024. + +## Build + +### Build manually + +```bash +$ make +``` + +### Build using docker + +1. Build docker image + ```bash + $ docker build -f Dockerfile . -t hiwi-presentations + ``` +1. Build examples + ```bash + $ docker run --rm -v $PWD:$PWD -w $PWD -u `id -u`:`id -g` hiwi-presentations make + ``` diff --git a/src/2024-12-03/presentation.tex b/src/2024-12-03/presentation.tex index 76a9d28..e72dead 100644 --- a/src/2024-12-03/presentation.tex +++ b/src/2024-12-03/presentation.tex @@ -31,6 +31,9 @@ \input{lib/latex-common/common.tex} \pgfplotsset{colorscheme/cel} +\newcommand{\res}{src/2024-12-03/res} + + % % % CEL Template @@ -161,23 +164,23 @@ def decode(self, y: torch.Tensor) -> torch.Tensor: ] \addplot+[scol0, mark=none, line width=1pt, densely dashed, forget plot] table[col sep=comma, x=Eb_N0, y=FER] - {res/performance_204.33.484.csv}; + {\res/performance_204.33.484.csv}; \addplot+[scol0, mark=none, line width=1pt] table[col sep=comma, x=Eb_N0, y=BER] - {res/performance_204.33.484.csv}; + {\res/performance_204.33.484.csv}; \addlegendentry{Adam Decoder} \addplot+[scol2, mark=none, line width=1pt, densely dashed, forget plot] table[col sep=comma, x=Eb_N0, y=FER] - {res/proximal_performance_204.33.484.csv}; + {\res/proximal_performance_204.33.484.csv}; \addplot+[scol2, mark=none, line width=1pt] table[col sep=comma, x=Eb_N0, y=BER] - {res/proximal_performance_204.33.484.csv}; + {\res/proximal_performance_204.33.484.csv}; \addlegendentry{Proximal Decoder} \addplot+[black, mark=none, line width=1pt, densely dashed, forget plot] table[col sep=comma, x=Eb_N0, y=FER] - {res/ml_performance_204.33.484.csv}; + {\res/ml_performance_204.33.484.csv}; \addlegendimage{black, mark=none, line width=1pt} \addlegendentry{ML Decoder\citereference{Hel+23}} \end{axis} @@ -221,11 +224,11 @@ def decode(self, y: torch.Tensor) -> torch.Tensor: ] \addplot+[scol0, mark=none, line width=1pt, densely dashed] table[col sep=comma, x=learning_rate, y=FER, discard if not={Eb_N0}{4.0}] - {res/parameter_choice_learning_rate.csv}; + {\res/parameter_choice_learning_rate.csv}; \addplot+[scol0, mark=none, line width=1pt] table[col sep=comma, x=learning_rate, y=BER, discard if not={Eb_N0}{4.0}] - {res/parameter_choice_learning_rate.csv}; + {\res/parameter_choice_learning_rate.csv}; \draw[scol1] (axis cs:5e-2,0.001) -- (axis cs:5e-2,2); \addplot[scol1, mark=*] coordinates {(5e-2,0.0074)} node{}; @@ -271,11 +274,11 @@ def decode(self, y: torch.Tensor) -> torch.Tensor: ] \addplot+[scol0, mark=none, line width=1pt, densely dashed] table[col sep=comma, x=max_iter, y=FER] - {res/parameter_choice_max_iterations.csv}; + {\res/parameter_choice_max_iterations.csv}; \addplot+[scol0, mark=none, line width=1pt] table[col sep=comma, x=max_iter, y=BER] - {res/parameter_choice_max_iterations.csv}; + {\res/parameter_choice_max_iterations.csv}; \draw[scol1] (axis cs:150,1e-3) -- (axis cs:150,2); \addplot[scol1, mark=*] coordinates {(150,0.0068)} node{}; @@ -315,17 +318,17 @@ def decode(self, y: torch.Tensor) -> torch.Tensor: \addplot[scol0, line width=1pt, densely dashed] table [x=Eb_N0, y=FER, col sep=comma] - {res/performance_bch_31_26.csv}; + {\res/performance_bch_31_26.csv}; \addplot[scol0, line width=1pt] table [x=Eb_N0, y=BER, col sep=comma] - {res/performance_bch_31_26.csv}; + {\res/performance_bch_31_26.csv}; \addplot[scol2, line width=1pt, densely dashed] table [x=Eb_N0, y=FER, col sep=comma] - {res/proximal_performance_bch_31_26.csv}; + {\res/proximal_performance_bch_31_26.csv}; \addplot[scol2, line width=1pt] table [x=Eb_N0, y=BER, col sep=comma] - {res/proximal_performance_bch_31_26.csv}; + {\res/proximal_performance_bch_31_26.csv}; \end{axis} \end{tikzpicture} @@ -349,17 +352,17 @@ def decode(self, y: torch.Tensor) -> torch.Tensor: \addplot[scol0, line width=1pt, solid, densely dashed] table [x=Eb_N0, y=FER, col sep=comma] - {res/performance_96.33.965.csv}; + {\res/performance_96.33.965.csv}; \addplot[scol0, line width=1pt, solid] table [x=Eb_N0, y=BER, col sep=comma] - {res/performance_96.33.965.csv}; + {\res/performance_96.33.965.csv}; \addplot[scol2, line width=1pt, solid, densely dashed] table [x=Eb_N0, y=FER, col sep=comma] - {res/proximal_performance_96.33.965.csv}; + {\res/proximal_performance_96.33.965.csv}; \addplot[scol2, line width=1pt, solid] table [x=Eb_N0, y=BER, col sep=comma] - {res/proximal_performance_96.33.965.csv}; + {\res/proximal_performance_96.33.965.csv}; \end{axis} \end{tikzpicture} @@ -388,20 +391,20 @@ def decode(self, y: torch.Tensor) -> torch.Tensor: \addplot[scol0, line width=1pt, densely dashed] table [x=Eb_N0, y=FER, col sep=comma, discard if gt={Eb_N0}{6}] - {res/performance_204.33.484.csv}; + {\res/performance_204.33.484.csv}; \addplot[scol0, line width=1pt] table [x=Eb_N0, y=BER, col sep=comma, discard if gt={Eb_N0}{6}] - {res/performance_204.33.484.csv}; + {\res/performance_204.33.484.csv}; \addplot[scol2, line width=1pt, densely dashed] table [x=Eb_N0, y=FER, col sep=comma, discard if gt={Eb_N0}{6}] - {res/proximal_performance_204.33.484.csv}; + {\res/proximal_performance_204.33.484.csv}; \addplot[scol2, line width=1pt] table [x=Eb_N0, y=BER, col sep=comma, discard if gt={Eb_N0}{6}] - {res/proximal_performance_204.33.484.csv}; + {\res/proximal_performance_204.33.484.csv}; \end{axis} \end{tikzpicture} @@ -426,17 +429,17 @@ def decode(self, y: torch.Tensor) -> torch.Tensor: \addplot[scol0, line width=1pt, densely dashed] table [x=Eb_N0, y=FER, col sep=comma] - {res/performance_204.55.187.csv}; + {\res/performance_204.55.187.csv}; \addplot[scol0, line width=1pt] table [x=Eb_N0, y=BER, col sep=comma] - {res/performance_204.55.187.csv}; + {\res/performance_204.55.187.csv}; \addplot[scol2, line width=1pt, densely dashed] table [x=Eb_N0, y=FER, col sep=comma] - {res/proximal_performance_204.55.187.csv}; + {\res/proximal_performance_204.55.187.csv}; \addplot[scol2, line width=1pt] table [x=Eb_N0, y=BER, col sep=comma] - {res/proximal_performance_204.55.187.csv}; + {\res/proximal_performance_204.55.187.csv}; \end{axis} \end{tikzpicture}