bblean 0.6.0b1__tar.gz → 0.6.0b2__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.
- {bblean-0.6.0b1 → bblean-0.6.0b2}/.github/workflows/ci-cpp.yaml +23 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/.github/workflows/upload-to-pypi.yaml +2 -2
- {bblean-0.6.0b1 → bblean-0.6.0b2}/PKG-INFO +8 -3
- {bblean-0.6.0b1 → bblean-0.6.0b2}/README.md +7 -2
- {bblean-0.6.0b1 → bblean-0.6.0b2}/bblean/_version.py +2 -2
- {bblean-0.6.0b1 → bblean-0.6.0b2}/bblean/cli.py +1 -5
- {bblean-0.6.0b1 → bblean-0.6.0b2}/bblean/csrc/similarity.cpp +4 -4
- {bblean-0.6.0b1 → bblean-0.6.0b2}/bblean.egg-info/PKG-INFO +8 -3
- {bblean-0.6.0b1 → bblean-0.6.0b2}/setup.py +3 -1
- {bblean-0.6.0b1 → bblean-0.6.0b2}/tests/test_cli.py +13 -1
- {bblean-0.6.0b1 → bblean-0.6.0b2}/tests/test_global_clustering.py +36 -30
- {bblean-0.6.0b1 → bblean-0.6.0b2}/tests/test_regression.py +1 -1
- {bblean-0.6.0b1 → bblean-0.6.0b2}/.cruft.json +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/.flake8 +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/.github/CODEOWNERS +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/.github/workflows/ci.yaml +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/.gitignore +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/.pre-commit-config.yaml +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/LICENSE +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/LICENSES/BSD-3-Clause.txt +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/LICENSES/GPL-3.0-only.txt +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/bblean/__init__.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/bblean/_config.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/bblean/_console.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/bblean/_legacy/__init__.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/bblean/_legacy/bb_int64.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/bblean/_legacy/bb_uint8.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/bblean/_memory.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/bblean/_merges.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/bblean/_py_similarity.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/bblean/_timer.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/bblean/analysis.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/bblean/bitbirch.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/bblean/csrc/README.md +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/bblean/fingerprints.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/bblean/metrics.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/bblean/multiround.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/bblean/plotting.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/bblean/similarity.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/bblean/sklearn.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/bblean/smiles.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/bblean/utils.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/bblean-demo-v2.gif +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/bblean-demo.cast +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/bblean.egg-info/SOURCES.txt +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/bblean.egg-info/dependency_links.txt +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/bblean.egg-info/entry_points.txt +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/bblean.egg-info/requires.txt +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/bblean.egg-info/top_level.txt +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/docs/src/_static/api.svg +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/docs/src/_static/installing.svg +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/docs/src/_static/logo-dark-bw.svg +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/docs/src/_static/logo-light-bw.svg +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/docs/src/_static/publications.svg +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/docs/src/_static/style.css +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/docs/src/_static/user-guide.svg +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/docs/src/_templates/module.rst +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/docs/src/api-reference.rst +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/docs/src/conf.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/docs/src/index.rst +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/docs/src/installing.rst +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/docs/src/publications.rst +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/docs/src/user-guide/linux_memory_setup.rst +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/docs/src/user-guide/notebooks/bitbirch_best_practices.ipynb +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/docs/src/user-guide/notebooks/bitbirch_quickstart.ipynb +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/docs/src/user-guide/parameters.rst +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/docs/src/user-guide.rst +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/environment.yaml +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/examples/biogen_logS.csv +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/examples/bitbirch_best_practices.ipynb +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/examples/bitbirch_quickstart.ipynb +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/examples/chembl-33-natural-products-subset.smi +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/examples/dataset_splitting.ipynb +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/pyproject.toml +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/setup.cfg +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/tests/chembl-sample-3k.smi +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/tests/chembl-sample-bad.smi +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/tests/legacy_merges.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/tests/legacy_metrics.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/tests/test_bb_consistency.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/tests/test_fake_fps.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/tests/test_fingerprints.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/tests/test_import_bblean.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/tests/test_merges.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/tests/test_metrics.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/tests/test_multiround.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/tests/test_refine.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/tests/test_sampling.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/tests/test_similarity.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/tests/test_simple.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/tests/test_sklearn.py +0 -0
- {bblean-0.6.0b1 → bblean-0.6.0b2}/tests/test_utils.py +0 -0
|
@@ -36,6 +36,29 @@ jobs:
|
|
|
36
36
|
- name: run-pytest
|
|
37
37
|
run: BITBIRCH_CANT_SKIP_CPP_TESTS=1 pytest -s ./tests/test_similarity.py
|
|
38
38
|
|
|
39
|
+
cpp-tests-win:
|
|
40
|
+
runs-on: windows-latest
|
|
41
|
+
steps:
|
|
42
|
+
- name: checkout-repo
|
|
43
|
+
uses: actions/checkout@v5
|
|
44
|
+
|
|
45
|
+
- name: setup-python
|
|
46
|
+
uses: actions/setup-python@v6
|
|
47
|
+
with:
|
|
48
|
+
python-version: ${{ env.PYTHON_VERSION }}
|
|
49
|
+
|
|
50
|
+
- name: install-repo
|
|
51
|
+
run: |
|
|
52
|
+
python -m pip install --upgrade pip
|
|
53
|
+
pip install pytest pytest-subtests inline-snapshot
|
|
54
|
+
$env:BITBIRCH_BUILD_CPP="1"
|
|
55
|
+
pip install --verbose .
|
|
56
|
+
|
|
57
|
+
- name: run-pytest
|
|
58
|
+
run: |
|
|
59
|
+
$env:BITBIRCH_CANT_SKIP_CPP_TESTS="1"
|
|
60
|
+
pytest -s ./tests/test_similarity.py
|
|
61
|
+
|
|
39
62
|
|
|
40
63
|
# Ubuntu 24.04 for reproducibility in regression tests only
|
|
41
64
|
# coverage makes tests slightly slower, so regression tests should not run with
|
|
@@ -23,7 +23,7 @@ env:
|
|
|
23
23
|
# Skip py 3.14, 32 bit and musllinux (Alpine) wheels
|
|
24
24
|
CIBW_SKIP: "cp314-* cp314t-* *-manylinux_i686 *-win32 *-musllinux_*"
|
|
25
25
|
CIBW_TEST_REQUIRES: pytest pytest-subtests inline-snapshot
|
|
26
|
-
CIBW_TEST_COMMAND: pytest -k
|
|
26
|
+
CIBW_TEST_COMMAND: pytest -k "not regression" {project}/tests
|
|
27
27
|
CIBW_PRERELEASE_PYTHONS: False
|
|
28
28
|
CIBW_ENVIRONMENT: "SETUPTOOLS_SCM_PRETEND_VERSION=${{ github.event.inputs.version }} BITBIRCH_BUILD_CPP=1"
|
|
29
29
|
# Build wheels that support both aarch64 and x86_64 on macOS
|
|
@@ -63,7 +63,7 @@ jobs:
|
|
|
63
63
|
build_wheels:
|
|
64
64
|
strategy:
|
|
65
65
|
matrix:
|
|
66
|
-
os: [ubuntu-latest, macos-latest]
|
|
66
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
67
67
|
name: build-${{ matrix.os }}-wheels
|
|
68
68
|
runs-on: ${{ matrix.os }}
|
|
69
69
|
steps:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bblean
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.0b2
|
|
4
4
|
Summary: BitBirch-Lean Python package
|
|
5
5
|
Author: The Miranda-Quintana Lab and other BitBirch developers
|
|
6
6
|
Author-email: Ramon Alain Miranda Quintana <quintana@chem.ufl.edu>, Krisztina Zsigmond <kzsigmond@ufl.edu>, Ignacio Pickering <ipickering@ufl.edu>, Kenneth Lopez Perez <klopezperez@chem.ufl.edu>, Miroslav Lzicar <miroslav.lzicar@deepmedchem.com>
|
|
@@ -85,14 +85,19 @@ tuning](https://mqcomplab.github.io/bblean/devdocs/user-guide/parameters.html) g
|
|
|
85
85
|
|
|
86
86
|
## Installation
|
|
87
87
|
|
|
88
|
-
BitBIRCH-Lean requires Python 3.11 or higher, and can be installed in Linux or
|
|
89
|
-
|
|
88
|
+
BitBIRCH-Lean requires Python 3.11 or higher, and can be installed in Windows, Linux or
|
|
89
|
+
macOS via pip, which automatically includes C++ extensions:
|
|
90
90
|
|
|
91
91
|
```bash
|
|
92
92
|
pip install bblean
|
|
93
|
+
bb --help
|
|
93
94
|
```
|
|
95
|
+
|
|
94
96
|
We recommend installing `bblean` in a conda environment or a `venv`.
|
|
95
97
|
|
|
98
|
+
Memory usage and C++ extensions are most optimized for Linux / macOS. We support windows
|
|
99
|
+
on a best-effort basis, some releases may not have Windows support.
|
|
100
|
+
|
|
96
101
|
### From source
|
|
97
102
|
|
|
98
103
|
To build from source instead (editable mode):
|
|
@@ -42,14 +42,19 @@ tuning](https://mqcomplab.github.io/bblean/devdocs/user-guide/parameters.html) g
|
|
|
42
42
|
|
|
43
43
|
## Installation
|
|
44
44
|
|
|
45
|
-
BitBIRCH-Lean requires Python 3.11 or higher, and can be installed in Linux or
|
|
46
|
-
|
|
45
|
+
BitBIRCH-Lean requires Python 3.11 or higher, and can be installed in Windows, Linux or
|
|
46
|
+
macOS via pip, which automatically includes C++ extensions:
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
49
|
pip install bblean
|
|
50
|
+
bb --help
|
|
50
51
|
```
|
|
52
|
+
|
|
51
53
|
We recommend installing `bblean` in a conda environment or a `venv`.
|
|
52
54
|
|
|
55
|
+
Memory usage and C++ extensions are most optimized for Linux / macOS. We support windows
|
|
56
|
+
on a best-effort basis, some releases may not have Windows support.
|
|
57
|
+
|
|
53
58
|
### From source
|
|
54
59
|
|
|
55
60
|
To build from source instead (editable mode):
|
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.6.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 6, 0, '
|
|
31
|
+
__version__ = version = '0.6.0b2'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 6, 0, 'b2')
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
|
@@ -957,7 +957,6 @@ def _run(
|
|
|
957
957
|
bool,
|
|
958
958
|
Option(
|
|
959
959
|
"--monitor-mem/--no-monitor-mem",
|
|
960
|
-
"--monitor-rss/--no-monitor-rss",
|
|
961
960
|
help="Monitor RAM used by all processes",
|
|
962
961
|
rich_help_panel="Advanced",
|
|
963
962
|
),
|
|
@@ -966,7 +965,6 @@ def _run(
|
|
|
966
965
|
float,
|
|
967
966
|
Option(
|
|
968
967
|
"--monitor-mem-seconds",
|
|
969
|
-
"--monitor-rss-seconds",
|
|
970
968
|
help="Interval in seconds for RAM monitoring",
|
|
971
969
|
rich_help_panel="Debug",
|
|
972
970
|
hidden=True,
|
|
@@ -1284,8 +1282,7 @@ def _multiround(
|
|
|
1284
1282
|
monitor_rss: Annotated[
|
|
1285
1283
|
bool,
|
|
1286
1284
|
Option(
|
|
1287
|
-
"--monitor-mem",
|
|
1288
|
-
"--monitor-rss",
|
|
1285
|
+
"--monitor-mem/--no-monitor-mem",
|
|
1289
1286
|
help="Monitor RAM used by all processes",
|
|
1290
1287
|
rich_help_panel="Advanced",
|
|
1291
1288
|
),
|
|
@@ -1294,7 +1291,6 @@ def _multiround(
|
|
|
1294
1291
|
float,
|
|
1295
1292
|
Option(
|
|
1296
1293
|
"--monitor-mem-seconds",
|
|
1297
|
-
"--monitor-rss-seconds",
|
|
1298
1294
|
help="Interval in seconds for RAM monitoring",
|
|
1299
1295
|
rich_help_panel="Debug",
|
|
1300
1296
|
hidden=True,
|
|
@@ -69,7 +69,7 @@ uint32_t _popcount_1d(const py::array_t<uint8_t>& arr) {
|
|
|
69
69
|
#endif
|
|
70
70
|
uint32_t count{0}; // Output scalar
|
|
71
71
|
py::ssize_t steps = arr.shape(0);
|
|
72
|
-
if (is_8byte_aligned(arr)
|
|
72
|
+
if (is_8byte_aligned(arr) && (steps % 64 == 0)) {
|
|
73
73
|
#ifdef DEBUG_LOGS
|
|
74
74
|
py::print("DEBUG: _popcount_1d fn triggered uint64 + popcount 64");
|
|
75
75
|
#endif
|
|
@@ -110,7 +110,7 @@ py::array_t<uint32_t> _popcount_2d(const CArrayForcecast<uint8_t>& arr) {
|
|
|
110
110
|
print_8byte_alignment_check(arr);
|
|
111
111
|
#endif
|
|
112
112
|
py::ssize_t steps = arr.shape(1);
|
|
113
|
-
if (is_8byte_aligned(arr)
|
|
113
|
+
if (is_8byte_aligned(arr) && (steps % 64 == 0)) {
|
|
114
114
|
#ifdef DEBUG_LOGS
|
|
115
115
|
py::print("DEBUG: _popcount_2d fn triggered uint64 + popcount 64");
|
|
116
116
|
#endif
|
|
@@ -243,7 +243,7 @@ py::array_t<uint8_t> centroid_from_sum(const CArrayForcecast<T>& linear_sum,
|
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
-
if (
|
|
246
|
+
if (!pack) {
|
|
247
247
|
return centroid_unpacked;
|
|
248
248
|
}
|
|
249
249
|
|
|
@@ -351,7 +351,7 @@ py::array_t<double> jt_sim_packed_precalc_cardinalities(
|
|
|
351
351
|
}
|
|
352
352
|
auto out = py::array_t<double>(n_samples);
|
|
353
353
|
|
|
354
|
-
if (is_8byte_aligned(arr)
|
|
354
|
+
if (is_8byte_aligned(arr) && is_8byte_aligned(vec) &&
|
|
355
355
|
(n_features % 64 == 0)) {
|
|
356
356
|
#ifdef DEBUG_LOGS
|
|
357
357
|
py::print("DEBUG: jt_sim_packed fn triggered uint64 + popcount 64");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bblean
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.0b2
|
|
4
4
|
Summary: BitBirch-Lean Python package
|
|
5
5
|
Author: The Miranda-Quintana Lab and other BitBirch developers
|
|
6
6
|
Author-email: Ramon Alain Miranda Quintana <quintana@chem.ufl.edu>, Krisztina Zsigmond <kzsigmond@ufl.edu>, Ignacio Pickering <ipickering@ufl.edu>, Kenneth Lopez Perez <klopezperez@chem.ufl.edu>, Miroslav Lzicar <miroslav.lzicar@deepmedchem.com>
|
|
@@ -85,14 +85,19 @@ tuning](https://mqcomplab.github.io/bblean/devdocs/user-guide/parameters.html) g
|
|
|
85
85
|
|
|
86
86
|
## Installation
|
|
87
87
|
|
|
88
|
-
BitBIRCH-Lean requires Python 3.11 or higher, and can be installed in Linux or
|
|
89
|
-
|
|
88
|
+
BitBIRCH-Lean requires Python 3.11 or higher, and can be installed in Windows, Linux or
|
|
89
|
+
macOS via pip, which automatically includes C++ extensions:
|
|
90
90
|
|
|
91
91
|
```bash
|
|
92
92
|
pip install bblean
|
|
93
|
+
bb --help
|
|
93
94
|
```
|
|
95
|
+
|
|
94
96
|
We recommend installing `bblean` in a conda environment or a `venv`.
|
|
95
97
|
|
|
98
|
+
Memory usage and C++ extensions are most optimized for Linux / macOS. We support windows
|
|
99
|
+
on a best-effort basis, some releases may not have Windows support.
|
|
100
|
+
|
|
96
101
|
### From source
|
|
97
102
|
|
|
98
103
|
To build from source instead (editable mode):
|
|
@@ -23,13 +23,15 @@ APPLE_SILICON = platform.machine().lower() in ["arm64", "aarch64"]
|
|
|
23
23
|
ARM = platform.machine().lower().startswith("arm") and not APPLE_SILICON
|
|
24
24
|
|
|
25
25
|
# Build C++ extensions (recommended)
|
|
26
|
+
extra_compile_args = []
|
|
26
27
|
if os.getenv("BITBIRCH_BUILD_CPP"):
|
|
27
28
|
import pybind11
|
|
28
29
|
from pybind11.setup_helpers import Pybind11Extension, WIN
|
|
29
30
|
|
|
30
31
|
# setuptools paths must be relative
|
|
31
32
|
ext_sources = [str((Path(name) / "csrc" / "similarity.cpp"))]
|
|
32
|
-
|
|
33
|
+
if not WIN:
|
|
34
|
+
extra_compile_args.append("-O3") # -O3 includes -ftree-vectorize
|
|
33
35
|
if not WIN:
|
|
34
36
|
if X86:
|
|
35
37
|
if os.getenv("BITBIRCH_BUILD_NATIVE"):
|
|
@@ -254,6 +254,7 @@ def test_multiround() -> None:
|
|
|
254
254
|
"--no-verbose",
|
|
255
255
|
"--set-mid-merge",
|
|
256
256
|
"tolerance-legacy",
|
|
257
|
+
"--no-monitor-mem",
|
|
257
258
|
],
|
|
258
259
|
)
|
|
259
260
|
with open(out_dir / "clusters.pkl", mode="rb") as f:
|
|
@@ -288,7 +289,18 @@ def test_run() -> None:
|
|
|
288
289
|
np.save(dir / "fingerprints.npy", fps)
|
|
289
290
|
out_dir = dir / "output"
|
|
290
291
|
result = runner.invoke(
|
|
291
|
-
app,
|
|
292
|
+
app,
|
|
293
|
+
[
|
|
294
|
+
"run",
|
|
295
|
+
str(dir),
|
|
296
|
+
"-o",
|
|
297
|
+
str(out_dir),
|
|
298
|
+
"-b",
|
|
299
|
+
"50",
|
|
300
|
+
"-t",
|
|
301
|
+
"0.65",
|
|
302
|
+
"--no-monitor-mem",
|
|
303
|
+
],
|
|
292
304
|
)
|
|
293
305
|
with open(out_dir / "clusters.pkl", mode="rb") as f:
|
|
294
306
|
obj = pickle.load(f)
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import sys
|
|
2
|
+
|
|
3
|
+
import pytest
|
|
2
4
|
import numpy as np
|
|
5
|
+
|
|
3
6
|
from bblean.bitbirch import BitBirch
|
|
4
7
|
from bblean.fingerprints import make_fake_fingerprints, unpack_fingerprints
|
|
5
8
|
from inline_snapshot import snapshot
|
|
6
9
|
|
|
7
10
|
|
|
8
11
|
def test_random_fps_consistency() -> None:
|
|
12
|
+
# TODO For some strage reason this test *fails on macOS and Windows*
|
|
13
|
+
# The kmeans implementation of sklearn seems to work different in linux and macOS
|
|
14
|
+
if sys.platform != "linux":
|
|
15
|
+
pytest.skip("Currently global clustering is non-deterministic on mac / windows")
|
|
16
|
+
|
|
9
17
|
fps = make_fake_fingerprints(3000, n_features=2048, seed=126205095409235, pack=True)
|
|
10
18
|
tree = BitBirch(branching_factor=50, threshold=0.65, merge_criterion="diameter")
|
|
11
19
|
tree.fit(fps, n_features=2048)
|
|
@@ -29,33 +37,31 @@ def test_random_fps_consistency() -> None:
|
|
|
29
37
|
[235, 255, 123, 255, 255],
|
|
30
38
|
]
|
|
31
39
|
)
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
[
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
[
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
]
|
|
61
|
-
)
|
|
40
|
+
|
|
41
|
+
tree.global_clustering(
|
|
42
|
+
20,
|
|
43
|
+
method="kmeans",
|
|
44
|
+
n_init=1,
|
|
45
|
+
init=unpack_fingerprints(np.vstack(output_cent))[::2][:20],
|
|
46
|
+
max_iter=10,
|
|
47
|
+
)
|
|
48
|
+
output_mol_ids = tree.get_cluster_mol_ids(global_clusters=True, sort=False)
|
|
49
|
+
output_med = tree.get_medoids(fps, global_clusters=True, sort=False)
|
|
50
|
+
assert [o[:5] for o in output_mol_ids[:5]] == snapshot(
|
|
51
|
+
[
|
|
52
|
+
[16, 1023, 1793, 2, 15],
|
|
53
|
+
[1873, 1882, 1912, 1954, 1970],
|
|
54
|
+
[12, 1877, 1861, 2068, 2012],
|
|
55
|
+
[1560, 1901, 2065, 2037, 2396],
|
|
56
|
+
[62, 73, 75, 87, 121],
|
|
57
|
+
]
|
|
58
|
+
)
|
|
59
|
+
assert output_med[:5, :5].tolist() == snapshot(
|
|
60
|
+
[
|
|
61
|
+
[255, 127, 252, 111, 223],
|
|
62
|
+
[255, 255, 95, 255, 239],
|
|
63
|
+
[123, 239, 238, 135, 126],
|
|
64
|
+
[223, 14, 207, 187, 104],
|
|
65
|
+
[255, 255, 255, 247, 255],
|
|
66
|
+
]
|
|
67
|
+
)
|
|
@@ -77,7 +77,7 @@ def test_speed_regression(subtests) -> None:
|
|
|
77
77
|
# all_max_allowed_ns = [1_200_000_000, 1_900_000_000, 2_500_000_000]
|
|
78
78
|
# For the ubuntu-24.04 in gh CI the following are required:
|
|
79
79
|
if CSIM_AVAIL:
|
|
80
|
-
all_max_allowed_ns = [900_000_000,
|
|
80
|
+
all_max_allowed_ns = [900_000_000, 1_500_000_000, 2_000_000_000]
|
|
81
81
|
else:
|
|
82
82
|
all_max_allowed_ns = [1_700_000_000, 2_600_000_000, 3_600_000_000]
|
|
83
83
|
for fps_num, max_allowed_ns in zip(all_fps_nums, all_max_allowed_ns):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bblean-0.6.0b1 → bblean-0.6.0b2}/docs/src/user-guide/notebooks/bitbirch_best_practices.ipynb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|