ai4co / rl4co

A PyTorch library for all things Reinforcement Learning (RL) for Combinatorial Optimization (CO)

Home Page:https://rl4.co

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Cannot click on "Open in Colab" badges

leonlan opened this issue · comments

Describe the bug

I cannot click on "Open in Colab" badge in examples that are displayed in the documentation.

To Reproduce

System info

N/A

Additional context

I was trying to see how you implemented Colab notebooks for your examples and then I noticed this behavior :-).

Reason and Possible fixes

Instead of using HTML hyperlinks like this:

"<a href=\"https://colab.research.google.com/github/ai4co/rl4co/blob/main/examples/2-full-training.ipynb\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"></a>\n"

I think it will work when you use Markdown-style rendering like this:

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ai4co/rl4co/blob/main/examples/2-full-training.ipynb)

That works for me when notebooks are rendered using nbsphinx. Not 100% sure though if this also fixes this issue.

Checklist

  • I have checked that there is no similar issue in the repo (required)
  • I have provided a minimal working example to reproduce the bug (required)

Thanks @leonlan for reporting! We noticed this as well before, it seems to be a problem with the compilation of Jupyter notebooks that "flatten" those buttons 🤔

We are planning to go through the docs before the 0.5.0, possibly changing the template to something a better than the PyTorch Lightning docs one (maybe trying to copy-paste from your PyVRP ;) ). Similarly let's switch the main installer to poetry @cbhua , it is long due 🤣

Latest version of the documentation is out!

https://rl4co.readthedocs.io/en/latest/

The Colab badge seems to work fine now ~

docs looking good :-)

We imitated quite a bit PyVRP's style ;)
(But we did in MkDocs which turned out to be... quite a bit harder than expected 🤣 )