{
  "id": 271381,
  "title": "CWT suddenly started giving me errors !",
  "url": "/competitions/g2net-gravitational-wave-detection/discussion/271381",
  "author_name": "",
  "post_date": "2021-09-10T07:58:34.064580700Z",
  "votes": 7,
  "comment_count": 11,
  "views": 0,
  "content": "<p>It has been working fine so far, but when I ran it just now, I got the error shown in the figure. If anyone has had a similar error or knows how to solve it, please help.</p>\n<blockquote>\n  <p>!pip install git+<a href=\"https://github.com//Kevin-McIsaac/cmorlet-tensorflow@Performance\" target=\"_blank\">https://github.com//Kevin-McIsaac/cmorlet-tensorflow@Performance</a> --no-deps &gt; /dev/null<br>\n  from CWT.cwt import ComplexMorletCWT<br>\n  fs = 2048<br>\n  lower_freq = 20<br>\n  upper_freq = 1024<br>\n  wavelet_width = 1<br>\n  n_scale = IMAGE_SIZE<br>\n  stride = int(4096/n_scale)</p>\n</blockquote>\n<pre><code>Running command git clone -q https://github.com//Kevin-McIsaac/cmorlet-tensorflow /tmp/pip-req-build-ddx9ww3t\n  Running command git checkout -b Performance --track origin/Performance\n  Switched to a new branch 'Performance'\n  Branch 'Performance' set up to track remote branch 'Performance' from 'origin'.\nWARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv\n---------------------------------------------------------------------------\nModuleNotFoundError                       Traceback (most recent call last)\n/tmp/ipykernel_43/3165632878.py in &lt;module&gt;\n      1 get_ipython().system('pip install git+https://github.com//Kevin-McIsaac/cmorlet-tensorflow@Performance --no-deps &gt; /dev/null')\n----&gt; 2 from CWT.cwt import ComplexMorletCWT\n      3 fs = 2048\n      4 lower_freq = 20\n      5 upper_freq = 1024\n\n/opt/conda/lib/python3.7/site-packages/CWT/cwt.py in &lt;module&gt;\n      7 import numpy as np\n      8 import tensorflow as tf\n----&gt; 9 from keras.layers import Layer\n     10 \n     11 class ContinuousWaveletTransform(Layer):\n\nModuleNotFoundError: No module named 'keras'\n</code></pre>",
  "messages": [
    {
      "id": "1508406",
      "postDate": "09/10/2021 07:58:34",
      "content": "<p>It has been working fine so far, but when I ran it just now, I got the error shown in the figure. If anyone has had a similar error or knows how to solve it, please help.</p>\n<blockquote>\n  <p>!pip install git+<a href=\"https://github.com//Kevin-McIsaac/cmorlet-tensorflow@Performance\" target=\"_blank\">https://github.com//Kevin-McIsaac/cmorlet-tensorflow@Performance</a> --no-deps &gt; /dev/null<br>\n  from CWT.cwt import ComplexMorletCWT<br>\n  fs = 2048<br>\n  lower_freq = 20<br>\n  upper_freq = 1024<br>\n  wavelet_width = 1<br>\n  n_scale = IMAGE_SIZE<br>\n  stride = int(4096/n_scale)</p>\n</blockquote>\n<pre><code>Running command git clone -q https://github.com//Kevin-McIsaac/cmorlet-tensorflow /tmp/pip-req-build-ddx9ww3t\n  Running command git checkout -b Performance --track origin/Performance\n  Switched to a new branch 'Performance'\n  Branch 'Performance' set up to track remote branch 'Performance' from 'origin'.\nWARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv\n---------------------------------------------------------------------------\nModuleNotFoundError                       Traceback (most recent call last)\n/tmp/ipykernel_43/3165632878.py in &lt;module&gt;\n      1 get_ipython().system('pip install git+https://github.com//Kevin-McIsaac/cmorlet-tensorflow@Performance --no-deps &gt; /dev/null')\n----&gt; 2 from CWT.cwt import ComplexMorletCWT\n      3 fs = 2048\n      4 lower_freq = 20\n      5 upper_freq = 1024\n\n/opt/conda/lib/python3.7/site-packages/CWT/cwt.py in &lt;module&gt;\n      7 import numpy as np\n      8 import tensorflow as tf\n----&gt; 9 from keras.layers import Layer\n     10 \n     11 class ContinuousWaveletTransform(Layer):\n\nModuleNotFoundError: No module named 'keras'\n</code></pre>",
      "rawMarkdown": "It has been working fine so far, but when I ran it just now, I got the error shown in the figure. If anyone has had a similar error or knows how to solve it, please help.\n\n> !pip install git+https://github.com//Kevin-McIsaac/cmorlet-tensorflow@Performance --no-deps > /dev/null\nfrom CWT.cwt import ComplexMorletCWT\nfs = 2048\nlower_freq = 20\nupper_freq = 1024\nwavelet_width = 1\nn_scale = IMAGE_SIZE\nstride = int(4096/n_scale)\n\n\n```\nRunning command git clone -q https://github.com//Kevin-McIsaac/cmorlet-tensorflow /tmp/pip-req-build-ddx9ww3t\n  Running command git checkout -b Performance --track origin/Performance\n  Switched to a new branch 'Performance'\n  Branch 'Performance' set up to track remote branch 'Performance' from 'origin'.\nWARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv\n---------------------------------------------------------------------------\nModuleNotFoundError                       Traceback (most recent call last)\n/tmp/ipykernel_43/3165632878.py in <module>\n      1 get_ipython().system('pip install git+https://github.com//Kevin-McIsaac/cmorlet-tensorflow@Performance --no-deps > /dev/null')\n----> 2 from CWT.cwt import ComplexMorletCWT\n      3 fs = 2048\n      4 lower_freq = 20\n      5 upper_freq = 1024\n\n/opt/conda/lib/python3.7/site-packages/CWT/cwt.py in <module>\n      7 import numpy as np\n      8 import tensorflow as tf\n----> 9 from keras.layers import Layer\n     10 \n     11 class ContinuousWaveletTransform(Layer):\n\nModuleNotFoundError: No module named 'keras'\n\n```",
      "votes": null
    },
    {
      "id": "1508414",
      "postDate": "09/10/2021 08:02:39",
      "content": "<p>I think it changed.. use tensorflow.keras.layers</p>",
      "rawMarkdown": "I think it changed.. use tensorflow.keras.layers",
      "votes": null
    },
    {
      "id": "1508422",
      "postDate": "09/10/2021 08:07:41",
      "content": "<p>I would like to do so if it is a description on my code.<br>\nHow do I change the library if I installed it from git?</p>",
      "rawMarkdown": "I would like to do so if it is a description on my code.\nHow do I change the library if I installed it from git?",
      "votes": null
    },
    {
      "id": "1508430",
      "postDate": "09/10/2021 08:19:40",
      "content": "<p>this is also happening to me any body know why ?</p>",
      "rawMarkdown": "this is also happening to me any body know why ?",
      "votes": null
    },
    {
      "id": "1508483",
      "postDate": "09/10/2021 09:16:30",
      "content": "<p>I just checked the code.. it's updated in the repo.. so you can clone the repo or just copy-paste the code into your notebook.</p>",
      "rawMarkdown": "I just checked the code.. it's updated in the repo.. so you can clone the repo or just copy-paste the code into your notebook.",
      "votes": null
    },
    {
      "id": "1508505",
      "postDate": "09/10/2021 09:48:39",
      "content": "<p>ig Kaggle has updated their environment I have asked about it on <a href=\"https://www.kaggle.com/product-feedback/271362\" target=\"_blank\">discussion</a> but so far they haven't replied back. I have found a workaround for now just use <code>!pip install keras=='2.4.0'</code> before importing cwt</p>",
      "rawMarkdown": "ig Kaggle has updated their environment I have asked about it on [discussion](https://www.kaggle.com/product-feedback/271362) but so far they haven't replied back. I have found a workaround for now just use `!pip install keras=='2.4.0'` before importing cwt",
      "votes": null
    },
    {
      "id": "1508643",
      "postDate": "09/10/2021 12:11:04",
      "content": "<p>yes I faced the same, copy paste the CWT code to your nb and change to  <code>from tensorflow.keras.layers</code> as said below</p>",
      "rawMarkdown": "yes I faced the same, copy paste the CWT code to your nb and change to  `from tensorflow.keras.layers` as said below",
      "votes": null
    },
    {
      "id": "1508675",
      "postDate": "09/10/2021 12:57:02",
      "content": "<p>Is it a new notebook, a clone of an existing notebook that ran fine, or an old notebook that used to work fine?</p>\n<p>Reason I ask is that in the past, if you cloned a notebook you kept its docker image.  And docker image would not be changed once you created a notebook.  Therefore the only case where a new docker image could break code was when you create a new notebook from scratch.  I'd like to know if this has changed or not.</p>",
      "rawMarkdown": "Is it a new notebook, a clone of an existing notebook that ran fine, or an old notebook that used to work fine?\n\nReason I ask is that in the past, if you cloned a notebook you kept its docker image.  And docker image would not be changed once you created a notebook.  Therefore the only case where a new docker image could break code was when you create a new notebook from scratch.  I'd like to know if this has changed or not.",
      "votes": null
    },
    {
      "id": "1508687",
      "postDate": "09/10/2021 13:13:48",
      "content": "<p>for me, it was a clone of an existing notebook<br>\nEDIT:- cloning an existing notebook that uses CPU/GPU is working fine</p>",
      "rawMarkdown": "for me, it was a clone of an existing notebook\nEDIT:- cloning an existing notebook that uses CPU/GPU is working fine",
      "votes": null
    },
    {
      "id": "1509069",
      "postDate": "09/10/2021 19:36:02",
      "content": "<p>tx, this is definitely a change (and a regression if you ask me).</p>",
      "rawMarkdown": "tx, this is definitely a change (and a regression if you ask me).",
      "votes": null
    },
    {
      "id": "1510942",
      "postDate": "09/12/2021 23:40:21",
      "content": "<p>Thank you. Your advice has helped me to implement it!</p>",
      "rawMarkdown": "Thank you. Your advice has helped me to implement it!",
      "votes": null
    },
    {
      "id": "1559706",
      "postDate": "10/27/2021 07:08:15",
      "content": "<p>Hey All,</p>\n<p>Thank you all for taking part in our competition. The participation has been overwhelmingly positive. We are currently conducting a survey to gauge the demographic and outreach achieved. Kindly spare 2min and fill in this survey <a href=\"https://forms.gle/QP9L16niPexozyhu5\" target=\"_blank\">https://forms.gle/QP9L16niPexozyhu5</a>.</p>\n<p>Thank you all,</p>\n<p>Regards,<br>\nChris</p>",
      "rawMarkdown": "Hey All,\n\nThank you all for taking part in our competition. The participation has been overwhelmingly positive. We are currently conducting a survey to gauge the demographic and outreach achieved. Kindly spare 2min and fill in this survey https://forms.gle/QP9L16niPexozyhu5.\n\nThank you all,\n\nRegards,\nChris",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1508414,
      "author_name": "hannes82",
      "author_url": "",
      "post_date": "09/10/2021 08:02:39",
      "content": "<p>I think it changed.. use tensorflow.keras.layers</p>",
      "votes": null,
      "replies": [
        {
          "id": 1508422,
          "author_name": "ajipandas",
          "author_url": "",
          "post_date": "09/10/2021 08:07:41",
          "content": "<p>I would like to do so if it is a description on my code.<br>\nHow do I change the library if I installed it from git?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1508483,
          "author_name": "hannes82",
          "author_url": "",
          "post_date": "09/10/2021 09:16:30",
          "content": "<p>I just checked the code.. it's updated in the repo.. so you can clone the repo or just copy-paste the code into your notebook.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1508430,
      "author_name": "mithilsalunkhe",
      "author_url": "",
      "post_date": "09/10/2021 08:19:40",
      "content": "<p>this is also happening to me any body know why ?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1508505,
      "author_name": "mrigendraagrawal",
      "author_url": "",
      "post_date": "09/10/2021 09:48:39",
      "content": "<p>ig Kaggle has updated their environment I have asked about it on <a href=\"https://www.kaggle.com/product-feedback/271362\" target=\"_blank\">discussion</a> but so far they haven't replied back. I have found a workaround for now just use <code>!pip install keras=='2.4.0'</code> before importing cwt</p>",
      "votes": null,
      "replies": [
        {
          "id": 1510942,
          "author_name": "ajipandas",
          "author_url": "",
          "post_date": "09/12/2021 23:40:21",
          "content": "<p>Thank you. Your advice has helped me to implement it!</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1508643,
      "author_name": "imeintanis",
      "author_url": "",
      "post_date": "09/10/2021 12:11:04",
      "content": "<p>yes I faced the same, copy paste the CWT code to your nb and change to  <code>from tensorflow.keras.layers</code> as said below</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1508675,
      "author_name": "cpmpml",
      "author_url": "",
      "post_date": "09/10/2021 12:57:02",
      "content": "<p>Is it a new notebook, a clone of an existing notebook that ran fine, or an old notebook that used to work fine?</p>\n<p>Reason I ask is that in the past, if you cloned a notebook you kept its docker image.  And docker image would not be changed once you created a notebook.  Therefore the only case where a new docker image could break code was when you create a new notebook from scratch.  I'd like to know if this has changed or not.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1508687,
          "author_name": "mrigendraagrawal",
          "author_url": "",
          "post_date": "09/10/2021 13:13:48",
          "content": "<p>for me, it was a clone of an existing notebook<br>\nEDIT:- cloning an existing notebook that uses CPU/GPU is working fine</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1509069,
          "author_name": "cpmpml",
          "author_url": "",
          "post_date": "09/10/2021 19:36:02",
          "content": "<p>tx, this is definitely a change (and a regression if you ask me).</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1559706,
      "author_name": "zerafachris",
      "author_url": "",
      "post_date": "10/27/2021 07:08:15",
      "content": "<p>Hey All,</p>\n<p>Thank you all for taking part in our competition. The participation has been overwhelmingly positive. We are currently conducting a survey to gauge the demographic and outreach achieved. Kindly spare 2min and fill in this survey <a href=\"https://forms.gle/QP9L16niPexozyhu5\" target=\"_blank\">https://forms.gle/QP9L16niPexozyhu5</a>.</p>\n<p>Thank you all,</p>\n<p>Regards,<br>\nChris</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1508406": "It has been working fine so far, but when I ran it just now, I got the error shown in the figure. If anyone has had a similar error or knows how to solve it, please help.\n\n> !pip install git+https://github.com//Kevin-McIsaac/cmorlet-tensorflow@Performance --no-deps > /dev/null\nfrom CWT.cwt import ComplexMorletCWT\nfs = 2048\nlower_freq = 20\nupper_freq = 1024\nwavelet_width = 1\nn_scale = IMAGE_SIZE\nstride = int(4096/n_scale)\n\n\n```\nRunning command git clone -q https://github.com//Kevin-McIsaac/cmorlet-tensorflow /tmp/pip-req-build-ddx9ww3t\n  Running command git checkout -b Performance --track origin/Performance\n  Switched to a new branch 'Performance'\n  Branch 'Performance' set up to track remote branch 'Performance' from 'origin'.\nWARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv\n---------------------------------------------------------------------------\nModuleNotFoundError                       Traceback (most recent call last)\n/tmp/ipykernel_43/3165632878.py in <module>\n      1 get_ipython().system('pip install git+https://github.com//Kevin-McIsaac/cmorlet-tensorflow@Performance --no-deps > /dev/null')\n----> 2 from CWT.cwt import ComplexMorletCWT\n      3 fs = 2048\n      4 lower_freq = 20\n      5 upper_freq = 1024\n\n/opt/conda/lib/python3.7/site-packages/CWT/cwt.py in <module>\n      7 import numpy as np\n      8 import tensorflow as tf\n----> 9 from keras.layers import Layer\n     10 \n     11 class ContinuousWaveletTransform(Layer):\n\nModuleNotFoundError: No module named 'keras'\n\n```",
    "1508414": "I think it changed.. use tensorflow.keras.layers",
    "1508422": "I would like to do so if it is a description on my code.\nHow do I change the library if I installed it from git?",
    "1508430": "this is also happening to me any body know why ?",
    "1508483": "I just checked the code.. it's updated in the repo.. so you can clone the repo or just copy-paste the code into your notebook.",
    "1508505": "ig Kaggle has updated their environment I have asked about it on [discussion](https://www.kaggle.com/product-feedback/271362) but so far they haven't replied back. I have found a workaround for now just use `!pip install keras=='2.4.0'` before importing cwt",
    "1508643": "yes I faced the same, copy paste the CWT code to your nb and change to  `from tensorflow.keras.layers` as said below",
    "1508675": "Is it a new notebook, a clone of an existing notebook that ran fine, or an old notebook that used to work fine?\n\nReason I ask is that in the past, if you cloned a notebook you kept its docker image.  And docker image would not be changed once you created a notebook.  Therefore the only case where a new docker image could break code was when you create a new notebook from scratch.  I'd like to know if this has changed or not.",
    "1508687": "for me, it was a clone of an existing notebook\nEDIT:- cloning an existing notebook that uses CPU/GPU is working fine",
    "1509069": "tx, this is definitely a change (and a regression if you ask me).",
    "1510942": "Thank you. Your advice has helped me to implement it!",
    "1559706": "Hey All,\n\nThank you all for taking part in our competition. The participation has been overwhelmingly positive. We are currently conducting a survey to gauge the demographic and outreach achieved. Kindly spare 2min and fill in this survey https://forms.gle/QP9L16niPexozyhu5.\n\nThank you all,\n\nRegards,\nChris"
  },
  "source": "meta"
}