From 25b971c0333ee90504a89489d70096cef318b9b1 Mon Sep 17 00:00:00 2001 From: Na Li Date: Wed, 25 Mar 2020 15:11:37 -0700 Subject: [PATCH 1/5] Fix release.ts --- scripts/release.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/release.ts b/scripts/release.ts index 9857dbeed3f..23281aab081 100644 --- a/scripts/release.ts +++ b/scripts/release.ts @@ -164,7 +164,7 @@ async function main() { } pkg = `${pkg}`.replace( - `"version": "${parsedPkg.version}"`, `"version": "${newVersion}"`); + `"version": "0.0.0"`, `"version": "${newVersion}"`); if (deps != null) { for (let j = 0; j < deps.length; j++) { From 975e861ffa1129ca02101d4d0b72f8bc4e60bac8 Mon Sep 17 00:00:00 2001 From: Na Li Date: Wed, 25 Mar 2020 15:20:52 -0700 Subject: [PATCH 2/5] Fix release.ts --- scripts/release.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/release.ts b/scripts/release.ts index 23281aab081..9857dbeed3f 100644 --- a/scripts/release.ts +++ b/scripts/release.ts @@ -164,7 +164,7 @@ async function main() { } pkg = `${pkg}`.replace( - `"version": "0.0.0"`, `"version": "${newVersion}"`); + `"version": "${parsedPkg.version}"`, `"version": "${newVersion}"`); if (deps != null) { for (let j = 0; j < deps.length; j++) { From 618f0c9397a15108ed7412c91e865a4832397ca4 Mon Sep 17 00:00:00 2001 From: Na Li Date: Fri, 27 Mar 2020 12:51:51 -0700 Subject: [PATCH 3/5] Fix release.ts --- scripts/release-util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/release-util.ts b/scripts/release-util.ts index dd607ed207f..6ff9db55ccb 100755 --- a/scripts/release-util.ts +++ b/scripts/release-util.ts @@ -48,7 +48,7 @@ export const UNION_PHASE: Phase = { export const NODE_PHASE: Phase = { packages: ['tfjs-node', 'tfjs-node-gpu'], - deps: ['tfjs', 'tfjs-core'], + deps: ['tfjs', 'tfjs-core', 'tfjs-layers'], scripts: {'tfjs-node-gpu': {'before-yarn': ['yarn prep-gpu']}} }; From 1fa00eedd43eadff47e975368618fa73ac6d2adf Mon Sep 17 00:00:00 2001 From: Na Li Date: Fri, 27 Mar 2020 13:52:06 -0700 Subject: [PATCH 4/5] Fix publish script for node-gpu. --- scripts/publish-npm.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/publish-npm.ts b/scripts/publish-npm.ts index 390eb58466b..c98828d93bd 100755 --- a/scripts/publish-npm.ts +++ b/scripts/publish-npm.ts @@ -112,6 +112,11 @@ async function main() { console.log(chalk.magenta.bold(`~~~ Preparing package ${pkg}~~~`)); console.log(chalk.magenta('~~~ Installing packages ~~~')); + // tfjs-node-gpu needs to get some files from tfjs-node. + if (pkg === "tfjs-node-gpu") { + $('yarn prep-gpu'); + } + // Yarn above the other checks to make sure yarn doesn't change the lock file. $('yarn'); From cfa16e4b96d3a71298deb3638e076d5e364f9aed Mon Sep 17 00:00:00 2001 From: Na Li Date: Mon, 30 Mar 2020 09:40:21 -0700 Subject: [PATCH 5/5] Add comment for dep. --- scripts/release-util.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/release-util.ts b/scripts/release-util.ts index 6ff9db55ccb..893fffff5fd 100755 --- a/scripts/release-util.ts +++ b/scripts/release-util.ts @@ -46,6 +46,9 @@ export const UNION_PHASE: Phase = { deps: ['tfjs-core', 'tfjs-layers', 'tfjs-converter', 'tfjs-data'] }; +// We added tfjs-core and tfjs-layers because Node has unit tests that directly +// use tf.core and tf.layers to test serialization of models. Consider moving +// the test to tf.layers. export const NODE_PHASE: Phase = { packages: ['tfjs-node', 'tfjs-node-gpu'], deps: ['tfjs', 'tfjs-core', 'tfjs-layers'],