{
  "id": 184025,
  "title": "Weird Issue on Kaggle",
  "url": "/competitions/osic-pulmonary-fibrosis-progression/discussion/184025",
  "author_name": "",
  "post_date": "2020-09-19T03:39:19.300853600Z",
  "votes": 1,
  "comment_count": 3,
  "views": 0,
  "content": "<p>I'm getting some kind of weird issue with this <a href=\"https://www.kaggle.com/ulrich07/osic-multiple-quantile-regression-starter/\" target=\"_blank\">kernel</a>. Tried of using the qloss of the <a href=\"https://www.kaggle.com/ulrich07/osic-multiple-quantile-regression-starter/\" target=\"_blank\">kernel</a> in my notebook it throwed me datatype error so I forked and re run the notebook (<a href=\"https://www.kaggle.com/aakashveera/osic-multiple-quantile-regression-starter\" target=\"_blank\">https://www.kaggle.com/aakashveera/osic-multiple-quantile-regression-starter</a>) it executed successfully with the same result. But whenever I used the same code on a new notebook (without copy and edit of this notebook) I am getting the same error again Check this out <a href=\"https://www.kaggle.com/aakashveera/osic-multiple-quantile-regression\" target=\"_blank\">https://www.kaggle.com/aakashveera/osic-multiple-quantile-regression</a>. Both the notebooks has same code only difference is one is forked and other is new notebook with same code. Please tell me wrong with it, it has nearly wasted my 6 hrs of time :(</p>",
  "messages": [
    {
      "id": "1016512",
      "postDate": "09/19/2020 03:39:19",
      "content": "<p>I'm getting some kind of weird issue with this <a href=\"https://www.kaggle.com/ulrich07/osic-multiple-quantile-regression-starter/\" target=\"_blank\">kernel</a>. Tried of using the qloss of the <a href=\"https://www.kaggle.com/ulrich07/osic-multiple-quantile-regression-starter/\" target=\"_blank\">kernel</a> in my notebook it throwed me datatype error so I forked and re run the notebook (<a href=\"https://www.kaggle.com/aakashveera/osic-multiple-quantile-regression-starter\" target=\"_blank\">https://www.kaggle.com/aakashveera/osic-multiple-quantile-regression-starter</a>) it executed successfully with the same result. But whenever I used the same code on a new notebook (without copy and edit of this notebook) I am getting the same error again Check this out <a href=\"https://www.kaggle.com/aakashveera/osic-multiple-quantile-regression\" target=\"_blank\">https://www.kaggle.com/aakashveera/osic-multiple-quantile-regression</a>. Both the notebooks has same code only difference is one is forked and other is new notebook with same code. Please tell me wrong with it, it has nearly wasted my 6 hrs of time :(</p>",
      "rawMarkdown": "I'm getting some kind of weird issue with this [kernel](https://www.kaggle.com/ulrich07/osic-multiple-quantile-regression-starter/). Tried of using the qloss of the [kernel](https://www.kaggle.com/ulrich07/osic-multiple-quantile-regression-starter/) in my notebook it throwed me datatype error so I forked and re run the notebook (https://www.kaggle.com/aakashveera/osic-multiple-quantile-regression-starter) it executed successfully with the same result. But whenever I used the same code on a new notebook (without copy and edit of this notebook) I am getting the same error again Check this out https://www.kaggle.com/aakashveera/osic-multiple-quantile-regression. Both the notebooks has same code only difference is one is forked and other is new notebook with same code. Please tell me wrong with it, it has nearly wasted my 6 hrs of time :(",
      "votes": null
    },
    {
      "id": "1018856",
      "postDate": "09/20/2020 03:38:52",
      "content": "<p>Expecting answers from Kaggle Team <a href=\"https://www.kaggle.com/juliaelliott\" target=\"_blank\">@juliaelliott</a> or from the kernel author <a href=\"https://www.kaggle.com/ulrich07\" target=\"_blank\">@ulrich07</a>. </p>",
      "rawMarkdown": "Expecting answers from Kaggle Team @juliaelliott or from the kernel author @ulrich07.",
      "votes": null
    },
    {
      "id": "1020368",
      "postDate": "09/21/2020 06:04:41",
      "content": "<p>When you fork a Kernel it automatically pins to original environment(docker Image version) when the notebook was created by the author . You can click on preferences in the right hand side and see that . What it means is there was a tensorflow version in July where the original Kernel worked without modification . </p>\n<p>When you create new kernel , it uses the new docker instances which has a different tensorflow version(i assume ) . Therefore it breaks . To overcome this , wherever you get error in any operation you need to cast the variable as float32</p>\n<p>e.g. </p>\n<pre><code>&lt;ipython-input-15-ce2703059811&gt;:21 qloss  *\n        e = y_true - y_pred\n</code></pre>\n<p>e = tf.dtypes.cast(y_true,tf.float32) - tf.dtypes.cast(y_pred,tf.float32)<br>\nthen for error in delta <br>\ndelta = tf.abs(tf.dtypes.cast(y_true[:, 0], tf.float32) - tf.dtypes.cast(fvc_pred, tf.float32))</p>\n<p>This error wont come in tensorflow 2.2</p>",
      "rawMarkdown": "When you fork a Kernel it automatically pins to original environment(docker Image version) when the notebook was created by the author . You can click on preferences in the right hand side and see that . What it means is there was a tensorflow version in July where the original Kernel worked without modification . \n\nWhen you create new kernel , it uses the new docker instances which has a different tensorflow version(i assume ) . Therefore it breaks . To overcome this , wherever you get error in any operation you need to cast the variable as float32\n\ne.g. \n```\n<ipython-input-15-ce2703059811>:21 qloss  *\n        e = y_true - y_pred\n```\ne = tf.dtypes.cast(y_true,tf.float32) - tf.dtypes.cast(y_pred,tf.float32)\nthen for error in delta \ndelta = tf.abs(tf.dtypes.cast(y_true[:, 0], tf.float32) - tf.dtypes.cast(fvc_pred, tf.float32))\n\nThis error wont come in tensorflow 2.2",
      "votes": null
    },
    {
      "id": "1020383",
      "postDate": "09/21/2020 06:14:57",
      "content": "<p>Thanks a lot <a href=\"https://www.kaggle.com/phoenix9032\" target=\"_blank\">@phoenix9032</a>!</p>",
      "rawMarkdown": "Thanks a lot @phoenix9032!",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1018856,
      "author_name": "aakashveera",
      "author_url": "",
      "post_date": "09/20/2020 03:38:52",
      "content": "<p>Expecting answers from Kaggle Team <a href=\"https://www.kaggle.com/juliaelliott\" target=\"_blank\">@juliaelliott</a> or from the kernel author <a href=\"https://www.kaggle.com/ulrich07\" target=\"_blank\">@ulrich07</a>. </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1020368,
      "author_name": "phoenix9032",
      "author_url": "",
      "post_date": "09/21/2020 06:04:41",
      "content": "<p>When you fork a Kernel it automatically pins to original environment(docker Image version) when the notebook was created by the author . You can click on preferences in the right hand side and see that . What it means is there was a tensorflow version in July where the original Kernel worked without modification . </p>\n<p>When you create new kernel , it uses the new docker instances which has a different tensorflow version(i assume ) . Therefore it breaks . To overcome this , wherever you get error in any operation you need to cast the variable as float32</p>\n<p>e.g. </p>\n<pre><code>&lt;ipython-input-15-ce2703059811&gt;:21 qloss  *\n        e = y_true - y_pred\n</code></pre>\n<p>e = tf.dtypes.cast(y_true,tf.float32) - tf.dtypes.cast(y_pred,tf.float32)<br>\nthen for error in delta <br>\ndelta = tf.abs(tf.dtypes.cast(y_true[:, 0], tf.float32) - tf.dtypes.cast(fvc_pred, tf.float32))</p>\n<p>This error wont come in tensorflow 2.2</p>",
      "votes": null,
      "replies": [
        {
          "id": 1020383,
          "author_name": "aakashveera",
          "author_url": "",
          "post_date": "09/21/2020 06:14:57",
          "content": "<p>Thanks a lot <a href=\"https://www.kaggle.com/phoenix9032\" target=\"_blank\">@phoenix9032</a>!</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1016512": "I'm getting some kind of weird issue with this [kernel](https://www.kaggle.com/ulrich07/osic-multiple-quantile-regression-starter/). Tried of using the qloss of the [kernel](https://www.kaggle.com/ulrich07/osic-multiple-quantile-regression-starter/) in my notebook it throwed me datatype error so I forked and re run the notebook (https://www.kaggle.com/aakashveera/osic-multiple-quantile-regression-starter) it executed successfully with the same result. But whenever I used the same code on a new notebook (without copy and edit of this notebook) I am getting the same error again Check this out https://www.kaggle.com/aakashveera/osic-multiple-quantile-regression. Both the notebooks has same code only difference is one is forked and other is new notebook with same code. Please tell me wrong with it, it has nearly wasted my 6 hrs of time :(",
    "1018856": "Expecting answers from Kaggle Team @juliaelliott or from the kernel author @ulrich07.",
    "1020368": "When you fork a Kernel it automatically pins to original environment(docker Image version) when the notebook was created by the author . You can click on preferences in the right hand side and see that . What it means is there was a tensorflow version in July where the original Kernel worked without modification . \n\nWhen you create new kernel , it uses the new docker instances which has a different tensorflow version(i assume ) . Therefore it breaks . To overcome this , wherever you get error in any operation you need to cast the variable as float32\n\ne.g. \n```\n<ipython-input-15-ce2703059811>:21 qloss  *\n        e = y_true - y_pred\n```\ne = tf.dtypes.cast(y_true,tf.float32) - tf.dtypes.cast(y_pred,tf.float32)\nthen for error in delta \ndelta = tf.abs(tf.dtypes.cast(y_true[:, 0], tf.float32) - tf.dtypes.cast(fvc_pred, tf.float32))\n\nThis error wont come in tensorflow 2.2",
    "1020383": "Thanks a lot @phoenix9032!"
  },
  "source": "meta"
}