mbatoul / sklearn_benchmarks

Comparative benchmarking library for scikit-learn's estimators
https://mbatoul.github.io/sklearn_benchmarks/
0 stars 1 forks source link

Anchor links are hidden and have id collisions #13

Closed ogrisel closed 2 years ago

ogrisel commented 2 years ago

For instance, it would be interesting to directly link to the speed-up bar plots of kmeans using:

https://mbatoul.github.io/sklearn_benchmarks/results/hpc_cluster/20211126T164327/scikit_learn_intelex_vs_scikit_learn.html#Speedup-barplots

but since all the estimators have the same repeated section ids, this matches the first occurrence in the page, in this case the k-NN speed-up barplots. Here is the part of the DOM with one such anchor link:

image

Also the inline CSS is currently hiding them (maybe because they do not work?):

image

It would be nice to find a way to display visible anchors with unique identifiers, maybe with the estimator names. Not sure if it's easy to do or not.

ogrisel commented 2 years ago

It seems that nbconvert does not do anything to avoid collisions in header ids:

https://github.com/jupyter/nbconvert/blob/4607ed2078f38a63d055e76307d9f66f32e8a5fd/nbconvert/filters/strings.py#L104

ogrisel commented 2 years ago

I reported the problem upstream under https://github.com/jupyter/nbconvert/issues/1682. In the mean time we could always include the estimator name in the sub-section headers to work-around the problem.

ogrisel commented 2 years ago

I am not sure why we get the display: none CSS though...

mbatoul commented 2 years ago

Fixed in eba01dc07d7b168ffb6e1ebe4f92704250231d83.