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 48 commits into
base: mainline
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
48 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
74490c5
Merge branch 'mainline' into dev/richard/polars
richard-rogers Nov 29, 2024
8d2846d
Merge branch 'mainline' into dev/richard/polars
jamie256 Dec 10, 2024
f2900b1
move setup dependency
richard-rogers Dec 10, 2024
6cf62bb
use pandas stubs
richard-rogers Dec 11, 2024
190b098
Update python/whylogs/core/dataframe_wrapper.py
richard-rogers Dec 11, 2024
3ec799e
Update python/whylogs/core/datatypes.py
richard-rogers Dec 11, 2024
dad1d17
dont use stubs
richard-rogers Dec 11, 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/)
richard-rogers marked this conversation as resolved.
Show resolved Hide resolved
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 }
]
richard-rogers marked this conversation as resolved.
Show resolved Hide resolved

# 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