anandanand84 / technicalindicators

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

Pattern Detection Bug: Error: Unknown feature DEPRECATION_WARNINGS_ENABLED. #189

Closed josuearrieta closed 4 years ago

josuearrieta commented 5 years ago

I'm trying to run a pattern detection code:

    const prices = [];
    for (let i = 0; i < 1000; i += 1) {
      prices.push(i);
    }

    const isTrendingUp = require(`technicalindicators`).isTrendingUp;
    const result = await isTrendingUp({ values: prices });
    console.log(result);

Getting the following error:

Nodejs Environment detected 
cpu backend was already registered. Reusing existing backend
2019-07-24 21:47:37.271092: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX FMA

Error: Unknown feature DEPRECATION_WARNINGS_ENABLED.
      at Environment.evaluateFeature (node_modules/@tensorflow/tfjs-core/src/environment.ts:367:11)
      at Environment.get (node_modules/@tensorflow/tfjs-core/src/environment.ts:271:35)
      at deprecationWarn (node_modules/@tensorflow/tfjs-node/node_modules/@tensorflow/tfjs-core/src/environment.ts:503:11)
      at Tensor.get (node_modules/@tensorflow/tfjs-node/node_modules/@tensorflow/tfjs-core/src/tensor.ts:555:5)
      at /home/bloed/github/channel/node_modules/technicalindicators/lib/patterndetection/patterndetection.js:116:42
      at Generator.next (<anonymous>)
      at fulfilled (node_modules/technicalindicators/lib/patterndetection/patterndetection.js:3:58)

Node Version: v10.16.0 Ubuntu 16.01 technicalindicators Version: 2.0.9

newsum commented 5 years ago

+1

josuearrieta commented 5 years ago

Update: Downgraded to technicalindicators Version: 2.0.8, and worked. I think the issue was introduced because of https://github.com/anandanand84/technicalindicators/pull/182 ?

anandanand84 commented 4 years ago

Tensorflow removed in 3.0