From 3ca1773e1290caac4f01ba1b82d7baabc500df2e Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 17 Feb 2021 10:22:38 -0500 Subject: [PATCH] update tfjs to 3.1.0 --- human.service | 18 ++++++++++++++++++ package.json | 32 ++++++++++++++++---------------- src/human.ts | 2 ++ src/tfjs/tf-browser.ts | 20 ++++++++++---------- wiki | 2 +- 5 files changed, 47 insertions(+), 27 deletions(-) create mode 100644 human.service diff --git a/human.service b/human.service new file mode 100644 index 00000000..08399b5f --- /dev/null +++ b/human.service @@ -0,0 +1,18 @@ +[Unit] +Description=human +After=network.target network-online.target + +[Service] +Type=simple +Environment="NODE_ENV=production" +ExecStart=/home/vlado/.nvm/versions/node/v15.7.0/bin/node server/serve.js +WorkingDirectory=/home/vlado/dev/human +StandardOutput=inherit +StandardError=inherit +Restart=always +RestartSec=300 +User=vlado +StandardOutput=null + +[Install] +WantedBy=multi-user.target diff --git a/package.json b/package.json index 92fd7d41..3c73b6cd 100644 --- a/package.json +++ b/package.json @@ -22,23 +22,23 @@ "dependencies": {}, "peerDependencies": {}, "devDependencies": { - "@tensorflow/tfjs": "^3.0.0", - "@tensorflow/tfjs-backend-cpu": "^3.0.0", - "@tensorflow/tfjs-backend-wasm": "^3.0.0", - "@tensorflow/tfjs-backend-webgl": "^3.0.0", - "@tensorflow/tfjs-converter": "^3.0.0", - "@tensorflow/tfjs-core": "^3.0.0", - "@tensorflow/tfjs-data": "^3.0.0", - "@tensorflow/tfjs-layers": "^3.0.0", - "@tensorflow/tfjs-node": "^3.0.0", - "@tensorflow/tfjs-node-gpu": "^3.0.0", - "@types/node": "^14.14.27", - "@typescript-eslint/eslint-plugin": "^4.15.0", - "@typescript-eslint/parser": "^4.15.0", + "@tensorflow/tfjs": "^3.1.0", + "@tensorflow/tfjs-backend-cpu": "^3.1.0", + "@tensorflow/tfjs-backend-wasm": "^3.1.0", + "@tensorflow/tfjs-backend-webgl": "^3.1.0", + "@tensorflow/tfjs-converter": "^3.1.0", + "@tensorflow/tfjs-core": "^3.1.0", + "@tensorflow/tfjs-data": "^3.1.0", + "@tensorflow/tfjs-layers": "^3.1.0", + "@tensorflow/tfjs-node": "^3.1.0", + "@tensorflow/tfjs-node-gpu": "^3.1.0", + "@types/node": "^14.14.28", + "@typescript-eslint/eslint-plugin": "^4.15.1", + "@typescript-eslint/parser": "^4.15.1", "@vladmandic/pilogger": "^0.2.14", "chokidar": "^3.5.1", "dayjs": "^1.10.4", - "esbuild": "^0.8.45", + "esbuild": "^0.8.46", "eslint": "^7.20.0", "eslint-config-airbnb-base": "^14.2.1", "eslint-plugin-import": "^2.22.1", @@ -47,9 +47,9 @@ "eslint-plugin-promise": "^4.3.1", "rimraf": "^3.0.2", "seedrandom": "^3.0.5", - "simple-git": "^2.34.2", + "simple-git": "^2.35.0", "tslib": "^2.1.0", - "typescript": "^4.3.0-dev.20210213" + "typescript": "^4.3.0-dev.20210217" }, "scripts": { "start": "node --trace-warnings --unhandled-rejections=strict --trace-uncaught --no-deprecation src/node.js", diff --git a/src/human.ts b/src/human.ts index 12aa8094..5eb181f1 100644 --- a/src/human.ts +++ b/src/human.ts @@ -43,6 +43,7 @@ function mergeDeep(...objects) { class Human { tf: any; + package: any; version: string; config: any; fx: any; @@ -63,6 +64,7 @@ class Human { constructor(userConfig = {}) { this.tf = tf; + this.package = app; this.version = app.version; this.config = mergeDeep(config.default, userConfig); this.fx = null; diff --git a/src/tfjs/tf-browser.ts b/src/tfjs/tf-browser.ts index 668337cb..af1f5b1a 100644 --- a/src/tfjs/tf-browser.ts +++ b/src/tfjs/tf-browser.ts @@ -10,11 +10,11 @@ // { modules: 1064, moduleBytes: 3793219, outputBytes: 1535600 } // get versions of all packages. -import { version as tfjs } from '@tensorflow/tfjs/package.json'; -import { version as versionCore } from '@tensorflow/tfjs-core/package.json'; -import { version as versionData } from '@tensorflow/tfjs-data/package.json'; -import { version as versionLayers } from '@tensorflow/tfjs-layers/package.json'; -import { version as versionConverter } from '@tensorflow/tfjs-converter/package.json'; +import * as packageBundle from '@tensorflow/tfjs/package.json'; +import * as packageCore from '@tensorflow/tfjs-core/package.json'; +import * as packageData from '@tensorflow/tfjs-data/package.json'; +import * as packageLayers from '@tensorflow/tfjs-layers/package.json'; +import * as packageConverter from '@tensorflow/tfjs-converter/package.json'; // for backends, get version from source so it can register backend during import import { version_cpu } from '@tensorflow/tfjs-backend-cpu/dist/index.js'; import { version_webgl } from '@tensorflow/tfjs-backend-webgl/dist/index.js'; @@ -31,11 +31,11 @@ export * from '@tensorflow/tfjs-backend-wasm/dist/index.js'; // export versions export const version = { - tfjs, - 'tfjs-core': versionCore, - 'tfjs-data': versionData, - 'tfjs-layers': versionLayers, - 'tfjs-converter': versionConverter, + tfjs: packageBundle.version, + 'tfjs-core': packageCore.version, + 'tfjs-data': packageData.version, + 'tfjs-layers': packageLayers.version, + 'tfjs-converter': packageConverter.version, 'tfjs-backend-cpu': version_cpu, 'tfjs-backend-webgl': version_webgl, 'tfjs-backend-wasm': version_wasm, diff --git a/wiki b/wiki index 94e5f4cd..b7cfba49 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit 94e5f4cdd622f7de1580e8ef87b8d15d50af92df +Subproject commit b7cfba497d975a86b558a7eeb612ad453b21b5d3