Skip to content

Commit

Permalink
Fix code blocks rendering (flyteorg#903)
Browse files Browse the repository at this point in the history
Signed-off-by: 3t8 <[email protected]>

Signed-off-by: 3t8 <[email protected]>
Co-authored-by: Samhita Alla <[email protected]>
  • Loading branch information
3t8 and samhita-alla authored Oct 6, 2022
1 parent 1e87501 commit cfcf017
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ and be able to use the statistical representation for many validations and drift
To be able use it, pass in a ``pandas.DataFrame`` to a task and call:

.. code:: python
@task
def profiling_task(data: pd.DataFrame) -> DatasetProfileView:
results = why.log(data)
Expand All @@ -30,6 +31,7 @@ This will grant any downstream task the ability to ingest the profiled dataset a
basically anything from whylogs' api, such as transforming it back to a pandas DataFrame:

.. code:: python
@task
def consume_profile_view(profile_view: DatasetProfileView) -> pd.DataFrame:
return profile_view.to_pandas()
Expand All @@ -44,6 +46,7 @@ against the one that was used to train the model that's in production.
To use it, simply take in the two desired ``pandas.DataFrame`` objects and call:

.. code:: python
renderer = WhylogsSummaryDriftRenderer()
report = renderer.to_html(target_data=new_data, reference_data=reference_data)
flytekit.Deck("summary drift", report)
Expand All @@ -53,6 +56,7 @@ have a neat view on a Flyte Deck that will give intuition on which are the passe
them to act quicker on potentially wrong results.

.. code:: python
from whylogs.core.constraints.factories import greater_than_number
@task
Expand All @@ -73,6 +77,7 @@ Other use-case would be to return the constraints report itself and parse it to
systems automatically.

.. code:: python
constraints = builder.build()
constraints.report()
Expand All @@ -85,6 +90,7 @@ Installing the plugin
In order to have the whylogs plugin installed, simply run:

.. code:: bash
pip install flytekitplugins.whylogs
And you should then have it available to use on your environment!
Expand Down

0 comments on commit cfcf017

Please sign in to comment.