Closed ghost closed 1 year ago
big question is why is ts-jest
testing internal functions within @tensorflow/tfjs
?!?!
and the function it complains about createTensorFromGPUData
is brand new and pretty much experimental, it does not have full support or test coverage.
sorry, nothing i can do about this.
in reality, ts-jest
scope should be limited - not to dig into pre-compiled ibraries - they are compiled for a reason.
Cant research further now but I did this:
-add the line import ts from "@tensorflow/ts-node" (didn't solve but I kept it)
- add vitest (didn't solve but I kept it)
- `npm rebuild` or remove `rm -rf node_modules` and reinstall and it runs the tests fine.
This was the error in vitest that directed me to the last step: https://stackoverflow.com/questions/28486891/uncaught-error-module-did-not-self-register
I asked here as well https://github.com/tensorflow/tfjs/issues/7285
Works fine now. Thanks for reaching back
strange, but seems like there was a partially corrupt installation of @tensorflow/tfjs-node
, glad you found it.
Issue Description
(asked in Tensorflow js as well, but it will take long to have any feedback.)
I wonder if anyone else fall into this problem, basically I can run the code with
ts-node
and also in the browser (I am doing a code that will run in both envs.)But when testing with ts-jest, I get this error (running the "test detectors" test):
Steps to Reproduce
I can not provide one, but I reduced the error to a single line, this line.
Expected Behavior
It just run the tests at least (not saying it is face-api fault !)
Environment
npm i @vladmandic/ace-api