{
  "id": 419429,
  "title": "Has anyone gotten TabNet inference working?",
  "url": "/competitions/predict-student-performance-from-game-play/discussion/419429",
  "author_name": "Robert Hatch",
  "post_date": "2023-06-25T22:23:11.673000",
  "votes": 1,
  "comment_count": 3,
  "views": 0,
  "content": "<p>I haven't spent any real time troubleshooting, but when I try to \"no internet\" + CPU env pip install a TabNet .whl I get a Torch version check error (TabNet is looking for Torch &lt;2.0, and only finding version 2.0.0).</p>\n<blockquote>\n  <p>ERROR: Could not find a version that satisfies the requirement torch&lt;2.0,&gt;=1.2 (from pytorch-tabnet) (from versions: none)<br>\n  ERROR: No matching distribution found for torch&lt;2.0,&gt;=1.2</p>\n</blockquote>\n<p>That's with latest kaggle notebooks env.</p>\n<p>Should I try cloning an older notebook and pinning to original env?<br>\nShould I try pip install an older version of pytorch?<br>\nOr any other suggestions?</p>",
  "messages": [
    {
      "id": 2321827,
      "postDate": "2023-06-28T23:55:23.403Z",
      "content": "<p>My comment maybe too late for this comp, but I have found cloning an old version of a notebook will work, though I'm not sure the old notebook will work for inference for this competition.</p>",
      "rawMarkdown": "My comment maybe too late for this comp, but I have found cloning an old version of a notebook will work, though I'm not sure the old notebook will work for inference for this competition.",
      "votes": 1
    },
    {
      "id": 2317703,
      "postDate": "2023-06-25T22:23:11.673Z",
      "content": "<p>I haven't spent any real time troubleshooting, but when I try to \"no internet\" + CPU env pip install a TabNet .whl I get a Torch version check error (TabNet is looking for Torch &lt;2.0, and only finding version 2.0.0).</p>\n<blockquote>\n  <p>ERROR: Could not find a version that satisfies the requirement torch&lt;2.0,&gt;=1.2 (from pytorch-tabnet) (from versions: none)<br>\n  ERROR: No matching distribution found for torch&lt;2.0,&gt;=1.2</p>\n</blockquote>\n<p>That's with latest kaggle notebooks env.</p>\n<p>Should I try cloning an older notebook and pinning to original env?<br>\nShould I try pip install an older version of pytorch?<br>\nOr any other suggestions?</p>",
      "rawMarkdown": "I haven't spent any real time troubleshooting, but when I try to \"no internet\" + CPU env pip install a TabNet .whl I get a Torch version check error (TabNet is looking for Torch <2.0, and only finding version 2.0.0).\n\n>ERROR: Could not find a version that satisfies the requirement torch<2.0,>=1.2 (from pytorch-tabnet) (from versions: none)\nERROR: No matching distribution found for torch<2.0,>=1.2\n\nThat's with latest kaggle notebooks env.\n\nShould I try cloning an older notebook and pinning to original env?\nShould I try pip install an older version of pytorch?\nOr any other suggestions?",
      "votes": 1
    },
    {
      "id": 2317965,
      "postDate": "2023-06-26T05:23:17.130Z",
      "content": "<p>Hi there, here is how I get it to working:</p>\n<ol>\n<li>download the code from their github as zip </li>\n</ol>\n<p><a href=\"https://github.com/dreamquark-ai/tabnet/archive/refs/heads/develop.zip\" target=\"_blank\">https://github.com/dreamquark-ai/tabnet/archive/refs/heads/develop.zip</a></p>\n<ol>\n<li><p>add this zip to your notebook dataset </p></li>\n<li><p>run following (your path could be slightly different)<br>\nsys.path.append(\"/kaggle/input/tabnet/tabnet-develop\")<br>\nfrom pytorch_tabnet.tab_model import TabNetClassifier</p></li>\n<li><p>then you could load your model and run inference </p></li>\n</ol>\n<p>I never tried training using kaggle's notebook. One small note is kaggle auto unpack .zip files while uploading. Yet, tabnet saves and reads .zip. While you could modify the code locally to load from a directory, you could also change the file suffix to .sip from .zip to prevent auto unpacking. </p>",
      "rawMarkdown": "Hi there, here is how I get it to working:\n\n0. download the code from their github as zip \n\nhttps://github.com/dreamquark-ai/tabnet/archive/refs/heads/develop.zip\n\n2. add this zip to your notebook dataset \n\n3. run following (your path could be slightly different)\nsys.path.append(\"/kaggle/input/tabnet/tabnet-develop\")\nfrom pytorch_tabnet.tab_model import TabNetClassifier\n\n4. then you could load your model and run inference \n\nI never tried training using kaggle's notebook. One small note is kaggle auto unpack .zip files while uploading. Yet, tabnet saves and reads .zip. While you could modify the code locally to load from a directory, you could also change the file suffix to .sip from .zip to prevent auto unpacking. ",
      "votes": 2
    },
    {
      "id": 2318549,
      "postDate": "2023-06-26T12:43:46.913Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 2321827,
      "author_name": "Chris Miles",
      "author_url": "",
      "post_date": "2023-06-28T23:55:23.403000",
      "content": "<p>My comment maybe too late for this comp, but I have found cloning an old version of a notebook will work, though I'm not sure the old notebook will work for inference for this competition.</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 2317965,
      "author_name": "Lowlowpear",
      "author_url": "",
      "post_date": "2023-06-26T05:23:17.130000",
      "content": "<p>Hi there, here is how I get it to working:</p>\n<ol>\n<li>download the code from their github as zip </li>\n</ol>\n<p><a href=\"https://github.com/dreamquark-ai/tabnet/archive/refs/heads/develop.zip\" target=\"_blank\">https://github.com/dreamquark-ai/tabnet/archive/refs/heads/develop.zip</a></p>\n<ol>\n<li><p>add this zip to your notebook dataset </p></li>\n<li><p>run following (your path could be slightly different)<br>\nsys.path.append(\"/kaggle/input/tabnet/tabnet-develop\")<br>\nfrom pytorch_tabnet.tab_model import TabNetClassifier</p></li>\n<li><p>then you could load your model and run inference </p></li>\n</ol>\n<p>I never tried training using kaggle's notebook. One small note is kaggle auto unpack .zip files while uploading. Yet, tabnet saves and reads .zip. While you could modify the code locally to load from a directory, you could also change the file suffix to .sip from .zip to prevent auto unpacking. </p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 2318549,
      "author_name": "",
      "author_url": "",
      "post_date": "2023-06-26T12:43:46.913000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2321827": "My comment maybe too late for this comp, but I have found cloning an old version of a notebook will work, though I'm not sure the old notebook will work for inference for this competition.",
    "2317703": "I haven't spent any real time troubleshooting, but when I try to \"no internet\" + CPU env pip install a TabNet .whl I get a Torch version check error (TabNet is looking for Torch <2.0, and only finding version 2.0.0).\n\n>ERROR: Could not find a version that satisfies the requirement torch<2.0,>=1.2 (from pytorch-tabnet) (from versions: none)\nERROR: No matching distribution found for torch<2.0,>=1.2\n\nThat's with latest kaggle notebooks env.\n\nShould I try cloning an older notebook and pinning to original env?\nShould I try pip install an older version of pytorch?\nOr any other suggestions?",
    "2317965": "Hi there, here is how I get it to working:\n\n0. download the code from their github as zip \n\nhttps://github.com/dreamquark-ai/tabnet/archive/refs/heads/develop.zip\n\n2. add this zip to your notebook dataset \n\n3. run following (your path could be slightly different)\nsys.path.append(\"/kaggle/input/tabnet/tabnet-develop\")\nfrom pytorch_tabnet.tab_model import TabNetClassifier\n\n4. then you could load your model and run inference \n\nI never tried training using kaggle's notebook. One small note is kaggle auto unpack .zip files while uploading. Yet, tabnet saves and reads .zip. While you could modify the code locally to load from a directory, you could also change the file suffix to .sip from .zip to prevent auto unpacking. ",
    "2318549": ""
  }
}