{
  "id": 113045,
  "title": "fastai v2 Starter Notebook",
  "url": "/competitions/ashrae-energy-prediction/discussion/113045",
  "author_name": "",
  "post_date": "2019-10-16T17:03:22.904530300Z",
  "votes": 2,
  "comment_count": 5,
  "views": 0,
  "content": "<p>Hey everyone (I had difficulties committing the notebook so I am posting this here and linking to my GitHub, let me know if this is not allowed!) I have a very <strong>very</strong> basic notebook detailing how to set yourself up for this competition using the new fastai 2.0 library. Hope this will help others who want to try to do the same :) <a href=\"https://github.com/muellerzr/fastai-Experiments-and-tips/blob/master/fastai_v2/nb_walkthroughs/tabular/ASHRAE-fastai-v2.ipynb\">here</a> is the notebook!</p>",
  "messages": [
    {
      "id": "650772",
      "postDate": "10/16/2019 17:03:22",
      "content": "<p>Hey everyone (I had difficulties committing the notebook so I am posting this here and linking to my GitHub, let me know if this is not allowed!) I have a very <strong>very</strong> basic notebook detailing how to set yourself up for this competition using the new fastai 2.0 library. Hope this will help others who want to try to do the same :) <a href=\"https://github.com/muellerzr/fastai-Experiments-and-tips/blob/master/fastai_v2/nb_walkthroughs/tabular/ASHRAE-fastai-v2.ipynb\">here</a> is the notebook!</p>",
      "rawMarkdown": "Hey everyone (I had difficulties committing the notebook so I am posting this here and linking to my GitHub, let me know if this is not allowed!) I have a very **very** basic notebook detailing how to set yourself up for this competition using the new fastai 2.0 library. Hope this will help others who want to try to do the same :) [here](https://github.com/muellerzr/fastai-Experiments-and-tips/blob/master/fastai_v2/nb_walkthroughs/tabular/ASHRAE-fastai-v2.ipynb) is the notebook!",
      "votes": null
    },
    {
      "id": "651242",
      "postDate": "10/17/2019 08:15:29",
      "content": "<p>Hi, thanks for the code - in this line:</p>\n\n<p><code>to = TabularPandas(train, procs, cat_vars, cont_vars, y_names=dep_var, splits=splits, is_y_cat=False)</code></p>\n\n<p>you need to add <code>is_y_cat=False</code> otherwise it will categorize <code>y_names</code>. </p>\n\n<p>At the beginning I've also done:</p>\n\n<p><code>train['meter_reading'] = np.log1p(train['meter_reading'])</code></p>\n\n<p>And while it trains now:\n- I've added <code>Cuda</code> here <code>procs = [Normalize, Categorify, FillMissing, Cuda]</code> but still it doesn't use Cuda.\n- When doing <code>.databunch()</code>  it casts targets to Longs, so precision is lost (this is relevant as Im doing log1p above)</p>",
      "rawMarkdown": "Hi, thanks for the code - in this line:\n\n`to = TabularPandas(train, procs, cat_vars, cont_vars, y_names=dep_var, splits=splits, is_y_cat=False)`\n\nyou need to add `is_y_cat=False` otherwise it will categorize `y_names`. \n\nAt the beginning I've also done:\n\n`train['meter_reading'] = np.log1p(train['meter_reading'])`\n\nAnd while it trains now:\n- I've added `Cuda` here `procs = [Normalize, Categorify, FillMissing, Cuda]` but still it doesn't use Cuda.\n- When doing `.databunch()`  it casts targets to Longs, so precision is lost (this is relevant as Im doing log1p above)",
      "votes": null
    },
    {
      "id": "651318",
      "postDate": "10/17/2019 10:22:56",
      "content": "<p>Hey Zachary, great to see you here. Thanks for the notebook.</p>",
      "rawMarkdown": "Hey Zachary, great to see you here. Thanks for the notebook.",
      "votes": null
    },
    {
      "id": "651443",
      "postDate": "10/17/2019 13:47:52",
      "content": "<p>Thank you Andres! That would explain everything :) </p>\n\n<p>I’ll look into those two issues you mentioned today and see what I can come up with </p>",
      "rawMarkdown": "Thank you Andres! That would explain everything :) \n\nI’ll look into those two issues you mentioned today and see what I can come up with",
      "votes": null
    },
    {
      "id": "651777",
      "postDate": "10/17/2019 23:20:15",
      "content": "<p>I've updated the notebook according to Andres' suggestions, it's working <a href=\"https://www.kaggle.com/muellerzr/fastai-v2-starter-code\">here</a></p>",
      "rawMarkdown": "I've updated the notebook according to Andres' suggestions, it's working [here](https://www.kaggle.com/muellerzr/fastai-v2-starter-code)",
      "votes": null
    },
    {
      "id": "651779",
      "postDate": "10/17/2019 23:23:08",
      "content": "<p>Cuda is not a tabular proc so it wouldn't apply here. I'm working to get RAPIDs working in Kaggle as that would be how to use Cuda. Fastai has it integrated just need to figure out how to install the library in a kernel</p>",
      "rawMarkdown": "Cuda is not a tabular proc so it wouldn't apply here. I'm working to get RAPIDs working in Kaggle as that would be how to use Cuda. Fastai has it integrated just need to figure out how to install the library in a kernel",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 651242,
      "author_name": "antorsae",
      "author_url": "",
      "post_date": "10/17/2019 08:15:29",
      "content": "<p>Hi, thanks for the code - in this line:</p>\n\n<p><code>to = TabularPandas(train, procs, cat_vars, cont_vars, y_names=dep_var, splits=splits, is_y_cat=False)</code></p>\n\n<p>you need to add <code>is_y_cat=False</code> otherwise it will categorize <code>y_names</code>. </p>\n\n<p>At the beginning I've also done:</p>\n\n<p><code>train['meter_reading'] = np.log1p(train['meter_reading'])</code></p>\n\n<p>And while it trains now:\n- I've added <code>Cuda</code> here <code>procs = [Normalize, Categorify, FillMissing, Cuda]</code> but still it doesn't use Cuda.\n- When doing <code>.databunch()</code>  it casts targets to Longs, so precision is lost (this is relevant as Im doing log1p above)</p>",
      "votes": null,
      "replies": [
        {
          "id": 651443,
          "author_name": "muellerzr",
          "author_url": "",
          "post_date": "10/17/2019 13:47:52",
          "content": "<p>Thank you Andres! That would explain everything :) </p>\n\n<p>I’ll look into those two issues you mentioned today and see what I can come up with </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 651779,
          "author_name": "muellerzr",
          "author_url": "",
          "post_date": "10/17/2019 23:23:08",
          "content": "<p>Cuda is not a tabular proc so it wouldn't apply here. I'm working to get RAPIDs working in Kaggle as that would be how to use Cuda. Fastai has it integrated just need to figure out how to install the library in a kernel</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 651318,
      "author_name": "abyaadrafid",
      "author_url": "",
      "post_date": "10/17/2019 10:22:56",
      "content": "<p>Hey Zachary, great to see you here. Thanks for the notebook.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 651777,
      "author_name": "muellerzr",
      "author_url": "",
      "post_date": "10/17/2019 23:20:15",
      "content": "<p>I've updated the notebook according to Andres' suggestions, it's working <a href=\"https://www.kaggle.com/muellerzr/fastai-v2-starter-code\">here</a></p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "650772": "Hey everyone (I had difficulties committing the notebook so I am posting this here and linking to my GitHub, let me know if this is not allowed!) I have a very **very** basic notebook detailing how to set yourself up for this competition using the new fastai 2.0 library. Hope this will help others who want to try to do the same :) [here](https://github.com/muellerzr/fastai-Experiments-and-tips/blob/master/fastai_v2/nb_walkthroughs/tabular/ASHRAE-fastai-v2.ipynb) is the notebook!",
    "651242": "Hi, thanks for the code - in this line:\n\n`to = TabularPandas(train, procs, cat_vars, cont_vars, y_names=dep_var, splits=splits, is_y_cat=False)`\n\nyou need to add `is_y_cat=False` otherwise it will categorize `y_names`. \n\nAt the beginning I've also done:\n\n`train['meter_reading'] = np.log1p(train['meter_reading'])`\n\nAnd while it trains now:\n- I've added `Cuda` here `procs = [Normalize, Categorify, FillMissing, Cuda]` but still it doesn't use Cuda.\n- When doing `.databunch()`  it casts targets to Longs, so precision is lost (this is relevant as Im doing log1p above)",
    "651318": "Hey Zachary, great to see you here. Thanks for the notebook.",
    "651443": "Thank you Andres! That would explain everything :) \n\nI’ll look into those two issues you mentioned today and see what I can come up with",
    "651777": "I've updated the notebook according to Andres' suggestions, it's working [here](https://www.kaggle.com/muellerzr/fastai-v2-starter-code)",
    "651779": "Cuda is not a tabular proc so it wouldn't apply here. I'm working to get RAPIDs working in Kaggle as that would be how to use Cuda. Fastai has it integrated just need to figure out how to install the library in a kernel"
  },
  "source": "meta"
}