pybear-dask 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. pybear_dask-0.2.0/CHANGELOG.md +41 -0
  2. pybear_dask-0.2.0/LICENSE +28 -0
  3. pybear_dask-0.2.0/PKG-INFO +253 -0
  4. pybear_dask-0.2.0/README.rst +227 -0
  5. pybear_dask-0.2.0/pyproject.toml +83 -0
  6. pybear_dask-0.2.0/src/pybear_dask/__init__.py +19 -0
  7. pybear_dask-0.2.0/src/pybear_dask/_version.py +38 -0
  8. pybear_dask-0.2.0/src/pybear_dask/base/__init__.py +24 -0
  9. pybear_dask-0.2.0/src/pybear_dask/base/_is_classifier.py +186 -0
  10. pybear_dask-0.2.0/src/pybear_dask/model_selection/GSTCV/_GSTCVDask/GSTCVDask.py +918 -0
  11. pybear_dask-0.2.0/src/pybear_dask/model_selection/GSTCV/_GSTCVDask/__init__.py +5 -0
  12. pybear_dask-0.2.0/src/pybear_dask/model_selection/GSTCV/_GSTCVDask/_fit/__init__.py +5 -0
  13. pybear_dask-0.2.0/src/pybear_dask/model_selection/GSTCV/_GSTCVDask/_fit/_estimator_fit_params_helper.py +106 -0
  14. pybear_dask-0.2.0/src/pybear_dask/model_selection/GSTCV/_GSTCVDask/_fit/_fold_splitter.py +86 -0
  15. pybear_dask-0.2.0/src/pybear_dask/model_selection/GSTCV/_GSTCVDask/_fit/_get_kfold.py +117 -0
  16. pybear_dask-0.2.0/src/pybear_dask/model_selection/GSTCV/_GSTCVDask/_fit/_parallelized_fit.py +127 -0
  17. pybear_dask-0.2.0/src/pybear_dask/model_selection/GSTCV/_GSTCVDask/_fit/_parallelized_scorer.py +228 -0
  18. pybear_dask-0.2.0/src/pybear_dask/model_selection/GSTCV/_GSTCVDask/_fit/_parallelized_train_scorer.py +226 -0
  19. pybear_dask-0.2.0/src/pybear_dask/model_selection/GSTCV/_GSTCVDask/_param_conditioning/__init__.py +5 -0
  20. pybear_dask-0.2.0/src/pybear_dask/model_selection/GSTCV/_GSTCVDask/_param_conditioning/_scheduler.py +88 -0
  21. pybear_dask-0.2.0/src/pybear_dask/model_selection/GSTCV/_GSTCVDask/_type_aliases.py +43 -0
  22. pybear_dask-0.2.0/src/pybear_dask/model_selection/GSTCV/_GSTCVDask/_validation/__init__.py +5 -0
  23. pybear_dask-0.2.0/src/pybear_dask/model_selection/GSTCV/_GSTCVDask/_validation/_cache_cv.py +37 -0
  24. pybear_dask-0.2.0/src/pybear_dask/model_selection/GSTCV/_GSTCVDask/_validation/_dask_estimator.py +84 -0
  25. pybear_dask-0.2.0/src/pybear_dask/model_selection/GSTCV/_GSTCVDask/_validation/_iid.py +38 -0
  26. pybear_dask-0.2.0/src/pybear_dask/model_selection/GSTCV/_GSTCVDask/_validation/_validation.py +54 -0
  27. pybear_dask-0.2.0/src/pybear_dask/model_selection/GSTCV/_GSTCVDask/_validation/_y.py +91 -0
  28. pybear_dask-0.2.0/src/pybear_dask/model_selection/GSTCV/__init__.py +5 -0
  29. pybear_dask-0.2.0/src/pybear_dask/model_selection/__init__.py +28 -0
  30. pybear_dask-0.2.0/src/pybear_dask/model_selection/autogridsearch/AutoGSTCVDask.py +71 -0
  31. pybear_dask-0.2.0/src/pybear_dask/model_selection/autogridsearch/AutoGridSearchCVDask.py +70 -0
  32. pybear_dask-0.2.0/src/pybear_dask/model_selection/autogridsearch/__init__.py +19 -0
  33. pybear_dask-0.2.0/src/pybear_dask/model_selection/autogridsearch/_autogridsearch_wrapper/__init__.py +5 -0
  34. pybear_dask-0.2.0/src/pybear_dask/model_selection/autogridsearch/_autogridsearch_wrapper/_refit_can_be_skipped.py +100 -0
  35. pybear_dask-0.2.0/tests/11min45sec +0 -0
  36. pybear_dask-0.2.0/tests/__init__.py +5 -0
  37. pybear_dask-0.2.0/tests/base/1min38sec +0 -0
  38. pybear_dask-0.2.0/tests/base/__init__.py +5 -0
  39. pybear_dask-0.2.0/tests/base/conftest.py +225 -0
  40. pybear_dask-0.2.0/tests/base/get_feature_names_test.py +96 -0
  41. pybear_dask-0.2.0/tests/base/is_classifier_1min35sec_test.py +720 -0
  42. pybear_dask-0.2.0/tests/conftest.py +22 -0
  43. pybear_dask-0.2.0/tests/model_selection/9min10sec +0 -0
  44. pybear_dask-0.2.0/tests/model_selection/GSTCV/8min00sec +0 -0
  45. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCV/__init__.py +5 -0
  46. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCV/estimator_test.py +30 -0
  47. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCV/estimator_wrapped_test.py +63 -0
  48. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCV/validation_init_test.py +96 -0
  49. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVDask/8min58sec +0 -0
  50. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVDask/__init__.py +5 -0
  51. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVDask/fit/3min48sec +0 -0
  52. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVDask/fit/__init__.py +5 -0
  53. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVDask/fit/accuracy_50sec_test.py +191 -0
  54. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVDask/fit/cache_cv__cv__iid__2min2sec_test.py +111 -0
  55. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVDask/fit/estimator_fit_params_helper_test.py +237 -0
  56. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVDask/fit/fit__fit_params_test_24sec_test.py +68 -0
  57. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVDask/fit/fold_splitter_test.py +149 -0
  58. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVDask/fit/get_kfold_test.py +180 -0
  59. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVDask/fit/parallelized_fit_test.py +98 -0
  60. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVDask/fit/parellelized_scorer_test.py +164 -0
  61. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVDask/fit/parellelized_train_scorer_test.py +164 -0
  62. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVDask/param_conditioning/13sec +0 -0
  63. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVDask/param_conditioning/__init__.py +5 -0
  64. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVDask/param_conditioning/scheduler_13sec_test.py +88 -0
  65. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVDask/validation/3min49sec +0 -0
  66. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVDask/validation/__init__.py +5 -0
  67. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVDask/validation/cache_cv_test.py +33 -0
  68. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVDask/validation/dask_estimator_test.py +48 -0
  69. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVDask/validation/dask_estimator_wrapped_test.py +226 -0
  70. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVDask/validation/iid_test.py +34 -0
  71. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVDask/validation/validation_init_3min25sec_test.py +1033 -0
  72. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVDask/validation/validation_test.py +40 -0
  73. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVDask/validation/validation_y_fit_dask_test.py +76 -0
  74. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVDask/validation/validation_y_score_dask_38sec_test.py +74 -0
  75. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVDask/validation/y_test.py +73 -0
  76. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVMixin/__init__.py +5 -0
  77. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVMixin/param_conditioning/__init__.py +5 -0
  78. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVMixin/param_conditioning/cv_test.py +47 -0
  79. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVMixin/validation/__init__.py +5 -0
  80. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVMixin/validation/cv_val_test.py +51 -0
  81. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVMixin/validation/estimator_val_test.py +66 -0
  82. pybear_dask-0.2.0/tests/model_selection/GSTCV/GSTCVMixin/validation/predict_proba_test.py +49 -0
  83. pybear_dask-0.2.0/tests/model_selection/GSTCV/__init__.py +5 -0
  84. pybear_dask-0.2.0/tests/model_selection/GSTCV/conftest.py +465 -0
  85. pybear_dask-0.2.0/tests/model_selection/GSTCV/conftest_gstcv_dask_fixture_37sec_test.py +86 -0
  86. pybear_dask-0.2.0/tests/model_selection/GSTCV/conftest_list_of_fixtures +22 -0
  87. pybear_dask-0.2.0/tests/model_selection/__init__.py +5 -0
  88. pybear_dask-0.2.0/tests/model_selection/autogridsearch/3min54sec +0 -0
  89. pybear_dask-0.2.0/tests/model_selection/autogridsearch/__init__.py +5 -0
  90. pybear_dask-0.2.0/tests/model_selection/autogridsearch/autogridsearch_wrapper/__init__.py +5 -0
  91. pybear_dask-0.2.0/tests/model_selection/autogridsearch/autogridsearch_wrapper/refit_can_be_skipped_6sec_test.py +72 -0
  92. pybear_dask-0.2.0/tests/model_selection/autogridsearch/conftest.py +196 -0
  93. pybear_dask-0.2.0/tests/model_selection/autogridsearch/verification_AutoGSTCVDask_1min39sec_test.py +152 -0
  94. pybear_dask-0.2.0/tests/model_selection/autogridsearch/verification_AutoGridSearchCVDask_Xsec_test.py +137 -0
  95. pybear_dask-0.2.0/tests/model_selection/autogridsearch/verification_dask_gscvs_10sec_test.py +300 -0
  96. pybear_dask-0.2.0/tests/preprocessing/40sec +0 -0
  97. pybear_dask-0.2.0/tests/preprocessing/ColumnDeduplicator/__init__.py +5 -0
  98. pybear_dask-0.2.0/tests/preprocessing/ColumnDeduplicator/conftest.py +68 -0
  99. pybear_dask-0.2.0/tests/preprocessing/ColumnDeduplicator/dask_wrappers_12sec_test.py +126 -0
  100. pybear_dask-0.2.0/tests/preprocessing/InterceptManager/__init__.py +5 -0
  101. pybear_dask-0.2.0/tests/preprocessing/InterceptManager/conftest.py +52 -0
  102. pybear_dask-0.2.0/tests/preprocessing/InterceptManager/dask_wrappers_10sec_test.py +126 -0
  103. pybear_dask-0.2.0/tests/preprocessing/MinCountTransformer/__init__.py +5 -0
  104. pybear_dask-0.2.0/tests/preprocessing/MinCountTransformer/conftest.py +660 -0
  105. pybear_dask-0.2.0/tests/preprocessing/MinCountTransformer/dask_wrappers_test.py +151 -0
  106. pybear_dask-0.2.0/tests/preprocessing/SlimPolyFeatures/__init__.py +5 -0
  107. pybear_dask-0.2.0/tests/preprocessing/SlimPolyFeatures/conftest.py +57 -0
  108. pybear_dask-0.2.0/tests/preprocessing/SlimPolyFeatures/dask_wrappers_18sec_test.py +131 -0
  109. pybear_dask-0.2.0/tests/preprocessing/__init__.py +5 -0
  110. pybear_dask-0.2.0/tests/preprocessing/conftest.py +319 -0
  111. pybear_dask-0.2.0/tests/preprocessing/conftest_X_factory_18sec_test.py +593 -0
  112. pybear_dask-0.2.0/tests/version_test.py +40 -0
@@ -0,0 +1,41 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+
9
+
10
+ ## [0.2.0] - 2025-07-31
11
+
12
+ ### Added
13
+ - base:
14
+
15
+ is_classifier
16
+
17
+ - model_selection:
18
+
19
+ GSTCVDask
20
+ AutoGridSearchCVDask
21
+ AutoGSTCVDask
22
+
23
+ ### Changed
24
+ - None
25
+
26
+ ### Deprecated
27
+ - None
28
+
29
+ ### Removed
30
+ - None
31
+
32
+ ### Fixed
33
+ - None
34
+
35
+ ### Security
36
+ - None
37
+
38
+ ## [0.1] - [Unreleased]
39
+
40
+
41
+
@@ -0,0 +1,28 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2025, PylarBear
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ 3. Neither the name of the copyright holder nor the names of its
16
+ contributors may be used to endorse or promote products derived from
17
+ this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,253 @@
1
+ Metadata-Version: 2.3
2
+ Name: pybear-dask
3
+ Version: 0.2.0
4
+ Summary: Python modules for data analytics applications with dask
5
+ License: BSD-3-Clause
6
+ Keywords: python data analytics pybear dask
7
+ Author: Bill Sousa
8
+ Author-email: WKSJR99@msn.com
9
+ Maintainer: Bill Sousa
10
+ Requires-Python: >=3.10,<3.13
11
+ Classifier: License :: OSI Approved :: BSD License
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Requires-Dist: dask (<2025.1)
17
+ Requires-Dist: dask-ml (<2025.1)
18
+ Requires-Dist: distributed (<2025.1)
19
+ Requires-Dist: polars-lts-cpu (>=1.31.0,<2.0.0)
20
+ Requires-Dist: pybear (>=0.2.0)
21
+ Requires-Dist: scikit-learn (<1.7)
22
+ Project-URL: Homepage, https://github.com/PylarBear/pybear-dask
23
+ Project-URL: Repository, https://github.com/PylarBear/pybear-dask
24
+ Description-Content-Type: text/x-rst
25
+
26
+ pybear-dask
27
+ ===========
28
+
29
+ |Tests|
30
+ |Coverage|
31
+ |Test Status 313|
32
+ |Test Status 312|
33
+ |Test Status 311|
34
+ |Test Status 310|
35
+
36
+ .. |Tests| image:: https://raw.githubusercontent.com/PylarBear/pybear-dask/main/.github/badges/tests-badge.svg
37
+ :target: https://github.com/PylarBear/pybear-dask/actions
38
+
39
+ .. |Coverage| image:: https://raw.githubusercontent.com/PylarBear/pybear-dask/main/.github/badges/coverage-badge.svg
40
+ :target: https://github.com/PylarBear/pybear-dask/actions
41
+
42
+ .. |Test Status 313| image:: https://github.com/PylarBear/pybear-dask/actions/workflows/matrix-tests-py313.yml/badge.svg
43
+ :target: https://github.com/PylarBear/pybear-dask/actions/workflows/matrix-tests-py313.yml
44
+
45
+ .. |Test Status 312| image:: https://github.com/PylarBear/pybear-dask/actions/workflows/matrix-tests-py312.yml/badge.svg
46
+ :target: https://github.com/PylarBear/pybear-dask/actions/workflows/matrix-tests-py312.yml
47
+
48
+ .. |Test Status 311| image:: https://github.com/PylarBear/pybear-dask/actions/workflows/matrix-tests-py311.yml/badge.svg
49
+ :target: https://github.com/PylarBear/pybear-dask/actions/workflows/matrix-tests-py311.yml
50
+
51
+ .. |Test Status 310| image:: https://github.com/PylarBear/pybear-dask/actions/workflows/matrix-tests-py310.yml/badge.svg
52
+ :target: https://github.com/PylarBear/pybear-dask/actions/workflows/matrix-tests-py310.yml
53
+
54
+ |TestPyPI Build Status|
55
+
56
+ .. |TestPyPI Build Status| image:: https://github.com/PylarBear/pybear-dask/actions/workflows/testpypi-publish.yml/badge.svg
57
+ :target: https://github.com/PylarBear/pybear-dask/actions/workflows/testpypi-publish.yml
58
+
59
+ |PyPI Build Status|
60
+ |Version|
61
+ |PyPI Downloads|
62
+
63
+ .. |PyPI Build Status| image:: https://github.com/PylarBear/pybear-dask/actions/workflows/pypi-publish.yml/badge.svg
64
+ :target: https://github.com/PylarBear/pybear-dask/actions/workflows/pypi-publish.yml
65
+
66
+ .. |Version| image:: https://img.shields.io/pypi/v/pybear-dask
67
+ :target: https://pypi.org/project/pybear-dask
68
+ :alt: PyPI Version
69
+
70
+ .. |PyPI Downloads| image:: https://static.pepy.tech/badge/pybear-dask
71
+ :target: https://pepy.tech/project/pybear-dask/
72
+ :alt: PyPI Downloads
73
+
74
+ .. |PythonVersion| replace:: >=3.10, <3.13
75
+ .. |DaskVersion| replace:: <2025.1.0
76
+ .. |DaskMLVersion| replace:: <2025.1.0
77
+ .. |DistributedVersion| replace:: <2025.1.0
78
+ .. |PybearVersion| replace:: >=0.1.22
79
+ .. |PytestVersion| replace:: >=7.0.0
80
+
81
+
82
+
83
+ pybear-dask is a Python computing library that supplements the pybear
84
+ library with analogous modules that have dask capability.
85
+
86
+ Website: https://github.com/PylarBear/pybear-dask
87
+
88
+ License
89
+ -------
90
+
91
+ BSD 3-Clause License. See `License File <https://github.com/PylarBear/pybear-dask/blob/main/LICENSE>`__.
92
+
93
+ =======
94
+
95
+ Installation
96
+ ------------
97
+
98
+ Dependencies
99
+ ~~~~~~~~~~~~
100
+
101
+ pybear-dask requires:
102
+
103
+ - Python (|PythonVersion|)
104
+ - dask (|DaskVersion|)
105
+ - dask-ml (|DaskMLVersion|)
106
+ - distributed (|DistributedVersion|)
107
+ - pybear (|PybearVersion|)
108
+
109
+ User installation
110
+ ~~~~~~~~~~~~~~~~~
111
+
112
+ Install pybear-dask from the online PyPI package repository using ``pip``::
113
+
114
+ (your-env) $ pip install pybear-dask
115
+
116
+ Conda distributions are expected to be made available sometime after release to
117
+ PyPI.
118
+
119
+ =======
120
+
121
+ Usage
122
+ -----
123
+ The folder structure of pybear-dask is nearly identical to scikit-learn. This
124
+ is so those that are familiar with the scikit layout and have experience with
125
+ writing the associated import statements have an easy transition to pybear-dask.
126
+ The pybear-dask subfolders are *base* and *model_selection*.
127
+
128
+ You can import pybear-dask's packages in the same way you would with scikit.
129
+ Here are a few examples of how you could import and use pybear-dask modules:
130
+
131
+ .. code-block:: console
132
+
133
+ from pybear-dask.model_selection import GSTCVDask
134
+
135
+ search = GSTCVDask()
136
+ search.fit(X, y)
137
+
138
+ from pybear-dask import model_selection as ms
139
+
140
+ search = ms.AutoGridSearchCVDask()
141
+ search.fit(X, y)
142
+
143
+
144
+ =======
145
+
146
+ Major Modules
147
+ -------------
148
+
149
+ AutoGridSearchCVDask
150
+ ~~~~~~~~~~~~~~~~~~~~
151
+ Perform multiple uninterrupted passes of grid search with dask_ml GridSearchCV
152
+ and dask objects utilizing progressively narrower search grids.
153
+
154
+ - Access via pybear-dask.model_selection.AutoGridSearchCVDask.
155
+
156
+ GSTCVDask (GridSearchThresholdCV for Dask)
157
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
158
+ Perform conventional grid search on a classifier with concurrent threshold
159
+ search using dask objects in parallel and distributed environments. Finds the
160
+ global optima for the passed parameters and thresholds. Fully compliant with
161
+ the dask_ml/scikit-learn GridSearchCV API.
162
+
163
+ - Access via pybear-dask.model_selection.GSTCVDask.
164
+
165
+ AutoGSTCVDask (AutoGridSearchThresholdCV for Dask)
166
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
167
+ Perform multiple uninterrupted passes of grid search with pybear-dask GSTCVDask
168
+ utilizing progressively narrower search grids.
169
+
170
+ - Access via pybear-dask.model_selection.AutoGSTCVDask.
171
+
172
+ =======
173
+
174
+ Changelog
175
+ ---------
176
+
177
+ See the `changelog <https://github.com/PylarBear/pybear-dask/blob/main/CHANGELOG.md>`__
178
+ for a history of notable changes to pybear-dask.
179
+
180
+ =======
181
+
182
+ Development
183
+ -----------
184
+
185
+ Important links
186
+ ~~~~~~~~~~~~~~~
187
+
188
+ - Official source code repo: https://github.com/PylarBear/pybear-dask
189
+ - Download releases: https://pypi.org/project/pybear-dask/
190
+ - Issue tracker: https://github.com/PylarBear/pybear-dask/issues
191
+
192
+ Source code
193
+ ~~~~~~~~~~~
194
+
195
+ You can clone the latest source code with the command::
196
+
197
+ git clone https://github.com/PylarBear/pybear-dask.git
198
+
199
+ Contributing
200
+ ~~~~~~~~~~~~
201
+
202
+ pybear-dask is not ready for contributions at this time!
203
+
204
+ Testing
205
+ ~~~~~~~
206
+
207
+ pybear-dask 0.2 is tested via GitHub Actions to run on Linux, Windows, and MacOS,
208
+ with Python versions 3.10, 3.11, and 3.12. pybear-dask is not tested on earlier
209
+ versions, but some features may work.
210
+
211
+ If you want to test pybear-dask yourself, you will need:
212
+
213
+ - pytest (|PytestVersion|)
214
+
215
+ The tests are not available in the PyPI pip installation. You can get
216
+ the tests by downloading the tarball from the pybear-dask project page on
217
+ `pypi.org <https://pypi.org/project/pybear-dask/>`_ or cloning the pybear-dask
218
+ repo from `GitHub <https://github.com/PylarBear/pybear-dask>`_. Once you have
219
+ the source files in a local project folder, create a poetry environment for the
220
+ project and install the test dependencies. After installation, launch the poetry
221
+ environment shell and you can launch the test suite from the root of your
222
+ pybear-dask project folder with::
223
+
224
+ (your-pybear-dask-env) you@your_computer:/path/to/pybear-dask/project$ pytest tests/
225
+
226
+ Project History
227
+ ---------------
228
+
229
+ This project was spun off the main pybear project just prior to the first
230
+ public release of both. pybear-dask was spun off to ensure maximum stability
231
+ for the main pybear project, while keeping these modules available.
232
+
233
+ Help and Support
234
+ ----------------
235
+
236
+ Documentation
237
+ ~~~~~~~~~~~~~
238
+
239
+ Documentation is not expected to be made available via a website for this
240
+ package. Use the documentation for similar packages in the main pybear package.
241
+ See the repo for pybear: https://github.com/PylarBear/pybear/
242
+
243
+ Communication
244
+ ~~~~~~~~~~~~~
245
+
246
+ - GitHub Discussions: https://github.com/PylarBear/pybear-dask/discussions
247
+ - Website: https://github.com/PylarBear/pybear-dask
248
+
249
+
250
+
251
+
252
+
253
+
@@ -0,0 +1,227 @@
1
+ pybear-dask
2
+ ===========
3
+
4
+ |Tests|
5
+ |Coverage|
6
+ |Test Status 313|
7
+ |Test Status 312|
8
+ |Test Status 311|
9
+ |Test Status 310|
10
+
11
+ .. |Tests| image:: https://raw.githubusercontent.com/PylarBear/pybear-dask/main/.github/badges/tests-badge.svg
12
+ :target: https://github.com/PylarBear/pybear-dask/actions
13
+
14
+ .. |Coverage| image:: https://raw.githubusercontent.com/PylarBear/pybear-dask/main/.github/badges/coverage-badge.svg
15
+ :target: https://github.com/PylarBear/pybear-dask/actions
16
+
17
+ .. |Test Status 313| image:: https://github.com/PylarBear/pybear-dask/actions/workflows/matrix-tests-py313.yml/badge.svg
18
+ :target: https://github.com/PylarBear/pybear-dask/actions/workflows/matrix-tests-py313.yml
19
+
20
+ .. |Test Status 312| image:: https://github.com/PylarBear/pybear-dask/actions/workflows/matrix-tests-py312.yml/badge.svg
21
+ :target: https://github.com/PylarBear/pybear-dask/actions/workflows/matrix-tests-py312.yml
22
+
23
+ .. |Test Status 311| image:: https://github.com/PylarBear/pybear-dask/actions/workflows/matrix-tests-py311.yml/badge.svg
24
+ :target: https://github.com/PylarBear/pybear-dask/actions/workflows/matrix-tests-py311.yml
25
+
26
+ .. |Test Status 310| image:: https://github.com/PylarBear/pybear-dask/actions/workflows/matrix-tests-py310.yml/badge.svg
27
+ :target: https://github.com/PylarBear/pybear-dask/actions/workflows/matrix-tests-py310.yml
28
+
29
+ |TestPyPI Build Status|
30
+
31
+ .. |TestPyPI Build Status| image:: https://github.com/PylarBear/pybear-dask/actions/workflows/testpypi-publish.yml/badge.svg
32
+ :target: https://github.com/PylarBear/pybear-dask/actions/workflows/testpypi-publish.yml
33
+
34
+ |PyPI Build Status|
35
+ |Version|
36
+ |PyPI Downloads|
37
+
38
+ .. |PyPI Build Status| image:: https://github.com/PylarBear/pybear-dask/actions/workflows/pypi-publish.yml/badge.svg
39
+ :target: https://github.com/PylarBear/pybear-dask/actions/workflows/pypi-publish.yml
40
+
41
+ .. |Version| image:: https://img.shields.io/pypi/v/pybear-dask
42
+ :target: https://pypi.org/project/pybear-dask
43
+ :alt: PyPI Version
44
+
45
+ .. |PyPI Downloads| image:: https://static.pepy.tech/badge/pybear-dask
46
+ :target: https://pepy.tech/project/pybear-dask/
47
+ :alt: PyPI Downloads
48
+
49
+ .. |PythonVersion| replace:: >=3.10, <3.13
50
+ .. |DaskVersion| replace:: <2025.1.0
51
+ .. |DaskMLVersion| replace:: <2025.1.0
52
+ .. |DistributedVersion| replace:: <2025.1.0
53
+ .. |PybearVersion| replace:: >=0.1.22
54
+ .. |PytestVersion| replace:: >=7.0.0
55
+
56
+
57
+
58
+ pybear-dask is a Python computing library that supplements the pybear
59
+ library with analogous modules that have dask capability.
60
+
61
+ Website: https://github.com/PylarBear/pybear-dask
62
+
63
+ License
64
+ -------
65
+
66
+ BSD 3-Clause License. See `License File <https://github.com/PylarBear/pybear-dask/blob/main/LICENSE>`__.
67
+
68
+ =======
69
+
70
+ Installation
71
+ ------------
72
+
73
+ Dependencies
74
+ ~~~~~~~~~~~~
75
+
76
+ pybear-dask requires:
77
+
78
+ - Python (|PythonVersion|)
79
+ - dask (|DaskVersion|)
80
+ - dask-ml (|DaskMLVersion|)
81
+ - distributed (|DistributedVersion|)
82
+ - pybear (|PybearVersion|)
83
+
84
+ User installation
85
+ ~~~~~~~~~~~~~~~~~
86
+
87
+ Install pybear-dask from the online PyPI package repository using ``pip``::
88
+
89
+ (your-env) $ pip install pybear-dask
90
+
91
+ Conda distributions are expected to be made available sometime after release to
92
+ PyPI.
93
+
94
+ =======
95
+
96
+ Usage
97
+ -----
98
+ The folder structure of pybear-dask is nearly identical to scikit-learn. This
99
+ is so those that are familiar with the scikit layout and have experience with
100
+ writing the associated import statements have an easy transition to pybear-dask.
101
+ The pybear-dask subfolders are *base* and *model_selection*.
102
+
103
+ You can import pybear-dask's packages in the same way you would with scikit.
104
+ Here are a few examples of how you could import and use pybear-dask modules:
105
+
106
+ .. code-block:: console
107
+
108
+ from pybear-dask.model_selection import GSTCVDask
109
+
110
+ search = GSTCVDask()
111
+ search.fit(X, y)
112
+
113
+ from pybear-dask import model_selection as ms
114
+
115
+ search = ms.AutoGridSearchCVDask()
116
+ search.fit(X, y)
117
+
118
+
119
+ =======
120
+
121
+ Major Modules
122
+ -------------
123
+
124
+ AutoGridSearchCVDask
125
+ ~~~~~~~~~~~~~~~~~~~~
126
+ Perform multiple uninterrupted passes of grid search with dask_ml GridSearchCV
127
+ and dask objects utilizing progressively narrower search grids.
128
+
129
+ - Access via pybear-dask.model_selection.AutoGridSearchCVDask.
130
+
131
+ GSTCVDask (GridSearchThresholdCV for Dask)
132
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
133
+ Perform conventional grid search on a classifier with concurrent threshold
134
+ search using dask objects in parallel and distributed environments. Finds the
135
+ global optima for the passed parameters and thresholds. Fully compliant with
136
+ the dask_ml/scikit-learn GridSearchCV API.
137
+
138
+ - Access via pybear-dask.model_selection.GSTCVDask.
139
+
140
+ AutoGSTCVDask (AutoGridSearchThresholdCV for Dask)
141
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
142
+ Perform multiple uninterrupted passes of grid search with pybear-dask GSTCVDask
143
+ utilizing progressively narrower search grids.
144
+
145
+ - Access via pybear-dask.model_selection.AutoGSTCVDask.
146
+
147
+ =======
148
+
149
+ Changelog
150
+ ---------
151
+
152
+ See the `changelog <https://github.com/PylarBear/pybear-dask/blob/main/CHANGELOG.md>`__
153
+ for a history of notable changes to pybear-dask.
154
+
155
+ =======
156
+
157
+ Development
158
+ -----------
159
+
160
+ Important links
161
+ ~~~~~~~~~~~~~~~
162
+
163
+ - Official source code repo: https://github.com/PylarBear/pybear-dask
164
+ - Download releases: https://pypi.org/project/pybear-dask/
165
+ - Issue tracker: https://github.com/PylarBear/pybear-dask/issues
166
+
167
+ Source code
168
+ ~~~~~~~~~~~
169
+
170
+ You can clone the latest source code with the command::
171
+
172
+ git clone https://github.com/PylarBear/pybear-dask.git
173
+
174
+ Contributing
175
+ ~~~~~~~~~~~~
176
+
177
+ pybear-dask is not ready for contributions at this time!
178
+
179
+ Testing
180
+ ~~~~~~~
181
+
182
+ pybear-dask 0.2 is tested via GitHub Actions to run on Linux, Windows, and MacOS,
183
+ with Python versions 3.10, 3.11, and 3.12. pybear-dask is not tested on earlier
184
+ versions, but some features may work.
185
+
186
+ If you want to test pybear-dask yourself, you will need:
187
+
188
+ - pytest (|PytestVersion|)
189
+
190
+ The tests are not available in the PyPI pip installation. You can get
191
+ the tests by downloading the tarball from the pybear-dask project page on
192
+ `pypi.org <https://pypi.org/project/pybear-dask/>`_ or cloning the pybear-dask
193
+ repo from `GitHub <https://github.com/PylarBear/pybear-dask>`_. Once you have
194
+ the source files in a local project folder, create a poetry environment for the
195
+ project and install the test dependencies. After installation, launch the poetry
196
+ environment shell and you can launch the test suite from the root of your
197
+ pybear-dask project folder with::
198
+
199
+ (your-pybear-dask-env) you@your_computer:/path/to/pybear-dask/project$ pytest tests/
200
+
201
+ Project History
202
+ ---------------
203
+
204
+ This project was spun off the main pybear project just prior to the first
205
+ public release of both. pybear-dask was spun off to ensure maximum stability
206
+ for the main pybear project, while keeping these modules available.
207
+
208
+ Help and Support
209
+ ----------------
210
+
211
+ Documentation
212
+ ~~~~~~~~~~~~~
213
+
214
+ Documentation is not expected to be made available via a website for this
215
+ package. Use the documentation for similar packages in the main pybear package.
216
+ See the repo for pybear: https://github.com/PylarBear/pybear/
217
+
218
+ Communication
219
+ ~~~~~~~~~~~~~
220
+
221
+ - GitHub Discussions: https://github.com/PylarBear/pybear-dask/discussions
222
+ - Website: https://github.com/PylarBear/pybear-dask
223
+
224
+
225
+
226
+
227
+
@@ -0,0 +1,83 @@
1
+ [tool.poetry]
2
+ name = "pybear-dask"
3
+ version = "0.2.0"
4
+ description = "Python modules for data analytics applications with dask"
5
+ license = "BSD-3-clause"
6
+ authors = ["Bill Sousa <WKSJR99@msn.com>"]
7
+ maintainers = ["Bill Sousa"]
8
+ readme = "README.rst"
9
+ # The contents of the README file(s) are used to populate the Description field
10
+ # of your distribution’s metadata (similar to long_description in setuptools).
11
+ # When multiple files are specified they are concatenated with newlines.
12
+ homepage = "https://github.com/PylarBear/pybear-dask"
13
+ repository = "https://github.com/PylarBear/pybear-dask"
14
+ #documentation
15
+ keywords = ["python data analytics pybear dask"]
16
+ #classifiers
17
+ packages = [
18
+ { include = "pybear_dask", from = "src"}
19
+ ]
20
+ include = [
21
+ "LICENSE",
22
+ "README.rst",
23
+ "CHANGELOG.md",
24
+ "tests"
25
+ ]
26
+ #exclude
27
+
28
+
29
+ [tool.poetry.dependencies]
30
+ # These packages are mandatory and form the core of this package’s distribution.
31
+ python = "^3.10, <3.13"
32
+ dask = "<2025.1"
33
+ dask-ml = "<2025.1"
34
+ distributed = "<2025.1"
35
+ pybear = ">=0.2.0" #{ version = ">=0.1.22", source = "testpypi" }
36
+ scikit-learn = "<1.7"
37
+ polars-lts-cpu = "^1.31.0"
38
+
39
+
40
+ [tool.poetry.group.dev.dependencies]
41
+ bokeh = "*"
42
+ docutils = ">=0.20"
43
+ graphviz = "*"
44
+ jupyter = "*"
45
+ notebook = "*"
46
+ pyarrow = ">=18.0.0"
47
+
48
+
49
+ [tool.poetry.group.test.dependencies]
50
+ pytest = ">=7.0.0"
51
+ pytest-cov = "*"
52
+ pytest-html = "*"
53
+
54
+
55
+ [tool.poetry.extras]
56
+ # Optional dependencies. They can be opted into by apps.
57
+
58
+
59
+ [tool.poetry.scripts]
60
+
61
+
62
+ [tool.poetry.plugins]
63
+
64
+
65
+ [tool.poetry.urls]
66
+ # If you publish your package on PyPI, they will appear in the Project Links section.
67
+
68
+
69
+ #[[tool.poetry.source]]
70
+ #name = "testpypi"
71
+ #url = "https://test.pypi.org/simple/"
72
+ #priority = "explicit"
73
+
74
+
75
+ [tool.coverage.run]
76
+ source = ["pybear_dask"]
77
+
78
+
79
+ [build-system]
80
+ requires = ["poetry-core"]
81
+ build-backend = "poetry.core.masonry.api"
82
+
83
+
@@ -0,0 +1,19 @@
1
+ # Author:
2
+ # Bill Sousa
3
+ #
4
+ # License: BSD 3 clause
5
+ #
6
+
7
+
8
+
9
+ from ._version import __version__
10
+ from ._version import __version_tuple__
11
+
12
+ __all__ = [
13
+ "model_selection",
14
+ "__version__"
15
+ ]
16
+
17
+
18
+
19
+
@@ -0,0 +1,38 @@
1
+ # Author:
2
+ # Bill Sousa
3
+ #
4
+ # License: BSD 3 clause
5
+ #
6
+
7
+
8
+ from typing import Tuple
9
+ from typing_extensions import Union
10
+ import numpy as np
11
+
12
+
13
+ try:
14
+ from importlib.metadata import version as get_version
15
+ except ImportError:
16
+ # For older Python versions, use importlib-metadata package
17
+ from importlib_metadata import version as get_version
18
+
19
+
20
+ version: str
21
+ __version__: str
22
+ VERSION_TUPLE = Tuple[Union[int, str], ...]
23
+ version_tuple: VERSION_TUPLE
24
+ __version_tuple__: VERSION_TUPLE
25
+
26
+ __version__ = version = get_version('pybear-dask')
27
+ dot_idxs = np.arange(len(__version__))[np.array(list(__version__)) == '.']
28
+ dot_idxs = list(map(int, dot_idxs))
29
+ __version_tuple__ = version_tuple = (
30
+ int(__version__[:dot_idxs[0]]),
31
+ int(__version__[dot_idxs[0]+1:dot_idxs[1]]),
32
+ int(__version__[dot_idxs[1]+1:])
33
+ )
34
+
35
+
36
+
37
+
38
+