machine-learning-exchange / mlx

Machine Learning eXchange (MLX). Data and AI Assets Catalog and Execution Engine
https://ml-exchange.org/
Apache License 2.0
204 stars 54 forks source link

[UI] Errors when README file is pointing to the wrong link. #226

Open Tomcli opened 2 years ago

Tomcli commented 2 years ago

Describe the bug When the yaml readme url doesn't exist or pointing to the wrong link, it shows the below error

Screen Shot 2021-09-24 at 1 50 46 PM

We need to render the old description if the README link is not valid.

Tomcli commented 2 years ago

/assign @drewbutlerbb4

Tomcli commented 2 years ago

to reproduce, pick one of the model yaml and change the link to an invalid link.

ckadner commented 2 years ago

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

ckadner commented 2 years ago

This issue was commented on by @Tomcli on PR #228

One of the use cases we want to cover here is when the readme_url is not valid. We want to have some fall back logic if one of those README links returns a 404 error.

https://github.com/machine-learning-exchange/mlx/pull/228/files/b10757caeddb0c0a2319ce9e60bb84f4ac956511#diff-aa0b470e70dc717de2281a8b225628a8239f9a65dbb2f2fe8ea2492abdf0359f

ckadner commented 2 years ago

Alternative ways to address this issue:

  1. During upload, the API can validate the readme_url -- This is not perfect since that URL may no longer be available after some time
  2. 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
  3. Additionally, for MLX catalog assets, add a check to make sure the readme_urls are valid (machine-learning-exchange/katalog#43)
drewbutlerbb4 commented 2 years ago

To piggyback off of @ckadner's comment, I will add some notes for this issue.

  1. 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:

MarkdownViewer ModelDetail DatasetDetail