Skip to content

Commit ae7f99e

Browse files
committed
[BUG] Remove num_threads from server return
1 parent 60be7e3 commit ae7f99e

File tree

4 files changed

+1
-18
lines changed

4 files changed

+1
-18
lines changed

Diff for: chromadb/test/configurations/test_collection_configuration.py

-2
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,6 @@ def test_hnsw_configuration_updates(client: ClientAPI) -> None:
268268
hnsw_config = loaded_config.get("hnsw", {})
269269
if isinstance(hnsw_config, dict):
270270
assert hnsw_config.get("ef_search") == 20
271-
assert hnsw_config.get("num_threads") == 2
272271
assert hnsw_config.get("space") == "cosine"
273272
assert hnsw_config.get("ef_construction") == 100
274273
assert hnsw_config.get("max_neighbors") == 16
@@ -337,7 +336,6 @@ def test_configuration_result_format(client: ClientAPI) -> None:
337336
hnsw_config = coll._model.configuration_json.get("hnsw")
338337
assert hnsw_config is not None
339338
assert hnsw_config.get("ef_search") == 10
340-
assert hnsw_config.get("num_threads") == 2
341339
assert hnsw_config.get("space") == "cosine"
342340

343341

Diff for: clients/js/packages/chromadb-core/src/generated/models.ts

-6
Original file line numberDiff line numberDiff line change
@@ -222,12 +222,6 @@ export namespace Api {
222222
* minimum: 0
223223
*/
224224
max_neighbors?: number;
225-
/**
226-
* @type {number}
227-
* @memberof HnswConfiguration
228-
* minimum: 0
229-
*/
230-
num_threads?: number;
231225
/**
232226
* @type {number}
233227
* @memberof HnswConfiguration

Diff for: clients/js/packages/chromadb-core/test/collection.config.client.test.ts

-10
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ describe("collection operations", () => {
3838
expect(collection.configuration?.hnsw?.ef_construction).toBe(100);
3939
expect(collection.configuration?.hnsw?.max_neighbors).toBe(10);
4040
expect(collection.configuration?.hnsw?.ef_search).toBe(20);
41-
expect(collection.configuration?.hnsw?.num_threads).toBe(2);
4241
});
4342

4443
test("it should get a collection with configuration", async () => {
@@ -67,7 +66,6 @@ describe("collection operations", () => {
6766
expect(collection.configuration?.hnsw?.ef_construction).toBe(150);
6867
expect(collection.configuration?.hnsw?.max_neighbors).toBe(15);
6968
expect(collection.configuration?.hnsw?.ef_search).toBe(100);
70-
expect(collection.configuration?.hnsw?.num_threads).toBeGreaterThan(0);
7169
});
7270

7371
test("it should update a collection configuration", async () => {
@@ -84,7 +82,6 @@ describe("collection operations", () => {
8482
});
8583

8684
expect(collection.configuration?.hnsw?.ef_search).toBe(10);
87-
expect(collection.configuration?.hnsw?.num_threads).toBe(1);
8885

8986
// Update configuration
9087
const updateConfig: UpdateCollectionConfiguration = {
@@ -108,7 +105,6 @@ describe("collection operations", () => {
108105
expect(updatedCollection.configuration).toBeDefined();
109106
expect(updatedCollection.configuration).toHaveProperty("hnsw");
110107
expect(updatedCollection.configuration?.hnsw?.ef_search).toBe(20);
111-
expect(updatedCollection.configuration?.hnsw?.num_threads).toBe(2);
112108
expect(updatedCollection.configuration?.hnsw?.space).toBe("cosine");
113109
expect(updatedCollection.configuration?.hnsw?.ef_construction).toBe(100);
114110
expect(updatedCollection.configuration?.hnsw?.max_neighbors).toBe(16);
@@ -145,7 +141,6 @@ describe("collection operations", () => {
145141
expect(collection.configuration?.hnsw?.ef_construction).toBe(100); // Default
146142
expect(collection.configuration?.hnsw?.max_neighbors).toBe(16); // Default
147143
expect(collection.configuration?.hnsw?.ef_search).toBe(100); // Default
148-
expect(collection.configuration?.hnsw?.num_threads).toBeGreaterThan(0); // Default > 0
149144
});
150145

151146
test("it should apply defaults for unspecified hnsw params (space)", async () => {
@@ -160,7 +155,6 @@ describe("collection operations", () => {
160155
expect(collection.configuration?.hnsw?.ef_construction).toBe(100); // Default
161156
expect(collection.configuration?.hnsw?.max_neighbors).toBe(16); // Default
162157
expect(collection.configuration?.hnsw?.ef_search).toBe(100); // Default
163-
expect(collection.configuration?.hnsw?.num_threads).toBeGreaterThan(0); // Default > 0
164158
});
165159

166160
test("it should apply defaults for unspecified hnsw params (ef_construction)", async () => {
@@ -175,7 +169,6 @@ describe("collection operations", () => {
175169
expect(collection.configuration?.hnsw?.ef_construction).toBe(200); // Specified
176170
expect(collection.configuration?.hnsw?.max_neighbors).toBe(16); // Default
177171
expect(collection.configuration?.hnsw?.ef_search).toBe(100); // Default
178-
expect(collection.configuration?.hnsw?.num_threads).toBeGreaterThan(0); // Default > 0
179172
});
180173

181174
test("it should apply defaults for unspecified hnsw params (max_neighbors)", async () => {
@@ -190,7 +183,6 @@ describe("collection operations", () => {
190183
expect(collection.configuration?.hnsw?.ef_construction).toBe(100); // Default
191184
expect(collection.configuration?.hnsw?.max_neighbors).toBe(32); // Specified
192185
expect(collection.configuration?.hnsw?.ef_search).toBe(100); // Default
193-
expect(collection.configuration?.hnsw?.num_threads).toBeGreaterThan(0); // Default > 0
194186
});
195187

196188
test("it should apply defaults for unspecified hnsw params (ef_search)", async () => {
@@ -205,7 +197,6 @@ describe("collection operations", () => {
205197
expect(collection.configuration?.hnsw?.ef_construction).toBe(100); // Default
206198
expect(collection.configuration?.hnsw?.max_neighbors).toBe(16); // Default
207199
expect(collection.configuration?.hnsw?.ef_search).toBe(50); // Specified
208-
expect(collection.configuration?.hnsw?.num_threads).toBeGreaterThan(0); // Default > 0
209200
});
210201

211202
test("it should apply defaults for unspecified hnsw params (num_threads)", async () => {
@@ -220,6 +211,5 @@ describe("collection operations", () => {
220211
expect(collection.configuration?.hnsw?.ef_construction).toBe(100); // Default
221212
expect(collection.configuration?.hnsw?.max_neighbors).toBe(16); // Default
222213
expect(collection.configuration?.hnsw?.ef_search).toBe(100); // Default
223-
expect(collection.configuration?.hnsw?.num_threads).toBe(4); // Specified
224214
});
225215
});

Diff for: rust/types/src/hnsw_configuration.rs

+1
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ pub struct HnswConfiguration {
8282
#[serde(default = "default_m")]
8383
pub max_neighbors: usize,
8484
#[serde(default = "default_num_threads")]
85+
#[serde(skip_serializing)]
8586
pub num_threads: usize,
8687
#[serde(default = "default_resize_factor")]
8788
pub resize_factor: f64,

0 commit comments

Comments
 (0)