diff --git a/docs/project/changelog.md b/docs/project/changelog.md index d72a9b8dd8f..b091015540e 100644 --- a/docs/project/changelog.md +++ b/docs/project/changelog.md @@ -16,6 +16,10 @@ myst: ## Unreleased +### Packages + +- Added river version 0.19.0 {pr}`4197` + ### Load time & size optimizations - {{ Performance }} Do not use `importlib.metadata` when identifying installed packages, diff --git a/packages/river/meta.yaml b/packages/river/meta.yaml new file mode 100644 index 00000000000..9210a56c9b2 --- /dev/null +++ b/packages/river/meta.yaml @@ -0,0 +1,31 @@ +package: + name: river + version: 0.19.0 + top-level: + - river + +source: + url: https://files.pythonhosted.org/packages/79/89/2ff0fd93d8f1e3f3e47392e12a14463147de49b6b25df617835e7da894b9/river-0.19.0.tar.gz + sha256: 6b2192e27636334dd29eb43d6c46a53f9d7eef38eb8479a0797412b7c8c46020 + +requirements: + executable: + - rustup + host: + - numpy + run: + - numpy + - pandas + - pytest # can remove in 0.20 + - scipy + +about: + home: https://github.com/online-ml/river + PyPI: https://pypi.org/project/river + summary: Online machine learning in Python + license: BSD-3 + +test: + imports: + - river + - river.api diff --git a/packages/river/test_river.py b/packages/river/test_river.py new file mode 100644 index 00000000000..f380e868574 --- /dev/null +++ b/packages/river/test_river.py @@ -0,0 +1,17 @@ +import pytest +from pytest_pyodide import run_in_pyodide + + +@pytest.mark.driver_timeout(60) +@run_in_pyodide(packages=["river"]) +def test_linear_regression(selenium): + from river import datasets, evaluate, linear_model, metrics, preprocessing + + dataset = datasets.TrumpApproval() + + model = preprocessing.StandardScaler() | linear_model.LinearRegression( + intercept_lr=0.1 + ) + metric = metrics.MAE() + + evaluate.progressive_val_score(dataset, model, metric) diff --git a/src/js/api.ts b/src/js/api.ts index adbc48478f8..08ecd579612 100644 --- a/src/js/api.ts +++ b/src/js/api.ts @@ -16,6 +16,7 @@ import { TypedArray } from "./types"; // Exported for micropip API.loadBinaryFile = loadBinaryFile; +// Exported for micropip API.loadBinaryFile = loadBinaryFile; /**