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

Introducing whylogs integration to flytekit #1104

Merged
merged 10 commits into from
Jul 18, 2022

Conversation

murilommen
Copy link
Contributor

TL;DR

Whylogs plugin integration

Type

  • Bug Fix
  • Feature
  • Plugin

Are all requirements met?

  • Code completed
  • Smoke tested
  • Unit tests added
  • Code documentation added
  • Any pending items have an associated Issue

Complete description

It creates a schema for "transforming" whylogs' DatasetProfileView objects to and from the FlyteSchema. This PR also creates two renderers, one for whylogs' Constraints report and the other for the SummaryDrift Report.

Tracking Issue

NA

Follow-up issue

NA

NOTE: This PR solves for #1100 . Had to make some fixes for wrongly signed-off commits

* Details: It creates a schema for "transforming" whylogs' DatasetProfileView objects to and from the FlyteSchema. This PR also creates two renderers with FlyteDeck, one for the Constraints report and the other for the SummaryDriftReport.

Signed-off-by: murilommen <[email protected]>
changes: breaking down single test_schema.py unit test into test_schema + test_renderer, each with their own concerns
Signed-off-by: murilommen <[email protected]>
details: removing extra lines later caught by flake8
Signed-off-by: murilommen <[email protected]>
Copy link
Collaborator

@eapolinario eapolinario left a comment

Choose a reason for hiding this comment

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

This looks good, let's just ensure the tests you added run in CI. In order to do that, can you add the new plugin to this list?

Signed-off-by: murilommen <[email protected]>
@wild-endeavor
Copy link
Contributor

this looks good. do you think you'll be able to add an example to https://github.com/flyteorg/flytesnacks/tree/master/cookbook/integrations/flytekit_plugins as well please?

@codecov
Copy link

codecov bot commented Jul 15, 2022

Codecov Report

Merging #1104 (e7763a4) into master (58be244) will increase coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1104      +/-   ##
==========================================
+ Coverage   86.91%   86.93%   +0.01%     
==========================================
  Files         275      275              
  Lines       25435    25448      +13     
  Branches     2506     2862     +356     
==========================================
+ Hits        22108    22123      +15     
+ Misses       2851     2847       -4     
- Partials      476      478       +2     
Impacted Files Coverage Δ
flytekit/tools/script_mode.py 73.52% <0.00%> (-0.39%) ⬇️
flytekit/interfaces/random.py 100.00% <0.00%> (ø)
flytekit/clis/flyte_cli/main.py 44.34% <0.00%> (ø)
flytekit/extras/persistence/http.py 69.38% <0.00%> (ø)
flytekit/types/directory/types.py 94.16% <0.00%> (+0.04%) ⬆️
flytekit/types/file/file.py 92.36% <0.00%> (+0.05%) ⬆️
flytekit/types/schema/types.py 76.73% <0.00%> (+0.09%) ⬆️
flytekit/models/security.py 87.17% <0.00%> (+0.33%) ⬆️
flytekit/core/promise.py 79.09% <0.00%> (+0.37%) ⬆️
flytekit/configuration/internal.py 95.83% <0.00%> (+0.52%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 58be244...e7763a4. Read the comment docs.

@murilommen murilommen force-pushed the murilommen/whylogs-plugin branch from e4104bd to 1475a85 Compare July 15, 2022 20:04
@eapolinario
Copy link
Collaborator

It looks like version 1.0.6 of whylogs is not available in pypi. I'm seeing the same error in a local venv:

❯ pip install whylogs==1.0.6
ERROR: Could not find a version that satisfies the requirement whylogs==1.0.6 (from versions: 0.0.2b10, 0.0.2b13, 0.1.0, 0.1.1b0, 0.1.1, 0.1.2b0, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6.dev0, 0.1.6, 0.1.8, 0.1.10, 0.1.13.dev3, 0.1.13.dev4, 0.1.13.dev5, 0.1.13.dev6, 0.1.13.dev7, 0.1.13.dev8, 0.1.13, 0.2.0.dev0, 0.3.0, 0.3.1.dev0, 0.3.1.dev1, 0.3.1.dev2, 0.3.1.dev3, 0.3.1, 0.3.2, 0.3.3.dev0, 0.3.3.dev1, 0.3.3.dev2, 0.3.3.dev3, 0.3.3.dev4, 0.3.3.dev5, 0.3.3.dev6, 0.3.3.dev7, 0.3.4.dev1, 0.4.0.dev0, 0.4.1.dev0, 0.4.2.dev0, 0.4.3.dev0, 0.4.4.dev0, 0.4.5.dev0, 0.6.20.dev0, 0.6.20.dev1, 0.6.21, 0.6.22, 1.0.0.dev0, 1.0.0rc1, 1.0.0rc2, 1.0.0rc3, 1.0.0rc4, 1.0.0)
ERROR: No matching distribution found for whylogs==1.0.6

@eapolinario
Copy link
Collaborator

It looks like version 1.0.6 of whylogs is not available in pypi. I'm seeing the same error in a local venv:

❯ pip install whylogs==1.0.6
ERROR: Could not find a version that satisfies the requirement whylogs==1.0.6 (from versions: 0.0.2b10, 0.0.2b13, 0.1.0, 0.1.1b0, 0.1.1, 0.1.2b0, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6.dev0, 0.1.6, 0.1.8, 0.1.10, 0.1.13.dev3, 0.1.13.dev4, 0.1.13.dev5, 0.1.13.dev6, 0.1.13.dev7, 0.1.13.dev8, 0.1.13, 0.2.0.dev0, 0.3.0, 0.3.1.dev0, 0.3.1.dev1, 0.3.1.dev2, 0.3.1.dev3, 0.3.1, 0.3.2, 0.3.3.dev0, 0.3.3.dev1, 0.3.3.dev2, 0.3.3.dev3, 0.3.3.dev4, 0.3.3.dev5, 0.3.3.dev6, 0.3.3.dev7, 0.3.4.dev1, 0.4.0.dev0, 0.4.1.dev0, 0.4.2.dev0, 0.4.3.dev0, 0.4.4.dev0, 0.4.5.dev0, 0.6.20.dev0, 0.6.20.dev1, 0.6.21, 0.6.22, 1.0.0.dev0, 1.0.0rc1, 1.0.0rc2, 1.0.0rc3, 1.0.0rc4, 1.0.0)
ERROR: No matching distribution found for whylogs==1.0.6

We talked offline and this has to do with whylogs only supporting python versions < 3.10. Update coming shortly.

details: whylogs require protobuf > 3.15, but flyteidl can't handle protobuf < 4.0, so adding it as a restriction to setup.py
Signed-off-by: murilommen <[email protected]>
Copy link
Collaborator

@eapolinario eapolinario left a comment

Choose a reason for hiding this comment

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

Make sure to run make fmt from the root of the repo.

plugins/flytekit-whylogs/setup.py Outdated Show resolved Hide resolved
plugins/flytekit-whylogs/setup.py Outdated Show resolved Hide resolved
details: ran black command on the plugin implementation and caught something with black
Signed-off-by: murilommen <[email protected]>
Signed-off-by: murilommen <[email protected]>
@murilommen murilommen force-pushed the murilommen/whylogs-plugin branch from b62c81d to e7763a4 Compare July 18, 2022 16:21
@eapolinario eapolinario merged commit c5a9468 into flyteorg:master Jul 18, 2022
@welcome
Copy link

welcome bot commented Jul 18, 2022

Congrats on merging your first pull request! 🎉

wild-endeavor pushed a commit that referenced this pull request Aug 2, 2022
* Introducing whylogs integration to flytekit

* Details: It creates a schema for "transforming" whylogs' DatasetProfileView objects to and from the FlyteSchema. This PR also creates two renderers with FlyteDeck, one for the Constraints report and the other for the SummaryDriftReport.

Signed-off-by: murilommen <[email protected]>

* refactoring tests

changes: breaking down single test_schema.py unit test into test_schema + test_renderer, each with their own concerns
Signed-off-by: murilommen <[email protected]>

* styleguide fixes

details: removing extra lines later caught by flake8
Signed-off-by: murilommen <[email protected]>

* add plugin to ci checks

Signed-off-by: murilommen <[email protected]>

* adding requirements files + lint fixes

Signed-off-by: murilommen <[email protected]>

* removing entrypoints from setup.py

Signed-off-by: murilommen <[email protected]>

* adding a python 3.10 build restriction

Signed-off-by: murilommen <[email protected]>

* fixing protobuf's version to < 4

details: whylogs require protobuf > 3.15, but flyteidl can't handle protobuf < 4.0, so adding it as a restriction to setup.py
Signed-off-by: murilommen <[email protected]>

* lint setup.py

details: ran black command on the plugin implementation and caught something with black
Signed-off-by: murilommen <[email protected]>

* fixing comma on setup.py

Signed-off-by: murilommen <[email protected]>
wild-endeavor pushed a commit that referenced this pull request Aug 2, 2022
* Introducing whylogs integration to flytekit

* Details: It creates a schema for "transforming" whylogs' DatasetProfileView objects to and from the FlyteSchema. This PR also creates two renderers with FlyteDeck, one for the Constraints report and the other for the SummaryDriftReport.

Signed-off-by: murilommen <[email protected]>

* refactoring tests

changes: breaking down single test_schema.py unit test into test_schema + test_renderer, each with their own concerns
Signed-off-by: murilommen <[email protected]>

* styleguide fixes

details: removing extra lines later caught by flake8
Signed-off-by: murilommen <[email protected]>

* add plugin to ci checks

Signed-off-by: murilommen <[email protected]>

* adding requirements files + lint fixes

Signed-off-by: murilommen <[email protected]>

* removing entrypoints from setup.py

Signed-off-by: murilommen <[email protected]>

* adding a python 3.10 build restriction

Signed-off-by: murilommen <[email protected]>

* fixing protobuf's version to < 4

details: whylogs require protobuf > 3.15, but flyteidl can't handle protobuf < 4.0, so adding it as a restriction to setup.py
Signed-off-by: murilommen <[email protected]>

* lint setup.py

details: ran black command on the plugin implementation and caught something with black
Signed-off-by: murilommen <[email protected]>

* fixing comma on setup.py

Signed-off-by: murilommen <[email protected]>
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