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

Initial Polars support #1576

Open
wants to merge 41 commits into
base: mainline
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
de3a8cb
Initial Polars support
richard-rogers Oct 18, 2024
9d60022
segments and udfs
richard-rogers Oct 29, 2024
66abf26
make UDF pandas and polars tests work at the same time
richard-rogers Oct 31, 2024
b5bf95c
work
richard-rogers Oct 31, 2024
b479979
pre-commit
richard-rogers Oct 31, 2024
b974fbd
pre-commit
richard-rogers Nov 1, 2024
1aad5ee
CI
richard-rogers Nov 1, 2024
9243c6d
allow 3.7
richard-rogers Nov 4, 2024
dac3ecd
Update .github/workflows/whylogs-ci.yml
richard-rogers Nov 4, 2024
1ecb94f
skip polars in python 3.7
Nov 4, 2024
ea0cce2
polars metric tests
richard-rogers Nov 5, 2024
2e26e4e
fix docs
richard-rogers Nov 5, 2024
303c78b
Merge branch 'mainline' into dev/richard/polars
richard-rogers Nov 5, 2024
634aa08
Merge branch 'mainline' into dev/richard/polars
richard-rogers Nov 5, 2024
74928ea
Merge branch 'mainline' into dev/richard/polars
richard-rogers Nov 6, 2024
89a649d
Update python/tests/api/logger/test_logger_polars.py
richard-rogers Nov 7, 2024
9e66091
Update python/tests/api/logger/test_logger_polars.py
richard-rogers Nov 7, 2024
6209bfd
Update python/tests/api/logger/test_logger_polars.py
richard-rogers Nov 7, 2024
91df56c
Update python/tests/api/logger/test_logger_polars.py
richard-rogers Nov 7, 2024
e45edbe
Update python/tests/api/logger/test_logger_polars.py
richard-rogers Nov 7, 2024
09d1ad1
Update python/tests/api/logger/test_logger_polars.py
richard-rogers Nov 7, 2024
1076255
Update python/tests/api/logger/test_logger_polars.py
richard-rogers Nov 7, 2024
b3e39c6
Update python/tests/api/logger/test_logger_polars.py
richard-rogers Nov 7, 2024
dffe867
Update python/tests/api/logger/test_segments_polars.py
richard-rogers Nov 7, 2024
d840894
Update python/tests/api/logger/test_segments_polars.py
richard-rogers Nov 7, 2024
f895fcf
Update python/tests/core/metrics/test_metrics_polars.py
richard-rogers Nov 7, 2024
670418e
Update python/tests/core/metrics/test_metrics_polars.py
richard-rogers Nov 7, 2024
a52449f
Update python/tests/core/metrics/test_metrics_polars.py
richard-rogers Nov 7, 2024
45bedc8
Update python/tests/core/metrics/test_metrics_polars.py
richard-rogers Nov 7, 2024
5881b7c
Update python/tests/core/metrics/test_metrics_polars.py
richard-rogers Nov 7, 2024
a177076
Update python/tests/core/metrics/test_metrics_polars.py
richard-rogers Nov 7, 2024
15c807c
Update python/tests/core/metrics/test_metrics_polars.py
richard-rogers Nov 7, 2024
78e4a71
Update python/tests/core/test_performance_polars.py
richard-rogers Nov 7, 2024
bb4ec84
Update python/tests/experimental/core/test_udf_schema_polars.py
richard-rogers Nov 7, 2024
82e9646
Update python/tests/experimental/core/test_udf_schema_polars.py
richard-rogers Nov 7, 2024
290cc62
test fix
richard-rogers Nov 7, 2024
e5831a0
refactor
richard-rogers Nov 12, 2024
ed79946
Merge branch 'mainline' into dev/richard/polars
richard-rogers Nov 12, 2024
5009755
pre-commit
richard-rogers Nov 14, 2024
2866ede
pre-commit
richard-rogers Nov 18, 2024
cd21e2d
Merge branch 'mainline' into dev/richard/polars
richard-rogers Nov 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion python/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ repos:
hooks:
- id: black
exclude: python/whylogs/core/proto/|python/docs/|python/whylogs/viz/html/|java|python/whylogs/api/logger/experimental/logger
files: ^(python/whylogs/)
- repo: https://github.com/pycqa/flake8
rev: 4.0.1
hooks:
- id: flake8
files: ^(python/whylogs/)
args:
- --max-line-length=160
- --exclude="""\.tox |
Expand All @@ -30,17 +32,24 @@ repos:
hooks:
- id: isort
args: [--filter-files]
files: ^(python/whylogs/)
exclude: python/whylogs/core/proto/|python/docs/|python/whylogs/viz/html/|java|python/whylogs/api/logger/experimental/logger
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.942
hooks:
- id: mypy
language: system
exclude: ^(python/tests/|python/examples/|python/examples/integration/|python/whylogs/core/proto/|python/docs/|python/whylogs/viz/html/|java|python/whylogs/api/logger/experimental/logger)
files: ^(python/whylogs/)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not positive this check the correct files, but this was the only way I found to get it to not run lint checks on site-packages.

exclude: ^(python/.venv/lib/python3.8/site-packages/polars/ml/torch.py|python/tests/|python/examples/|python/examples/integration/|python/whylogs/core/proto/|python/docs/|python/whylogs/viz/html/|java|python/whylogs/api/logger/experimental/logger)
verbose: true
args:
- --exclude python/.venv
- -V
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.5.1
hooks:
- id: prettier
files: ^(python/whylogs/)
exclude: python/tests/|python/whylogs/core/proto/|python/docs/|python/whylogs/viz/html/|java
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
Expand Down
2 changes: 1 addition & 1 deletion python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ telemetry-opt-out: ## create opt out file

install: ## Install all dependencies with poetry.
@$(call i, Installing dependencies)
poetry install -E "viz s3 spark mlflow image fugue gcs embeddings proc"
poetry install -E "viz s3 spark mlflow image fugue gcs embeddings proc polars"

coverage: ## Generate test coverage reports.
@$(call i, Generating test coverage)
Expand Down
84 changes: 74 additions & 10 deletions python/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 14 additions & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ whylabs-client = "^0.6.5"
requests = "^2.27"
backoff = "^2.2.1"
platformdirs = "^3.5.0"
setuptools = [
{ version = "<58", python = "<3.8", optional = false },
{ version = ">=75", python = ">=3.8", optional = false }
]

# viz module. Everything after this should be optional
pybars3 = { version = "^0.9", optional = true }
Expand All @@ -34,7 +38,11 @@ numpy = [
]

# datasets module.
pandas = { version = "*", optional = true}
pandas = { version = "*", optional = true }

# Polars module.
polars = { version = ">=1.8.2", python = ">=3.8", optional = true }
# TODO: do we want polars-u64-idx ?

# Doc dependencies
sphinx = { version = "*", optional = true }
Expand Down Expand Up @@ -110,6 +118,10 @@ spark = [
datasets = [
"pandas",
]
polars = [
"polars",
]

gcs = [
"google-cloud-storage",
]
Expand Down Expand Up @@ -148,6 +160,7 @@ all = [
"boto3",
"google-cloud-storage",
"pandas",
"polars",
"pyarrow",
"pyspark",
"ipython",
Expand Down
Loading
Loading