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

Expose all settings in ydata-profiling ProfileReport #2921

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eapolinario
Copy link
Collaborator

@eapolinario eapolinario commented Nov 12, 2024

Why are the changes needed?

ydata-profiling ProfileReport has a rich set of settings that should be exposed in flyte decks.

What changes were proposed in this pull request?

Expose kwargs passed directly to the constructor of ProfileReport.

I set the minimal version of ydata-profiling to 2.4.0 to support minimal-mode.

How was this patch tested?

Setup process

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Related to flyteorg/flyte#5993

Docs link

@@ -53,12 +53,21 @@ class FrameProfilingRenderer:
Generate a ProfileReport based on a pandas DataFrame
"""

def __init__(self, title: str = "Pandas Profiling Report"):
def __init__(self, title: Optional[str] = None):
Copy link
Member

Choose a reason for hiding this comment

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

API wise, there are now two places to set kwargs for ydata_profiling.ProfileReport, in __init__ (for only title) and in to_html.

By looking at the Renderable protocol, it looks like the design was to have configuration passed in __init__, because the to_html to restricted to one input:

https://github.com/flyteorg/flytekit/blob/master/flytekit/deck/renderer.py#L17-L23

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, I saw that, but I don't think we quite adhering to the protocol everywhere, for example the pandera renderer.

This is an indication that all invocations of to_html happen in user-code, so the protocol is "just" a convention? Can we make it more strict (and if so, I think we should add kwargs to the protocol).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants