mlx
mlx copied to clipboard
[UI] Errors when README file is pointing to the wrong link.
Describe the bug
When the yaml readme url doesn't exist or pointing to the wrong link, it shows the below error

We need to render the old description if the README link is not valid.
/assign @drewbutlerbb4
to reproduce, pick one of the model yaml and change the link to an invalid link.
Thanks @Tomcli -- this is a good hole to plug, especially when URL go out of date.
I added an issue to help keep URL working: https://github.com/machine-learning-exchange/katalog/issues/43
However, we also need to give the user who uploaded the YAML some feedback on an invalid readme_url to not let a typo in the URL get unnoticed
This issue was commented on by @Tomcli on PR #228
One of the use cases we want to cover here is when the
readme_urlis not valid. We want to have some fall back logic if one of those README links returns a404error.
https://github.com/machine-learning-exchange/mlx/pull/228/files/b10757caeddb0c0a2319ce9e60bb84f4ac956511#diff-aa0b470e70dc717de2281a8b225628a8239f9a65dbb2f2fe8ea2492abdf0359f
Alternative ways to address this issue:
- During upload, the API can validate the
readme_url-- This is not perfect since that URL may no longer be available after some time - In the UI, every time an assets details are loaded, check for a 404 and fall back to the old description tab before loading and rendering the Readme tab
- Additionally, for MLX catalog assets, add a check to make sure the
readme_urls are valid (machine-learning-exchange/katalog#43)
To piggyback off of @ckadner's comment, I will add some notes for this issue.
- In the UI, every time an assets details are loaded, check for a 404 and fall back to the old description tab before loading and rendering the Readme tab
The UI can independently query the markdown file url and if a failing status is returned then the UI can fallback on the old asset detail tab. In this case the following will be needed: - Add a loading message where the markdown viewer should be. This is important for when a request receives no response, so that the UI doesn't wait until the request timeout period. - Query the markdown file url and verify existence