Skip to content

Commit 22fa4c7

Browse files
committed
fix tfjs dependency
1 parent 58f59b8 commit 22fa4c7

File tree

9 files changed

+838
-10
lines changed

9 files changed

+838
-10
lines changed

docs/package-lock.json

Lines changed: 824 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,15 @@
66
},
77
"devDependencies": {
88
"markdown-it-mathjax3": "^4.3.2",
9-
"vitepress": "^1.6.4"
9+
"vitepress": "^1.6.4",
10+
"@tensorflow/tfjs": "^4.22.0"
1011
},
1112
"dependencies": {
1213
"bidicalc-engine": "file:../engine",
13-
"ts-pattern": "^5.9.0"
14+
"@tensorflow/tfjs": "^4.22.0",
15+
"ts-pattern": "^5.9.0",
16+
"neverthrow": "^8.2.0",
17+
"not-so-float": "^2.7.0",
18+
"ohm-js": "^17.1.0"
1419
}
1520
}

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)