tensorflow / tfjs

A WebGL accelerated JavaScript library for training and deploying ML models.
https://js.tensorflow.org
Apache License 2.0
18.35k stars 1.92k forks source link

op_list is missed #6581

Closed qipengwang closed 2 years ago

qipengwang commented 2 years ago

System information

Describe the problem

Provide the exact sequence of commands / steps that you executed before running into the problem

When I build tfjs-converter from source, I run yarn build successfully. Then I want to rollup tfjs-converter using yarn rollup -c --ci, and I get the following error. This error occurs because tfjs-converter/src/operations/op_list is missing

[!] (plugin typescript) Error: @rollup/plugin-typescript TS2307: Cannot find module './op_list/arithmetic'.
src/operations/operation_mapper.ts (24:29)

24 import * as arithmetic from './op_list/arithmetic';
                               ~~~~~~~~~~~~~~~~~~~~~~

Error: @rollup/plugin-typescript TS2307: Cannot find module './op_list/arithmetic'.
    at error (/home/wqp/tfjs_3.18.0/tfjs-converter/node_modules/rollup/dist/shared/rollup.js:10149:30)
    at throwPluginError (/home/wqp/tfjs_3.18.0/tfjs-converter/node_modules/rollup/dist/shared/rollup.js:16312:12)
    at Object.error (/home/wqp/tfjs_3.18.0/tfjs-converter/node_modules/rollup/dist/shared/rollup.js:17320:24)
    at Object.error (/home/wqp/tfjs_3.18.0/tfjs-converter/node_modules/rollup/dist/shared/rollup.js:16485:38)
    at /home/wqp/tfjs_3.18.0/tfjs-converter/node_modules/@rollup/plugin-typescript/dist/index.js:27:21
    at Array.forEach (<anonymous>)
    at emitDiagnostics (/home/wqp/tfjs_3.18.0/tfjs-converter/node_modules/@rollup/plugin-typescript/dist/index.js:22:10)
    at Object.transform (/home/wqp/tfjs_3.18.0/tfjs-converter/node_modules/@rollup/plugin-typescript/dist/index.js:465:17)
    at /home/wqp/tfjs_3.18.0/tfjs-converter/node_modules/rollup/dist/shared/rollup.js:17532:25

error Command failed with exit code 1.

I check the pervious version of tfjs and find that the op_list dir is removed since tfjs@3.10.0.

Any other info / logs Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.

mattsoulanille commented 2 years ago

Running yarn build is all that's necessary to build the JS part of tfjs-converter. The command will generate the op_list directory (in [repository root]/dist/bin/tfjs-converter/src/operations/op_list/), run Rollup, and produce a publishable npm package in [repository root dir]/dist/bin/tfjs-converter/tfjs-converter_pkg/. You can also build a .tar file with yarn bazel run //tfjs-converter:tfjs-converter_pkg.pack.

qipengwang commented 2 years ago

Thanks a lot for your reply

google-ml-butler[bot] commented 2 years ago

Are you satisfied with the resolution of your issue? Yes No