tensorflow / tfjs

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

TypeScript file not included in @tensorflow/tfjs-data #8150

Open come25136 opened 9 months ago

come25136 commented 9 months ago

Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template

System information

Describe the problem This issue is about tfjs-data.

The tfjs-data installed by running npm i @tensorflow/tfjs-node-gpu or npm i @tensorflow/tfjs-data does not include src. It is not included at the time of publication, as can be seen in the npm unpack code.

According to https://github.com/tensorflow/tfjs/issues/1339, the tfjs library should include src, and a pull request was sent out for tfjs-data as well. Is there any reason why it is not currently included? If it is a bug, I would like to see it included for the same reason as #1339.

Thanks for reading to the end.

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

  1. npm i @tensorflow/tfjs-node-gpu or npm i @tensorflow/tfjs-data
  2. Look inside View @tensorflow/tfjs-data in node_modules.

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.

gaikwadrahul8 commented 9 months ago

Hi, @come25136

I apologize for the delayed response and I see till @tensorflow/tfjs-data@3.9.0 does include src folder but after @tensorflow/tfjs-data@3.9.0 version does not include src folder so I need to check in our internal discussion there is any specific reason for removing src folder. It looks like we might have missed the src folder from @tensorflow/tfjs-data@3.10.0 version, if so then may be our relavant team will take decision for publishing src folder with @tensorflow/tfjs-data NPM package.

Thank you for bringing this issue to our attention and I really appreciate your efforts and valuable time. Thank you for your cooperation and patience.

mattsoulanille commented 9 months ago

The sources are not included in src/, but you should still be able to run node with --enable-source-maps to debug it with the original sources (the .js files in dist include the base64 encoded source file as the sourceMappingURL, so Node should still be able to display the original files). Is there a reason you need the original files separately? Thanks!

come25136 commented 9 months ago

Hi @mattsoulanille

I have created a minimal repository and tried it, but --enable-source-maps does not seem to work. Also, there are base64-encoded source maps in tf-data/dist/index.js and others, but not in tf-data/dist/tf-data.node.js and others.

Sorry if my tsconfig or other settings are wrong. It would be helpful if you could check the repository. https://github.com/come25136/tf-debug/tree/35756d7fe4f6d09b8c7f315f862c6211e317c905

Thanks.