anandanand84 / technicalindicators

A javascript technical indicators written in typescript with pattern recognition right in the browser
MIT License
2.15k stars 557 forks source link

Reliance on tensorflow problematic #157

Closed rd13 closed 5 years ago

rd13 commented 5 years ago

Tensor flow reliance is a complete nightmare when using in any environment with node or compiling with webpack for the browser.

Node:

Nodejs Environment detected 2018-11-22 11:42:26.099821: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.2 AVX AVX2 FMA (node:85351) UnhandledPromiseRejectionWarning: ReferenceError: tf is not defined

webpack:

[es] WARNING in ./node_modules/bindings/bindings.js 81:22-40 [es] Critical dependency: the request of a dependency is an expression [es] @ ./node_modules/@tensorflow/tfjs-node/dist/index.js [es] @ ./node_modules/technicalindicators/lib/patterndetection/patterndetection.js [es] @ ./node_modules/technicalindicators/lib/index.js

[es] WARNING in ./node_modules/bindings/bindings.js 81:43-53 [es] Critical dependency: the request of a dependency is an expression [es] @ ./node_modules/@tensorflow/tfjs-node/dist/index.js [es] @ ./node_modules/technicalindicators/lib/patterndetection/patterndetection.js [es] @ ./node_modules/technicalindicators/lib/index.js

slidenerd commented 5 years ago

yup please get rid of tensorflow ,I double @rd13 what happened to that other pattern detection code you had previously with thresholds, tensorflow is something everyone configures differently with different model parameters, one size fits all doesnt work well especially on pattern detection

hungryforcodes commented 5 years ago

Yeah, I get the same "ReferenceError: tf is not defined" on startup.

NB: Amazing package btw. Thanks so much for writing it! ;)

AranDekar commented 5 years ago

yes, I get this error which I think is related image

anandanand84 commented 5 years ago

It is fixed in technicalindicators@2.0.7. Please verify

hungryforcodes commented 5 years ago

Yes, the "tf is not defined" error has gone away. Thank you :)

bitcoinvsalts commented 5 years ago

i am still getting the error:

2019-04-13 13:13:07.368884: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.2 AVX AVX2 FMA

using 2.0.7