question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Compatible with Metaflow-card-html

See original GitHub issue

I would love to integrate Evidently solution into my current ML deployment framework: Metaflow It supports visualizing rich HTML as Metaflow Cards.

Specifically, it is possible to use a special card (type=‘html’) that support interactive visualizations in html format.

But, Metaflow requires the final html file to be stored as a class attribute (self.html) so it can be rendered.

I identified the protected method, _repr_html_(), which outputs the content of HTML. But in order to make it work, it has to be using the “inline” mode, instead of the current hard-coded “auto”

Would it be possible to make this a selectable parameter, that by default = “auto”? Or even better, expose a non-protected method to print the html output so then it becomes fully compatible with Metaflow?

contents of data_stability._repr_html_():

image

changing to “inline” mode:

        from evidently.renderers.notebook_utils import determine_template
        from evidently.utils.dashboard import TemplateParams

        dashboard_id, dashboard_info, graphs = data_stability._build_dashboard_info()
        template_params = TemplateParams(
            dashboard_id=dashboard_id,
            dashboard_info=dashboard_info,
            additional_graphs=graphs,
        )
        self.html = data_stability._render(
            determine_template("inline"), template_params
        )

image

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
marcellovictorinocommented, Nov 29, 2022

Sounds great! I would be happy to raise a PR for it 😃

It ties in so nicely with Metaflow! I will aim to get it done before the end of this week.

Cheers! Marcello Victorino

Sent from my iPhone

On 29 Nov 2022, at 18:51, elenasamuylova @.***> wrote:

Hi Marcello @marcellovictorino, that is so awesome! Glad it is solved. Would you be interested in making the contribution to the docs here?

You can create a PR with exactly the text that you shared here and place it in a new evidently-and-metaflow.md here https://github.com/evidentlyai/evidently/tree/main/docs/book/integrations.

Want to make sure we give the right credit! 😃

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

0reactions
elenasamuylovacommented, Dec 2, 2022

Thanks for the contribution @marcellovictorino! Merged and already in the docs: https://github.com/evidentlyai/evidently/issues/464

Feel free to join our Discord community, too, would be glad to give the contributor role there too! https://discord.com/invite/xZjKRaNp8b

Read more comments on GitHub >

github_iconTop Results From Across the Web

metaflow-card-html - PyPI
This card is meant to render HTML passed as a string. If you pass a non-string value, this card will attempt to render...
Read more >
Cards - Visualizing results - Metaflow Docs
Metaflow Cards allows you to produce human-readable reports in workflows. Use the following APIs to enable, customize, and access cards:
Read more >
metaflow/metaflow_config.py at master - GitHub
metaflow/metaflow_config.py at master · Netflix/metaflow. ... Cards related config variables ... Checks version compatibility with Metadata service.
Read more >
A Tour of End-to-End Machine Learning Platforms - KDnuggets
Machine Learning (ML) is known as the high-interest credit card of ... Their solution was Metaflow, a Python library for data scientists ...
Read more >
API Comparisons — Ray 2.2.0 - the Ray documentation
https://docs.metaflow.org/metaflow/basics#foreach from metaflow import ... "House of Cards", "Narcos"] self.next(self.a, foreach="titles") @step def ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found