Skip to content

Commit 11c5e92

Browse files
committed
fix tfjs dependency
1 parent 58f59b8 commit 11c5e92

File tree

9 files changed

+853
-9
lines changed

9 files changed

+853
-9
lines changed

docs/package-lock.json

Lines changed: 834 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/package.json

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,20 @@
66
},
77
"devDependencies": {
88
"markdown-it-mathjax3": "^4.3.2",
9-
"vitepress": "^1.6.4"
9+
"vitepress": "^1.6.4",
10+
"bidicalc-engine": "file:../engine",
11+
"@tensorflow/tfjs": "^4.22.0",
12+
"ts-pattern": "^5.9.0",
13+
"neverthrow": "^8.2.0",
14+
"not-so-float": "^2.7.0",
15+
"ohm-js": "^17.1.0"
1016
},
1117
"dependencies": {
1218
"bidicalc-engine": "file:../engine",
13-
"ts-pattern": "^5.9.0"
19+
"@tensorflow/tfjs": "^4.22.0",
20+
"ts-pattern": "^5.9.0",
21+
"neverthrow": "^8.2.0",
22+
"not-so-float": "^2.7.0",
23+
"ohm-js": "^17.1.0"
1424
}
1525
}

engine/cells/computeModel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
constructTfModel,
99
composeTfModel,
1010
} from "../dnsolver/semanticsTfModel.ts";
11-
import * as tf from "@tensorflow/tfjs-core";
11+
import * as tf from "@tensorflow/tfjs";
1212

1313
// NSF MODEL
1414
import * as nsf from "not-so-float";

engine/cells/tests/processUserInput.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { describe, it } from "node:test";
22
import assert from "node:assert";
33

44
import * as tf from "@tensorflow/tfjs";
5+
import "@tensorflow/tfjs-backend-cpu";
56

67
import { Lookup } from "../../dnsolver/semanticsTfModel.ts";
78
import { neverLookup, lookupError } from "../../dnsolver/semanticsTfModel.ts";

engine/dnsolver/externalFunctionsTfModel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as tf from "@tensorflow/tfjs-core";
1+
import * as tf from "@tensorflow/tfjs";
22

33
type TfFunc = (...args: tf.Tensor[]) => tf.Tensor;
44

engine/dnsolver/semanticsTfModel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
import { BidiError, SyntaxError, UnknownFunction, ArityError } from "../core/errors.ts";
88

99
import * as ohm from "ohm-js";
10-
import * as tf from "@tensorflow/tfjs-core";
10+
import * as tf from "@tensorflow/tfjs";
1111

1212
import { Result, ok, err } from "neverthrow";
1313

engine/dnsolver/tests/semanticsTfModel.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { describe, it } from "node:test";
22
import assert from "node:assert";
33

4-
import * as tf from "@tensorflow/tfjs-core";
4+
import * as tf from "@tensorflow/tfjs";
55
import "@tensorflow/tfjs-backend-cpu";
66

77
import { validGrammar } from "../../grammar/tests/grammarTestCases.ts";

engine/dnsolver/tests/tfModelCompose.test.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import { describe, it } from "node:test";
22
import assert from "node:assert";
33

4-
import * as tf from "@tensorflow/tfjs-core";
5-
import "@tensorflow/tfjs-backend-cpu";
6-
74
import {
85
constructTfModel,
96
TfModel,

engine/mainsolver/tests/mainSolverBackwards.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { describe, it } from "node:test";
22
import assert from "node:assert";
33

4+
import "@tensorflow/tfjs-backend-cpu";
5+
46
import {
57
expectSolve,
68
expectExactSolve,

0 commit comments

Comments
 (0)