alibaba / pipcook

Machine learning platform for Web developers
https://alibaba.github.io/pipcook/
Apache License 2.0
2.55k stars 209 forks source link

pipcook run执行提示Cannot find module '@tensorflow/tfjs-node' #828

Closed ywager closed 3 years ago

ywager commented 3 years ago

env: ubuntu 16.0.4

pipcook --version 2.0.0

node -v v12.19.0

json:

{
  "specVersion": "2.0",
  "type": "ImageClassification",
  "datasource": "https://cdn.jsdelivr.net/gh/imgcook/pipcook-script@c1da85c/scripts/image-classification/build/datasource.js?url=http://ai-sample.oss-cn-hangzhou.aliyuncs.com/image_classification/datasets/imageclass-test.zip",
  "dataflow": [
    "https://cdn.jsdelivr.net/gh/imgcook/pipcook-script@c1da85c/scripts/image-classification/build/dataflow.js?size=224&size=224"
  ],
  "model": "https://cdn.jsdelivr.net/gh/imgcook/pipcook-script@c1da85c/scripts/image-classification/build/model.js",
  "options": {
    "framework": "mobilenet@1.0.0",
    "train": {
      "epochs": 10,
      "validationRequired": true
    }
  }
}

输出:

ℹ preparing framework ℹ preparing scripts ℹ preparing artifact plugins ℹ initializing framework packages ℹ running data source script Platform node has already been set. Overwriting the platform with [object Object]. downloading dataset ... unzip and collecting data... ℹ running data flow script Platform node has already been set. Overwriting the platform with [object Object]. ℹ running model script ✖ run pipeline error: Error: Cannot find module '@tensorflow/tfjs-node' Require stack:

FeelyChau commented 3 years ago

The script version c1da85c does not adapt to the currently released version, you should try:

$ npm install @pipcook/cli@beta -g

And run the pipeline again.

ywager commented 3 years ago

Thanks for such a quick answer, it has been resolved after changing to the @pipcook/cli@beta version.