Something went wrong. Try again.
Nix Packages collection & NixOS github.com/NixOS/nixpkgs
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149{ lib, buildPythonPackage, fetchFromGitHub,
# build-system hatch-vcs, hatchling,
# dependencies dask-glm, distributed, multipledispatch, numba, numpy, packaging, pandas, scikit-learn, scipy, dask,
# tests pytest-mock, pytestCheckHook,}:
buildPythonPackage (finalAttrs: { pname = "dask-ml"; version = "2025.1.0"; pyproject = true; __structuredAttrs = true;
src = fetchFromGitHub { owner = "dask"; repo = "dask-ml"; tag = "v${finalAttrs.version}"; hash = "sha256-DHxx0LFuJmGWYuG/WGHj+a5XHAEekBmlHUUb90rl2IY="; };
postPatch = '' substituteInPlace pyproject.toml \ --replace-fail \ 'addopts = "-rsx -v --durations=10 --color=yes"' \ 'addopts = ["-rsx", "-v", "--durations=10", "--color=yes"]' '';
build-system = [ hatch-vcs hatchling ];
dependencies = [ dask-glm distributed multipledispatch numba numpy packaging pandas scikit-learn scipy ] ++ dask.optional-dependencies.array ++ dask.optional-dependencies.dataframe;
pythonImportsCheck = [ "dask_ml" "dask_ml.naive_bayes" "dask_ml.wrappers" "dask_ml.utils" ];
nativeCheckInputs = [ pytest-mock pytestCheckHook ];
pytestFlags = [ # Skipping check check_array_api_input for KMeans because it raised SkipTest: # SCIPY_ARRAY_API is not set: not checking array_api input "-Wignore::sklearn.exceptions.SkipTestWarning"
# pandas.errors.Pandas4Warning: For backward compatibility, 'str' dtypes are included by select_dtypes when 'object' dtype is specified. # This behavior is deprecated and will be removed in a future version. # Explicitly pass 'str' to `include` to select them, or to `exclude` to remove them and silence this warning. # See https://pandas.pydata.org/docs/user_guide/migration-3-strings.html#string-migration-select-dtypes for details on how to write code that works with pandas 2 and 3. "-Wignore::pandas.errors.Pandas4Warning" ];
disabledTestPaths = [ # RuntimeError: Attempting to use an asynchronous Client in a synchronous context of `dask.compute` # https://github.com/dask/dask-ml/issues/1016 "tests/model_selection/test_hyperband.py" "tests/model_selection/test_incremental.py" "tests/model_selection/test_incremental_warns.py" "tests/model_selection/test_successive_halving.py"
# MockClassifier predates sklearn 1.6 __sklearn_tags__ "tests/model_selection/dask_searchcv/test_model_selection.py" "tests/model_selection/dask_searchcv/test_model_selection_sklearn.py" ];
disabledTests = [ # AssertionError: Regex pattern did not match. "test_unknown_category_transform_array"
# ValueError: cannot broadcast shape (nan,) to shape (nan,) # https://github.com/dask/dask-ml/issues/1012 "test_fit_array" "test_fit_frame" "test_fit_transform_frame" "test_laziness" "test_lr_score" "test_ok" "test_scoring_string"
# sklearn 1.7+: PCA / IncrementalPCA missing power_iteration_normalizer "test_pca_randomized_solver" "test_pca_check_projection" "test_pca_inverse" "test_pca_score" "test_pca_score2" "test_randomized_pca_check_projection" "test_randomized_pca_inverse" "test_pca_int_dtype_upcast_to_double" "test_incremental_pca" "test_incremental_pca_against_pca_iris" "test_incremental_pca_against_pca_random_data" "test_singular_values" "test_whitening"
# sklearn 1.8 API drift in LogisticRegression/ParallelPostFit "test_predict" "test_multiclass"
# XPASS becomes failure under xfail_strict (now honored on pytest 9) "test_soft_voting_frame" ];
__darwinAllowLocalNetworking = true;
meta = { description = "Scalable Machine Learn with Dask"; homepage = "https://github.com/dask/dask-ml"; license = lib.licenses.bsd3; maintainers = with lib.maintainers; [ GaetanLepage ]; };})