Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add keyword explain to private vizro-ai method #256

Merged
merged 11 commits into from
Jan 9, 2024

Conversation

maxschulz-COL
Copy link
Contributor

Description

Currently the docs example:

import vizro.plotly.express as px
from vizro_ai import VizroAI

vizro_ai = VizroAI()

df = px.data.gapminder()
code_string = vizro_ai._get_chart_code(df, "describe life expectancy per continent over time", explain=True)

fails due to the keyword explain not being present.

Given that users might want to extract the code, explanation and insights separately, it makes sense to allow this keyword AND to also allow the return of the entire dictionary containing the code string, explanation and insights (see updated docs example).

Screenshot

Notice

  • I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":

    • I submit this contribution under the Apache 2.0 license and represent that I am entitled to do so on behalf of myself, my employer, or relevant third parties, as applicable.
    • I certify that (a) this contribution is my original creation and / or (b) to the extent it is not my original creation, I am authorized to submit this contribution on behalf of the original creator(s) or their licensees.
    • I certify that the use of this contribution as authorized by the Apache 2.0 license does not violate the intellectual property rights of anyone else.
    • I have not referenced individuals, products or companies in any commits, directly or indirectly.
    • I have not added data or restricted code in any commits, directly or indirectly.

@maxschulz-COL maxschulz-COL added Bug Report 🐛 Issue contains a bug report Vizro-AI 🤖 Issue/PR that addresses Vizro-AI package labels Jan 9, 2024
vizro-ai/src/vizro_ai/_vizro_ai.py Outdated Show resolved Hide resolved
Copy link
Contributor

@Anna-Xiong Anna-Xiong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved already but we need to change it to True to get explanation otherwise it is none for explanation.

vizro-ai/docs/pages/user_guides/run_vizro_ai.md Outdated Show resolved Hide resolved
@maxschulz-COL maxschulz-COL merged commit 758ba04 into main Jan 9, 2024
33 checks passed
@maxschulz-COL maxschulz-COL deleted the bug/vizro_ai/missing_argument branch January 9, 2024 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Report 🐛 Issue contains a bug report Vizro-AI 🤖 Issue/PR that addresses Vizro-AI package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants