Skip to content

Commit 54c8abe

Browse files
committed
Remove dask-ml dependency (since sgkit now includes TruncatedSVD)
1 parent 857a51e commit 54c8abe

File tree

6 files changed

+10
-14
lines changed

6 files changed

+10
-14
lines changed

.github/scripts/upstream_install.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ def install_deps() -> None:
1414
"--upgrade",
1515
)
1616
upstream_deps = (
17-
"git+https://github.com/dask/dask.git#egg=dask[array]",
17+
"git+https://github.com/dask/dask.git#egg=dask[array,dataframe]",
1818
"git+https://github.com/dask/distributed.git#egg=distributed",
19-
"git+https://github.com/dask/dask-ml.git#egg=dask-ml",
2019
"git+https://github.com/pandas-dev/pandas#egg=pandas",
2120
"git+https://github.com/pangeo-data/rechunker.git#egg=rechunker",
2221
"git+https://github.com/pydata/xarray.git#egg=xarray",

requirements-numpy2.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
numpy < 2.1
22
xarray
3-
dask[array] >= 2023.01.0, <= 2024.8.0
3+
dask[array,dataframe] >= 2023.01.0, <= 2024.8.0
44
distributed >= 2023.01.0, <= 2024.8.0
5-
dask-ml
65
scipy
76
typing-extensions
87
numba

requirements.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
numpy < 2
22
xarray
3-
dask[array] >= 2023.01.0, <= 2024.8.0
3+
dask[array,dataframe] >= 2023.01.0, <= 2024.8.0
44
distributed >= 2023.01.0, <= 2024.8.0
5-
dask-ml
65
scipy
76
typing-extensions
87
numba

setup.cfg

+1-2
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@ python_requires = >=3.10
2929
install_requires =
3030
numpy < 2
3131
xarray
32-
dask[array] >= 2022.01.0, <= 2024.8.0
32+
dask[array,dataframe] >= 2022.01.0, <= 2024.8.0
3333
distributed >= 2022.01.0, <= 2024.8.0
34-
dask-ml
3534
scipy
3635
zarr >= 2.10.0, != 2.11.0, != 2.11.1, != 2.11.2, < 3
3736
numba

sgkit/stats/pca.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -219,18 +219,18 @@ def pca(
219219
Principal axes defined as eigenvectors for sample covariance matrix.
220220
In the context of SVD, these are equivalent to the right singular
221221
vectors in the decomposition of a (N, M) matrix,
222-
i.e. ``dask_ml.decomposition.TruncatedSVD.components_``.
222+
i.e. ``sgkit.stats.truncated_svd.TruncatedSVD.components_``.
223223
sample_pca_loading : [array-like, shape: (M, C)]
224224
Principal axes scaled by square root of eigenvalues.
225225
These values can also be interpreted as the correlation between the
226226
original variables and the unit-scaled principal axes.
227227
sample_pca_explained_variance : [array-like, shape: (C,)]
228228
Variance explained by each principal component. These values are equivalent
229229
to eigenvalues that result from the eigendecomposition of a (N, M) matrix,
230-
i.e. ``dask_ml.decomposition.TruncatedSVD.explained_variance_``.
230+
i.e. ``sgkit.stats.truncated_svd.TruncatedSVD.explained_variance_``.
231231
sample_pca_explained_variance_ratio : [array-like, shape: (C,)]
232232
Ratio of variance explained to total variance for each principal component,
233-
i.e. ``dask_ml.decomposition.TruncatedSVD.explained_variance_ratio_``.
233+
i.e. ``sgkit.stats.truncated_svd.TruncatedSVD.explained_variance_ratio_``.
234234
235235
Examples
236236
--------

sgkit/variables.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ def _check_field(
701701
kind="f",
702702
__doc__="""Principal axes defined as eigenvectors for sample covariance matrix.
703703
In the context of SVD, these are equivalent to the right singular vectors in
704-
the decomposition of a (N, M) matrix., i.e. ``dask_ml.decomposition.TruncatedSVD.components_``.""",
704+
the decomposition of a (N, M) matrix., i.e. ``sgkit.stats.truncated_svd.TruncatedSVD.components_``.""",
705705
)
706706
)
707707

@@ -715,7 +715,7 @@ def _check_field(
715715
kind="f",
716716
__doc__="""Variance explained by each principal component. These values are equivalent
717717
to eigenvalues that result from the eigendecomposition of a (N, M) matrix,
718-
i.e. ``dask_ml.decomposition.TruncatedSVD.explained_variance_``.""",
718+
i.e. ``sgkit.stats.truncated_svd.TruncatedSVD.explained_variance_``.""",
719719
)
720720
)
721721

@@ -728,7 +728,7 @@ def _check_field(
728728
dims=("components",),
729729
kind="f",
730730
__doc__="""Ratio of variance explained to total variance for each principal component,
731-
i.e. ``dask_ml.decomposition.TruncatedSVD.explained_variance_ratio_``.""",
731+
i.e. ``sgkit.stats.truncated_svd.TruncatedSVD.explained_variance_ratio_``.""",
732732
)
733733
)
734734

0 commit comments

Comments
 (0)