completr 0.2.0__tar.gz → 0.2.1__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.
- {completr-0.2.0 → completr-0.2.1}/Cargo.lock +3 -3
- {completr-0.2.0 → completr-0.2.1}/Cargo.toml +1 -1
- {completr-0.2.0 → completr-0.2.1}/PKG-INFO +1 -1
- {completr-0.2.0 → completr-0.2.1}/crates/completr-py/Cargo.toml +3 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr-py/src/lib.rs +2 -1
- completr-0.2.1/crates/completr-py/tests/test_allocators.py +20 -0
- {completr-0.2.0 → completr-0.2.1}/LICENSE +0 -0
- {completr-0.2.0 → completr-0.2.1}/README.md +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr/Cargo.toml +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr/README.md +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr/src/blocked.rs +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr/src/client.rs +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr/src/codec.rs +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr/src/database.rs +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr/src/dict.rs +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr/src/document.rs +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr/src/elias_fano.rs +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr/src/engine.rs +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr/src/fuzzy.rs +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr/src/highlight.rs +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr/src/hybrid.rs +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr/src/inbox.rs +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr/src/index.rs +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr/src/lib.rs +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr/src/postings.rs +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr/src/search.rs +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr/src/segment/merge.rs +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr/src/segment/titles.rs +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr/src/segment/words.rs +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr/src/segment.rs +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr/src/staged.rs +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr/src/store.rs +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr/src/text.rs +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr/src/trie.rs +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr/src/vectors.rs +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr-py/examples/layers.py +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr-py/examples/live_updates.py +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr-py/examples/quickstart.py +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr-py/python/completr/__init__.py +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr-py/python/completr/__init__.pyi +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr-py/python/completr/_async.py +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr-py/python/completr/_async.pyi +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr-py/python/completr/_errors.py +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr-py/python/completr/_types.py +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr-py/python/completr/completr.pyi +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr-py/python/completr/py.typed +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr-py/tests/test_api.py +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr-py/tests/test_client.py +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr-py/tests/test_completr.py +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr-py/tests/test_database.py +0 -0
- {completr-0.2.0 → completr-0.2.1}/crates/completr-py/tests/test_vectors.py +0 -0
- {completr-0.2.0 → completr-0.2.1}/pyproject.toml +0 -0
|
@@ -735,7 +735,7 @@ dependencies = [
|
|
|
735
735
|
|
|
736
736
|
[[package]]
|
|
737
737
|
name = "completr"
|
|
738
|
-
version = "0.2.
|
|
738
|
+
version = "0.2.1"
|
|
739
739
|
dependencies = [
|
|
740
740
|
"arc-swap",
|
|
741
741
|
"async-trait",
|
|
@@ -765,7 +765,7 @@ dependencies = [
|
|
|
765
765
|
|
|
766
766
|
[[package]]
|
|
767
767
|
name = "completr-cli"
|
|
768
|
-
version = "0.2.
|
|
768
|
+
version = "0.2.1"
|
|
769
769
|
dependencies = [
|
|
770
770
|
"clap",
|
|
771
771
|
"completr",
|
|
@@ -776,7 +776,7 @@ dependencies = [
|
|
|
776
776
|
|
|
777
777
|
[[package]]
|
|
778
778
|
name = "completr-py"
|
|
779
|
-
version = "0.2.
|
|
779
|
+
version = "0.2.1"
|
|
780
780
|
dependencies = [
|
|
781
781
|
"completr",
|
|
782
782
|
"mimalloc",
|
|
@@ -18,4 +18,7 @@ pyo3 = { version = "0.29", features = ["extension-module", "abi3-py311"] }
|
|
|
18
18
|
pyo3-log = "0.13"
|
|
19
19
|
tracing = { version = "0.1", default-features = false, features = ["log"] }
|
|
20
20
|
completr_rs = { package = "completr", path = "../completr", features = ["aws-credentials", "gcp", "azure"] }
|
|
21
|
+
|
|
22
|
+
# Not on macOS, where every mimalloc in a process shares fixed thread slots and pyarrow ships one.
|
|
23
|
+
[target.'cfg(target_os = "linux")'.dependencies]
|
|
21
24
|
mimalloc = { version = "0.1", default-features = false }
|
|
@@ -10,7 +10,8 @@ use pyo3::prelude::*;
|
|
|
10
10
|
use pyo3::sync::PyOnceLock;
|
|
11
11
|
use pyo3::types::{PyBytes, PyDict, PyList, PyString, PyType};
|
|
12
12
|
|
|
13
|
-
// Returns freed memory to the system, which
|
|
13
|
+
// Returns freed memory to the system, which glibc keeps after a build.
|
|
14
|
+
#[cfg(target_os = "linux")]
|
|
14
15
|
#[global_allocator]
|
|
15
16
|
static ALLOCATOR: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
|
16
17
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import pytest
|
|
2
|
+
|
|
3
|
+
import completr
|
|
4
|
+
|
|
5
|
+
pyarrow = pytest.importorskip("pyarrow")
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def test_completes_alongside_pyarrow_allocations(tmp_path):
|
|
9
|
+
pool = pyarrow.default_memory_pool()
|
|
10
|
+
table = pyarrow.table({"text": [f"skill {i}" for i in range(10_000)]})
|
|
11
|
+
assert pool.bytes_allocated() > 0
|
|
12
|
+
db = completr.connect(str(tmp_path / "db"))
|
|
13
|
+
with db.namespace("en-US").begin() as txn:
|
|
14
|
+
txn.overwrite("owner", [{"id": f"s{i}", "text": f"Skill {i}", "popularity": 0.5} for i in range(2_000)])
|
|
15
|
+
namespace = completr.connect(str(tmp_path / "db")).engine(sync_every=None).namespace("en-US")
|
|
16
|
+
for _ in range(200):
|
|
17
|
+
hits = namespace.complete("skill 1", ["owner"])
|
|
18
|
+
assert [str(h.id) for h in hits]
|
|
19
|
+
table = table.slice(1)
|
|
20
|
+
assert len(table) > 0
|
|
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
|