Skip to content

Commit

Permalink
hotfix: throttle transformers.js embeddings provider
Browse files Browse the repository at this point in the history
  • Loading branch information
sestinj committed Oct 16, 2024
1 parent 4124c21 commit 7e5f8aa
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changes/extensions/vscode/0.8.54.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 0.8.54 - 2024-10-15
### Fixed
* Hotfix: throttle transformers.js embeddings provider
4 changes: 3 additions & 1 deletion core/indexing/embeddings/TransformersJsEmbeddingsProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class EmbeddingsPipeline {

export class TransformersJsEmbeddingsProvider extends BaseEmbeddingsProvider {
static providerName: EmbeddingsProviderName = "transformers.js";
static maxGroupSize: number = 4;
static maxGroupSize: number = 1;
static model: string = "all-MiniLM-L6-v2";
static mockVector: number[] = Array.from({ length: 384 }).fill(2) as number[];

Expand Down Expand Up @@ -79,6 +79,8 @@ export class TransformersJsEmbeddingsProvider extends BaseEmbeddingsProvider {
pooling: "mean",
normalize: true,
});
// To avoid causing the extension host to go unresponsive
await new Promise((resolve) => setTimeout(resolve, 10));
outputs.push(...output.tolist());
}
return outputs;
Expand Down
4 changes: 4 additions & 0 deletions extensions/vscode/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
and is generated by [Changie](https://github.com/miniscruff/changie).


## 0.8.54 - 2024-10-15
### Fixed
* Hotfix: throttle transformers.js embeddings provider

## 0.8.53 - 2024-10-11
### Added
* Improved loading/accept/reject UI for apply
Expand Down
2 changes: 1 addition & 1 deletion extensions/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "continue",
"icon": "media/icon.png",
"author": "Continue Dev, Inc",
"version": "0.8.53",
"version": "0.8.54",
"repository": {
"type": "git",
"url": "https://github.com/continuedev/continue"
Expand Down

0 comments on commit 7e5f8aa

Please sign in to comment.