You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// index.jsimport{pipeline}from"@xenova/transformers";// Allocate a pipeline for sentiment-analysisconstpipe=awaitpipeline("sentiment-analysis");constout=awaitpipe("I love transformers!");console.log(out);
bun run index.js
What is the expected behavior?
> node index.js
No model specified. Using default model: "Xenova/distilbert-base-uncased-finetuned-sst-2-english".
[ { label: 'POSITIVE', score: 0.999788761138916 } ]
What do you see instead?
❯ bun run index.ts 06/12/2024 06:38:01 PM
No model specified. Using default model: "Xenova/distilbert-base-uncased-finetuned-sst-2-english".
22 | __classPrivateFieldSet(this, _OnnxruntimeSessionHandler_inferenceSession, new binding_1.binding.InferenceSession(), "f");
23 | if (typeof pathOrBuffer === 'string') {
24 | __classPrivateFieldGet(this, _OnnxruntimeSessionHandler_inferenceSession, "f").loadModel(pathOrBuffer, options);
25 | }
26 | else {
27 | __classPrivateFieldGet(this, _OnnxruntimeSessionHandler_inferenceSession, "f").loadModel(pathOrBuffer.buffer, pathOrBuffer.byteOffset, pathOrBuffer.byteLength, options);
^
error: Error
at new OnnxruntimeSessionHandler (/Users/me/Development/bun-transformers/node_modules/.deno/[email protected]/node_modules/onnxruntime-node/dist/backend.js:27:92)
at /Users/me/Development/bun-transformers/node_modules/.deno/[email protected]/node_modules/onnxruntime-node/dist/backend.js:64:29
Something went wrong during model construction (most likely a missing operation). Using `wasm` as a fallback.
[
{
label: "POSITIVE",
score: 0.999788761138916,
}
]
Additional information
When running via bun, the js process never terminates either
The text was updated successfully, but these errors were encountered:
What version of Bun is running?
1.1.13+bd6a60512
What platform is your computer?
Darwin 23.4.0 arm64 arm
What steps can reproduce the bug?
What is the expected behavior?
What do you see instead?
Additional information
When running via bun, the js process never terminates either
The text was updated successfully, but these errors were encountered: