Skip to content

Commit 21369ca

Browse files
raphaelstyclaude
andcommitted
Bump version from 1.4.2 to 1.4.3, fix np.load deprecation, and fix ruff lint
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3bdbeb6 commit 21369ca

File tree

9 files changed

+17
-17
lines changed

9 files changed

+17
-17
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "fast_plaid_rust"
3-
version = "1.4.2"
3+
version = "1.4.3"
44
edition = "2021"
55
build = "build.rs"
66

README.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ FastPlaid is available in multiple versions to support different PyTorch version
4444

4545
| FastPlaid Version | PyTorch Version | Installation Command |
4646
| ----------------- | --------------- | ----------------------------------- |
47-
| 1.4.2.290 | 2.9.0 | `pip install fast-plaid==1.4.2.290` |
48-
| 1.4.2.280 | 2.8.0 | `pip install fast-plaid==1.4.2.280` |
49-
| 1.4.2.271 | 2.7.1 | `pip install fast-plaid==1.4.2.271` |
50-
| 1.4.2.270 | 2.7.0 | `pip install fast-plaid==1.4.2.270` |
47+
| 1.4.3.290 | 2.9.0 | `pip install fast-plaid==1.4.3.290` |
48+
| 1.4.3.280 | 2.8.0 | `pip install fast-plaid==1.4.3.280` |
49+
| 1.4.3.271 | 2.7.1 | `pip install fast-plaid==1.4.3.271` |
50+
| 1.4.3.270 | 2.7.0 | `pip install fast-plaid==1.4.3.270` |
5151

5252
### Adding FastPlaid as a Dependency
5353

@@ -56,23 +56,23 @@ You can add FastPlaid to your project dependencies with version ranges to ensure
5656
**For requirements.txt:**
5757

5858
```
59-
fast-plaid>=1.4.2.270,<=1.4.2.290
59+
fast-plaid>=1.4.3.270,<=1.4.3.290
6060
```
6161

6262
**For pyproject.toml:**
6363

6464
```toml
6565
[project]
6666
dependencies = [
67-
"fast-plaid>=1.4.2.270,<=1.4.2.290"
67+
"fast-plaid>=1.4.3.270,<=1.4.3.290"
6868
]
6969
```
7070

7171
**For setup.py:**
7272

7373
```python
7474
install_requires=[
75-
"fast-plaid>=1.4.2.270,<=1.4.2.290"
75+
"fast-plaid>=1.4.3.270,<=1.4.3.290"
7676
]
7777
```
7878

@@ -233,7 +233,6 @@ Parameter Default Memory Speed
233233
low_memory True lower = less VRAM usage True = slower No effect when device is "cpu", only used when device is GPU. Load index tensors on CPU and move to device only when needed. Accelerate search at the cost of higher VRAM usage when False.
234234
```
235235

236-
237236
### Indexing
238237

239238
```python
@@ -359,7 +358,7 @@ device: str | list[str] | None = None
359358
- Can be a list of device strings (e.g., ["cuda:0", "cuda:1"]).
360359
- If multiple GPUs are specified and available, multiprocessing is automatically set up for parallel execution.
361360
Remember to include your code within an `if __name__ == "__main__":` block for proper multiprocessing behavior.
362-
361+
363362
low_memory: bool = True
364363
If True, the index is loaded in a memory-efficient manner, keeping tensors on CPU and moving them to the target device only when needed. This reduces VRAM usage at the cost of some performance. No effect when device is "cpu".
365364

ci-270.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ build-backend = "maturin"
99

1010
[project]
1111
name = "fast_plaid"
12-
version = "1.4.2.270"
12+
version = "1.4.3.270"
1313
description = "Fast Plaid."
1414
authors = [
1515
{ name = "Raphael Sourty, LightOn", email = "raphael.sourty@lighton.ai" },

ci-271.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ build-backend = "maturin"
99

1010
[project]
1111
name = "fast_plaid"
12-
version = "1.4.2.271"
12+
version = "1.4.3.271"
1313
description = "Fast Plaid."
1414
authors = [
1515
{ name = "Raphael Sourty, LightOn", email = "raphael.sourty@lighton.ai" },

ci-280.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ build-backend = "maturin"
99

1010
[project]
1111
name = "fast_plaid"
12-
version = "1.4.2.280"
12+
version = "1.4.3.280"
1313
description = "Fast Plaid."
1414
authors = [
1515
{ name = "Raphael Sourty, LightOn", email = "raphael.sourty@lighton.ai" },

ci-290.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ build-backend = "maturin"
99

1010
[project]
1111
name = "fast_plaid"
12-
version = "1.4.2.290"
12+
version = "1.4.3.290"
1313
description = "Fast Plaid."
1414
authors = [
1515
{ name = "Raphael Sourty, LightOn", email = "raphael.sourty@lighton.ai" },

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ build-backend = "maturin"
99

1010
[project]
1111
name = "fast_plaid"
12-
version = "1.4.2"
12+
version = "1.4.3"
1313
description = "Fast Plaid."
1414
authors = [
1515
{ name = "Raphael Sourty, LightOn", email = "raphael.sourty@lighton.ai" },

python/fast_plaid/search/fast_plaid.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
if TYPE_CHECKING:
1414
import types
15+
from typing import Self
1516

1617
import numpy as np
1718
import torch
@@ -325,7 +326,7 @@ def close(self) -> None:
325326
self.indices.clear()
326327
gc.collect()
327328

328-
def __enter__(self) -> "FastPlaid":
329+
def __enter__(self) -> Self:
329330
"""Enable context manager usage."""
330331
return self
331332

python/fast_plaid/search/update.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ def process_update(
361361
raise RuntimeError("Index not loaded for update.")
362362

363363
thresh_path = os.path.join(index_path, "cluster_threshold.npy")
364-
cluster_threshold = float(np.load(thresh_path))
364+
cluster_threshold = float(np.load(thresh_path).item())
365365

366366
existing_buffer_embeddings: list[torch.Tensor] = []
367367

0 commit comments

Comments
 (0)