{
  "id": 198738,
  "title": "Using Git repositories without internet",
  "url": "/competitions/cassava-leaf-disease-classification/discussion/198738",
  "author_name": "DimitreOliveira",
  "post_date": "2020-11-22T20:09:43.106000",
  "votes": 33,
  "comment_count": 17,
  "views": 0,
  "content": "<p>Since in this competition, we need to make the inference part without using the internet, we are not able to install packages using the usual <code>pip</code> command like:</p>\n<p>To install <a href=\"https://github.com/qubvel/efficientnet\" target=\"_blank\">EfficientNet</a> package:<br>\n<code>!pip install --quiet efficientnet</code></p>\n<p>But we can still install packages like <code>EfficientNet</code> using the dataset feature from Kaggle you can see a working example at this <a href=\"https://www.kaggle.com/dimitreoliveira/cassava-leaf-disease-tpu-tensorflow-inference\" target=\"_blank\">inference notebook</a>.</p>\n<h4>Steps:</h4>\n<ol>\n<li>Create a dataset from the GitGub repository, I have created the two that you will need to use <code>EfficientNet</code><ul>\n<li><a href=\"https://www.kaggle.com/dimitreoliveira/kerasapplications\" target=\"_blank\">keras-applications</a> package.</li>\n<li><a href=\"https://www.kaggle.com/dimitreoliveira/efficientnet-git\" target=\"_blank\">efficientNet</a> package.</li></ul></li>\n<li>Install the package using <code>pip</code> with <code>!pip install --quiet path_to_package</code><ul>\n<li>Example: <code>!pip install --quiet /kaggle/input/efficientnet-git</code></li></ul></li>\n<li>Import the package<ul>\n<li>Example <code>import efficientnet.tfkeras as efn</code></li></ul></li>\n</ol>",
  "messages": [
    {
      "id": 1087527,
      "postDate": "2020-11-22T20:09:43.107Z",
      "content": "<p>Since in this competition, we need to make the inference part without using the internet, we are not able to install packages using the usual <code>pip</code> command like:</p>\n<p>To install <a href=\"https://github.com/qubvel/efficientnet\" target=\"_blank\">EfficientNet</a> package:<br>\n<code>!pip install --quiet efficientnet</code></p>\n<p>But we can still install packages like <code>EfficientNet</code> using the dataset feature from Kaggle you can see a working example at this <a href=\"https://www.kaggle.com/dimitreoliveira/cassava-leaf-disease-tpu-tensorflow-inference\" target=\"_blank\">inference notebook</a>.</p>\n<h4>Steps:</h4>\n<ol>\n<li>Create a dataset from the GitGub repository, I have created the two that you will need to use <code>EfficientNet</code><ul>\n<li><a href=\"https://www.kaggle.com/dimitreoliveira/kerasapplications\" target=\"_blank\">keras-applications</a> package.</li>\n<li><a href=\"https://www.kaggle.com/dimitreoliveira/efficientnet-git\" target=\"_blank\">efficientNet</a> package.</li></ul></li>\n<li>Install the package using <code>pip</code> with <code>!pip install --quiet path_to_package</code><ul>\n<li>Example: <code>!pip install --quiet /kaggle/input/efficientnet-git</code></li></ul></li>\n<li>Import the package<ul>\n<li>Example <code>import efficientnet.tfkeras as efn</code></li></ul></li>\n</ol>",
      "rawMarkdown": "Since in this competition, we need to make the inference part without using the internet, we are not able to install packages using the usual `pip` command like:\n\nTo install [EfficientNet](https://github.com/qubvel/efficientnet) package:\n`!pip install --quiet efficientnet`\n\nBut we can still install packages like `EfficientNet` using the dataset feature from Kaggle you can see a working example at this [inference notebook](https://www.kaggle.com/dimitreoliveira/cassava-leaf-disease-tpu-tensorflow-inference).\n\n#### Steps:\n1. Create a dataset from the GitGub repository, I have created the two that you will need to use `EfficientNet`\n  - [keras-applications](https://www.kaggle.com/dimitreoliveira/kerasapplications) package.\n  - [efficientNet](https://www.kaggle.com/dimitreoliveira/efficientnet-git) package.\n2. Install the package using `pip` with `!pip install --quiet path_to_package`\n  - Example: `!pip install --quiet /kaggle/input/efficientnet-git`\n3. Import the package\n  - Example `import efficientnet.tfkeras as efn`",
      "votes": 33
    },
    {
      "id": 1121497,
      "postDate": "2020-12-21T17:41:13.220Z",
      "content": "<p>Very rare and helpful notebook, learn new things, thanks for sharing😃.</p>",
      "rawMarkdown": "Very rare and helpful notebook, learn new things, thanks for sharing😃.",
      "votes": 1
    },
    {
      "id": 1119244,
      "postDate": "2020-12-19T20:53:56.160Z",
      "content": "<p>Great, didn't know that!</p>",
      "rawMarkdown": "Great, didn't know that!",
      "votes": 1
    },
    {
      "id": 1111332,
      "postDate": "2020-12-13T16:25:33.770Z",
      "content": "<p>Somehow not working for me. Gives me error:<br>\nERROR: No matching distribution found for keras_applications=1.0.7 (from efficientnet==1.1.1)<br>\nAny ideas why?</p>",
      "rawMarkdown": "Somehow not working for me. Gives me error:\nERROR: No matching distribution found for keras_applications<=1.0.8,>=1.0.7 (from efficientnet==1.1.1)\nAny ideas why?",
      "votes": 1,
      "replies": [
        {
          "id": 1111468,
          "postDate": "2020-12-13T18:08:18.380Z",
          "content": "<p>Hey <a href=\"https://www.kaggle.com/serg132003\" target=\"_blank\">@serg132003</a> take a look at my notebook <a href=\"https://www.kaggle.com/dimitreoliveira/cassava-leaf-disease-tpu-tensorflow-inference/notebook\" target=\"_blank\">here</a> it is working for me, have you added the datasets with the repositories to the notebook?</p>",
          "rawMarkdown": "Hey @serg132003 take a look at my notebook [here](https://www.kaggle.com/dimitreoliveira/cassava-leaf-disease-tpu-tensorflow-inference/notebook) it is working for me, have you added the datasets with the repositories to the notebook?"
        }
      ]
    },
    {
      "id": 1096676,
      "postDate": "2020-11-30T17:29:48.243Z",
      "content": "<p>What I am doing is copying the required <code>whl</code> files from pip into a dataset and doing <br>\n<code>!pip install [PATH TO WHEEL]</code> at the start of the notebook as shown in the image below</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2591653%2F1e697fb487e8d84457a9da37550d1587%2FScreenshot%202020-11-30%20225739.png?generation=1606757279804982&amp;alt=media\" alt=\"Example\"></p>",
      "rawMarkdown": "What I am doing is copying the required `whl` files from pip into a dataset and doing \n`!pip install [PATH TO WHEEL]` at the start of the notebook as shown in the image below\n\n![Example](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2591653%2F1e697fb487e8d84457a9da37550d1587%2FScreenshot%202020-11-30%20225739.png?generation=1606757279804982&alt=media)\n\n",
      "votes": 1,
      "replies": [
        {
          "id": 1096897,
          "postDate": "2020-11-30T21:23:45.353Z",
          "content": "<p>Nice <a href=\"https://www.kaggle.com/abhinand05\" target=\"_blank\">@abhinand05</a> , this is very close to a solution, but in my case, the <code>pip</code> command installs the package using the <code>setup.py</code> file.</p>",
          "rawMarkdown": "Nice @abhinand05 , this is very close to a solution, but in my case, the `pip` command installs the package using the `setup.py` file.",
          "votes": 1
        },
        {
          "id": 1098269,
          "postDate": "2020-12-01T14:32:42.660Z",
          "content": "<p><a href=\"https://www.kaggle.com/abhinand05\" target=\"_blank\">@abhinand05</a></p>\n<p>I'm still not able to use the EfficientNet model. These are the steps I followed. <br>\n<code>! pip3 download efficientnet_pytorch</code> which downloads the following files to <code>/kaggle/working</code> folder</p>\n<pre><code>numpy-1.19.4-cp37-cp37m-manylinux2010_x86_64.whl\ntorch-1.7.0-cp37-cp37m-manylinux1_x86_64.whl\nefficientnet_pytorch-0.7.0.tar.gz\ndataclasses-0.6-py3-none-any.whl\nfuture-0.18.2.tar.gz\ntyping_extensions-3.7.4.3-py3-none-any.whl\n</code></pre>\n<p>Downloaded the 4 .whl files to my pc. and Uploaded them to dataset and I get the warnings for all 4 whl file which I have attached in the screenshot. Please help</p>",
          "rawMarkdown": "@abhinand05\n\nI'm still not able to use the EfficientNet model. These are the steps I followed. \n```! pip3 download efficientnet_pytorch``` which downloads the following files to ```/kaggle/working``` folder\n\n```\nnumpy-1.19.4-cp37-cp37m-manylinux2010_x86_64.whl\ntorch-1.7.0-cp37-cp37m-manylinux1_x86_64.whl\nefficientnet_pytorch-0.7.0.tar.gz\ndataclasses-0.6-py3-none-any.whl\nfuture-0.18.2.tar.gz\ntyping_extensions-3.7.4.3-py3-none-any.whl\n```\n\nDownloaded the 4 .whl files to my pc. and Uploaded them to dataset and I get the warnings for all 4 whl file which I have attached in the screenshot. Please help\n\n\n\n"
        }
      ]
    },
    {
      "id": 1095816,
      "postDate": "2020-11-30T01:28:31.350Z",
      "content": "<p>A good tip! Another option is to search for the actual source code for the models you wish to use, and simply paste it into your notebook.</p>",
      "rawMarkdown": "A good tip! Another option is to search for the actual source code for the models you wish to use, and simply paste it into your notebook.",
      "votes": 1,
      "replies": [
        {
          "id": 1095832,
          "postDate": "2020-11-30T01:54:37.123Z",
          "content": "<p>Yes <a href=\"https://www.kaggle.com/thomasbrekkunnvik\" target=\"_blank\">@thomasbrekkunnvik</a> , this works too, I usually do that for small functions, but in the case of large packages like EfficientNet, I think the code would get too messy.</p>",
          "rawMarkdown": "Yes @thomasbrekkunnvik , this works too, I usually do that for small functions, but in the case of large packages like EfficientNet, I think the code would get too messy.",
          "votes": 1
        }
      ]
    },
    {
      "id": 1088679,
      "postDate": "2020-11-23T21:10:11.513Z",
      "content": "<p>EfficientNet is using the only one file (imagenet_utils.py) from keras-applications package, so one can also copy this file into EfficientNet's folder.</p>",
      "rawMarkdown": "EfficientNet is using the only one file (imagenet_utils.py) from keras-applications package, so one can also copy this file into EfficientNet's folder.",
      "votes": 2,
      "replies": [
        {
          "id": 1095830,
          "postDate": "2020-11-30T01:53:36.650Z",
          "content": "<p>That is a good point <a href=\"https://www.kaggle.com/sergeyzlobin\" target=\"_blank\">@sergeyzlobin</a> , I had not noted that.</p>",
          "rawMarkdown": "That is a good point @sergeyzlobin , I had not noted that."
        }
      ]
    },
    {
      "id": 1098262,
      "postDate": "2020-12-01T14:28:29.867Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 1108166,
      "postDate": "2020-12-10T10:55:51.417Z",
      "content": "<p>Thanks! Solved my day!</p>",
      "rawMarkdown": "Thanks! Solved my day!",
      "votes": 1
    },
    {
      "id": 1099754,
      "postDate": "2020-12-02T15:28:20.623Z",
      "content": "<p>Thanks a lot. It is really helpful. </p>",
      "rawMarkdown": "Thanks a lot. It is really helpful. ",
      "votes": 1
    },
    {
      "id": 1096399,
      "postDate": "2020-11-30T13:23:14.773Z",
      "content": "<p>Thanks, it helps me a lot :D</p>",
      "rawMarkdown": "Thanks, it helps me a lot :D",
      "votes": 1
    },
    {
      "id": 1095634,
      "postDate": "2020-11-29T19:49:02.967Z",
      "content": "<p>Thanks, it works!</p>",
      "rawMarkdown": "Thanks, it works!",
      "votes": 1
    },
    {
      "id": 1088363,
      "postDate": "2020-11-23T14:59:57.110Z",
      "content": "<p>Thanks for sharing!</p>",
      "rawMarkdown": "Thanks for sharing!",
      "votes": 1
    }
  ],
  "comments": [
    {
      "id": 1121497,
      "author_name": "Sudhanshu Singh",
      "author_url": "",
      "post_date": "2020-12-21T17:41:13.220000",
      "content": "<p>Very rare and helpful notebook, learn new things, thanks for sharing😃.</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1119244,
      "author_name": "Bouwe Ceunen",
      "author_url": "",
      "post_date": "2020-12-19T20:53:56.160000",
      "content": "<p>Great, didn't know that!</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1111332,
      "author_name": "Serge",
      "author_url": "",
      "post_date": "2020-12-13T16:25:33.770000",
      "content": "<p>Somehow not working for me. Gives me error:<br>\nERROR: No matching distribution found for keras_applications=1.0.7 (from efficientnet==1.1.1)<br>\nAny ideas why?</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1111468,
          "author_name": "DimitreOliveira",
          "author_url": "",
          "post_date": "2020-12-13T18:08:18.380000",
          "content": "<p>Hey <a href=\"https://www.kaggle.com/serg132003\" target=\"_blank\">@serg132003</a> take a look at my notebook <a href=\"https://www.kaggle.com/dimitreoliveira/cassava-leaf-disease-tpu-tensorflow-inference/notebook\" target=\"_blank\">here</a> it is working for me, have you added the datasets with the repositories to the notebook?</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1096676,
      "author_name": "Abhinand",
      "author_url": "",
      "post_date": "2020-11-30T17:29:48.243000",
      "content": "<p>What I am doing is copying the required <code>whl</code> files from pip into a dataset and doing <br>\n<code>!pip install [PATH TO WHEEL]</code> at the start of the notebook as shown in the image below</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2591653%2F1e697fb487e8d84457a9da37550d1587%2FScreenshot%202020-11-30%20225739.png?generation=1606757279804982&amp;alt=media\" alt=\"Example\"></p>",
      "votes": 1,
      "replies": [
        {
          "id": 1096897,
          "author_name": "DimitreOliveira",
          "author_url": "",
          "post_date": "2020-11-30T21:23:45.353000",
          "content": "<p>Nice <a href=\"https://www.kaggle.com/abhinand05\" target=\"_blank\">@abhinand05</a> , this is very close to a solution, but in my case, the <code>pip</code> command installs the package using the <code>setup.py</code> file.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1098269,
          "author_name": "Thanish Batcha",
          "author_url": "",
          "post_date": "2020-12-01T14:32:42.660000",
          "content": "<p><a href=\"https://www.kaggle.com/abhinand05\" target=\"_blank\">@abhinand05</a></p>\n<p>I'm still not able to use the EfficientNet model. These are the steps I followed. <br>\n<code>! pip3 download efficientnet_pytorch</code> which downloads the following files to <code>/kaggle/working</code> folder</p>\n<pre><code>numpy-1.19.4-cp37-cp37m-manylinux2010_x86_64.whl\ntorch-1.7.0-cp37-cp37m-manylinux1_x86_64.whl\nefficientnet_pytorch-0.7.0.tar.gz\ndataclasses-0.6-py3-none-any.whl\nfuture-0.18.2.tar.gz\ntyping_extensions-3.7.4.3-py3-none-any.whl\n</code></pre>\n<p>Downloaded the 4 .whl files to my pc. and Uploaded them to dataset and I get the warnings for all 4 whl file which I have attached in the screenshot. Please help</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1095816,
      "author_name": "Thomas Brekk Unnvik",
      "author_url": "",
      "post_date": "2020-11-30T01:28:31.350000",
      "content": "<p>A good tip! Another option is to search for the actual source code for the models you wish to use, and simply paste it into your notebook.</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1095832,
          "author_name": "DimitreOliveira",
          "author_url": "",
          "post_date": "2020-11-30T01:54:37.123000",
          "content": "<p>Yes <a href=\"https://www.kaggle.com/thomasbrekkunnvik\" target=\"_blank\">@thomasbrekkunnvik</a> , this works too, I usually do that for small functions, but in the case of large packages like EfficientNet, I think the code would get too messy.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1088679,
      "author_name": "Sergey Zlobin",
      "author_url": "",
      "post_date": "2020-11-23T21:10:11.513000",
      "content": "<p>EfficientNet is using the only one file (imagenet_utils.py) from keras-applications package, so one can also copy this file into EfficientNet's folder.</p>",
      "votes": 2,
      "replies": [
        {
          "id": 1095830,
          "author_name": "DimitreOliveira",
          "author_url": "",
          "post_date": "2020-11-30T01:53:36.650000",
          "content": "<p>That is a good point <a href=\"https://www.kaggle.com/sergeyzlobin\" target=\"_blank\">@sergeyzlobin</a> , I had not noted that.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1098262,
      "author_name": "",
      "author_url": "",
      "post_date": "2020-12-01T14:28:29.867000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1108166,
      "author_name": "Giovanni Pinamonti",
      "author_url": "",
      "post_date": "2020-12-10T10:55:51.417000",
      "content": "<p>Thanks! Solved my day!</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1099754,
      "author_name": "Deepak Rai",
      "author_url": "",
      "post_date": "2020-12-02T15:28:20.623000",
      "content": "<p>Thanks a lot. It is really helpful. </p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1096399,
      "author_name": "Rakka Alhazimi",
      "author_url": "",
      "post_date": "2020-11-30T13:23:14.773000",
      "content": "<p>Thanks, it helps me a lot :D</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1095634,
      "author_name": "Anton Morenov",
      "author_url": "",
      "post_date": "2020-11-29T19:49:02.967000",
      "content": "<p>Thanks, it works!</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1088363,
      "author_name": "Mau Rua",
      "author_url": "",
      "post_date": "2020-11-23T14:59:57.110000",
      "content": "<p>Thanks for sharing!</p>",
      "votes": 1,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1087527": "Since in this competition, we need to make the inference part without using the internet, we are not able to install packages using the usual `pip` command like:\n\nTo install [EfficientNet](https://github.com/qubvel/efficientnet) package:\n`!pip install --quiet efficientnet`\n\nBut we can still install packages like `EfficientNet` using the dataset feature from Kaggle you can see a working example at this [inference notebook](https://www.kaggle.com/dimitreoliveira/cassava-leaf-disease-tpu-tensorflow-inference).\n\n#### Steps:\n1. Create a dataset from the GitGub repository, I have created the two that you will need to use `EfficientNet`\n  - [keras-applications](https://www.kaggle.com/dimitreoliveira/kerasapplications) package.\n  - [efficientNet](https://www.kaggle.com/dimitreoliveira/efficientnet-git) package.\n2. Install the package using `pip` with `!pip install --quiet path_to_package`\n  - Example: `!pip install --quiet /kaggle/input/efficientnet-git`\n3. Import the package\n  - Example `import efficientnet.tfkeras as efn`",
    "1121497": "Very rare and helpful notebook, learn new things, thanks for sharing😃.",
    "1119244": "Great, didn't know that!",
    "1111332": "Somehow not working for me. Gives me error:\nERROR: No matching distribution found for keras_applications<=1.0.8,>=1.0.7 (from efficientnet==1.1.1)\nAny ideas why?",
    "1096676": "What I am doing is copying the required `whl` files from pip into a dataset and doing \n`!pip install [PATH TO WHEEL]` at the start of the notebook as shown in the image below\n\n![Example](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2591653%2F1e697fb487e8d84457a9da37550d1587%2FScreenshot%202020-11-30%20225739.png?generation=1606757279804982&alt=media)\n\n",
    "1095816": "A good tip! Another option is to search for the actual source code for the models you wish to use, and simply paste it into your notebook.",
    "1088679": "EfficientNet is using the only one file (imagenet_utils.py) from keras-applications package, so one can also copy this file into EfficientNet's folder.",
    "1098262": "",
    "1108166": "Thanks! Solved my day!",
    "1099754": "Thanks a lot. It is really helpful. ",
    "1096399": "Thanks, it helps me a lot :D",
    "1095634": "Thanks, it works!",
    "1088363": "Thanks for sharing!"
  }
}