Logbook for August 23

logbook
git
holoviz
nbdev
wsl
Published

August 1, 2023

holoviz and datashader, nbdev-mkdocs, git revert, wsl-vpnkit stopped to work

Week 34 - August 23

Monday 08/21

datashader or how to use plotly/bokeh with millions of points

Before vacations I had some issues to have it run in a custom python environment.

Now I have fixed it by: * installing pyviz_comms in my jupyter environment (e.g. conda install -n base_jupyter -c pyviz pyviz_comms) * adding these commands to my active environment

conda install -c pyviz hvplot datashader
pip install -I pyarrow==11.0.0
pip install -Iv numpy==1.23.0

And then I can just use it with:

import hvplot.pandas
df.hvplot.scatter(x='x', y='y', rasterize=True, cnorm='eq_hist', width=1200, height=600, c='sigma_1', dynspread=True)

Should now create a blog entry to fully present that. Can start from the working example at gitlab > dataprophet_TL > nbs > 7_datashader.ipynb

Tuesday 08/22

Trying nbdev-mkdocs which is providing a more modern version of doc website for nbdev using mkdocs.

But I have an issue when converting for janus-tools lib, as explained in issue #209

Should start from scratch or bisect existing lib.

Thursday 08/24

git or how to revert one file from a previous commit

Let’s say I want to revert to a previous commit the file 3 - uq_conformal - dataset_S.ipynb

1st to do is to list all known commits where this file is involved with git log –oneline

 git log --oneline 3\ -\ uq_conformal\ -\ dataset_S.ipynb
2888291 exploration espace latent
f16fce7 training on dataset_S

I would like to get back to the version in commit f16fce7

Then to revert, it is just about using git checkout

git checkout f16fce7 -- 3\ -\ uq_conformal\ -\ dataset_S.ipynb

and then to commit and push

Friday 08/25

Looks like no dns access today on my wsl.

1st symptom was a timeout on a git fetch.

Then host google.fr has a timeoiut as well.

I then realized that wsl-vpnkit was stopped. Strange it is supposed to be launched automatically with my distro.

Starting wsl-vpnkit manually (wsl -d wsl-vpnkit service wsl-vpnkit start) doesn’t help because at each DNS request, wsl-vpnkit is killed.

Looking at the wsl-vpnkit logs with wsl.exe -d wsl-vpnkit --cd /app tail -f /var/log/wsl-vpnkit.log

gives this

ip: RTNETLINK answers: File exists
ip: RTNETLINK answers: File exists
restored WSL 2 ip route
wsl-gvproxy.exe exists at ./wsl-vpnkit/wsl-gvproxy.exe
starting gvproxy at ./wsl-vpnkit/wsl-gvproxy.exe...
started gvproxy
waiting for dhcp...
time="2023-08-25T07:47:08Z" level=fatal msg="cannot connect to host: fork/exec ./wsl-vpnkit/wsl-gvproxy.exe: exec format error"
sh: can't kill pid 51: No such process
wsl-vm exited

Googling this error gives me cannot connect to host: fork/exec /app/wsl-gvproxy.exe: no such file or directory #217 on wsl-vpnkit github issues.

And points to WSL2 (Preview) cannot run .exe files: exec format error: wsl.exe #8952 on WSL github issues.

Suggestion is to run:

sudo sh -c 'echo :WSLInterop:M::MZ::/init:PF > /usr/lib/binfmt.d/WSLInterop.conf'
sudo systemctl unmask systemd-binfmt.service
sudo systemctl restart systemd-binfmt
sudo systemctl mask systemd-binfmt.service

And it works

Adding this to WSL2 blog entry.