{
  "id": 488257,
  "title": "How to install libraries during evaluation?",
  "url": "/competitions/home-credit-credit-risk-model-stability/discussion/488257",
  "author_name": "",
  "post_date": "2024-04-01T19:36:02.094838200Z",
  "votes": 2,
  "comment_count": 7,
  "views": 0,
  "content": "<p>I want to use some open-source libraries, and I can install them using pip. However, since the internet is disabled during evaluation I guess I won't be able to use them in submission. How can I use additional libraries?</p>",
  "messages": [
    {
      "id": "2727481",
      "postDate": "04/01/2024 19:36:02",
      "content": "<p>I want to use some open-source libraries, and I can install them using pip. However, since the internet is disabled during evaluation I guess I won't be able to use them in submission. How can I use additional libraries?</p>",
      "rawMarkdown": "I want to use some open-source libraries, and I can install them using pip. However, since the internet is disabled during evaluation I guess I won't be able to use them in submission. How can I use additional libraries?",
      "votes": null
    },
    {
      "id": "2727599",
      "postDate": "04/01/2024 20:42:43",
      "content": "<p><a href=\"https://www.kaggle.com/nerkan\" target=\"_blank\">@nerkan</a> you need to separately install these libraries in another dataset/ kernel using their .whl files and import them in your reference kernel. </p>",
      "rawMarkdown": "nerkan you need to separately install these libraries in another dataset/ kernel using their .whl files and import them in your reference kernel.",
      "votes": null
    },
    {
      "id": "2727614",
      "postDate": "04/01/2024 20:58:25",
      "content": "<p>Just follow directions as outlined in <a href=\"https://www.kaggle.com/code/kononenko/pip-install-no-internet\" target=\"_blank\">pip-install-no-internet</a> notebook, <a href=\"https://www.kaggle.com/nerkan\" target=\"_blank\">@nerkan</a>.</p>",
      "rawMarkdown": "Just follow directions as outlined in [pip-install-no-internet](https://www.kaggle.com/code/kononenko/pip-install-no-internet) notebook, @nerkan.",
      "votes": null
    },
    {
      "id": "2728557",
      "postDate": "04/02/2024 10:04:49",
      "content": "<p>I did as it is outlined. However:</p>\n<ol>\n<li>I can't see the \"data\" section on the right panel. Only input. Are they the same?</li>\n<li>In file section I can see the option \"add utility script\". It opens the panel \"Add data\" on the right panel. But it is completely empty despite I saved the notebook with installation and imports.</li>\n<li>I have added auxiliary notebook as input and it is shown as utility script. But import of desired libraries in the main script still doesn't work. <br>\nCan you help me with that?</li>\n</ol>",
      "rawMarkdown": "I did as it is outlined. However:\n1. I can't see the \"data\" section on the right panel. Only input. Are they the same?\n2. In file section I can see the option \"add utility script\". It opens the panel \"Add data\" on the right panel. But it is completely empty despite I saved the notebook with installation and imports.\n3. I have added auxiliary notebook as input and it is shown as utility script. But import of desired libraries in the main script still doesn't work. \nCan you help me with that?",
      "votes": null
    },
    {
      "id": "2731674",
      "postDate": "04/02/2024 20:20:25",
      "content": "<p>Dear <a href=\"https://www.kaggle.com/nerkan\" target=\"_blank\">@nerkan</a></p>\n<ol>\n<li>Yes, they're the same. It just seems that Kaggle changed \"Data\" to \"Input\" at some point, I've updated my notebook text to reflect that change.</li>\n<li>You don't need to do \"Add utility script\" at all. You only need to click \"Set as Utility Script\" in your auxiliary notebook and in the main notebook you add that notebook as the input data.</li>\n<li>Have you installed the required packages and saved the auxiliary notebook version? </li>\n</ol>\n<p>You can share the sample notebooks you're using and I can take a look.</p>",
      "rawMarkdown": "Dear @nerkan\n\n1. Yes, they're the same. It just seems that Kaggle changed \"Data\" to \"Input\" at some point, I've updated my notebook text to reflect that change.\n2. You don't need to do \"Add utility script\" at all. You only need to click \"Set as Utility Script\" in your auxiliary notebook and in the main notebook you add that notebook as the input data.\n3. Have you installed the required packages and saved the auxiliary notebook version? \n\nYou can share the sample notebooks you're using and I can take a look.",
      "votes": null
    },
    {
      "id": "2731782",
      "postDate": "04/02/2024 21:20:34",
      "content": "<p>Dear <a href=\"https://www.kaggle.com/kononenko\" target=\"_blank\">@kononenko</a>,<br>\nThis is the target notebook, where I need to do the imports<br>\n<a href=\"https://www.kaggle.com/code/nerkan/target-notebook\" target=\"_blank\">https://www.kaggle.com/code/nerkan/target-notebook</a><br>\nThis is the notebook where I do installation<br>\n<a href=\"https://www.kaggle.com/code/nerkan/import-notebook\" target=\"_blank\">https://www.kaggle.com/code/nerkan/import-notebook</a></p>\n<p>In the import notebook I set persistence level on variables and files and set it as utility script. In target notebook I added import notebook as input and disabled internet. And it fails to import library (optbinning in that case) directly, and if it is imported from notebook, it tries to reinstall it and fails due to lack if internet. Also, if I try to remove  !pip install lines, it fails also with \"module not found\" error</p>\n<p>I would greatly appreciate your help.</p>",
      "rawMarkdown": "Dear @kononenko,\nThis is the target notebook, where I need to do the imports\nhttps://www.kaggle.com/code/nerkan/target-notebook\nThis is the notebook where I do installation\nhttps://www.kaggle.com/code/nerkan/import-notebook\n\nIn the import notebook I set persistence level on variables and files and set it as utility script. In target notebook I added import notebook as input and disabled internet. And it fails to import library (optbinning in that case) directly, and if it is imported from notebook, it tries to reinstall it and fails due to lack if internet. Also, if I try to remove  !pip install lines, it fails also with \"module not found\" error\n\nI would greatly appreciate your help.",
      "votes": null
    },
    {
      "id": "2731862",
      "postDate": "04/02/2024 22:15:24",
      "content": "<p>You are missing <code>--target=/kaggle/working/</code> when installing the packages, it should be</p>\n<pre><code>!pip install ==9.5.2237 =/kaggle/working/\n!pip install optbinning =/kaggle/working/\n</code></pre>",
      "rawMarkdown": "You are missing `--target=/kaggle/working/` when installing the packages, it should be\n```\n!pip install ortools==9.5.2237 --target=/kaggle/working/\n!pip install optbinning --target=/kaggle/working/\n```",
      "votes": null
    },
    {
      "id": "2732572",
      "postDate": "04/03/2024 07:49:08",
      "content": "<p>Yes, it worked! Don't know how I could miss that. Thanks a lot!<br>\nI also noticed that that notebook with instructions is also yours so thanks for it as well!</p>",
      "rawMarkdown": "Yes, it worked! Don't know how I could miss that. Thanks a lot!\nI also noticed that that notebook with instructions is also yours so thanks for it as well!",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2727599,
      "author_name": "ravi20076",
      "author_url": "",
      "post_date": "04/01/2024 20:42:43",
      "content": "<p><a href=\"https://www.kaggle.com/nerkan\" target=\"_blank\">@nerkan</a> you need to separately install these libraries in another dataset/ kernel using their .whl files and import them in your reference kernel. </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 2727614,
      "author_name": "kononenko",
      "author_url": "",
      "post_date": "04/01/2024 20:58:25",
      "content": "<p>Just follow directions as outlined in <a href=\"https://www.kaggle.com/code/kononenko/pip-install-no-internet\" target=\"_blank\">pip-install-no-internet</a> notebook, <a href=\"https://www.kaggle.com/nerkan\" target=\"_blank\">@nerkan</a>.</p>",
      "votes": null,
      "replies": [
        {
          "id": 2728557,
          "author_name": "nerkan",
          "author_url": "",
          "post_date": "04/02/2024 10:04:49",
          "content": "<p>I did as it is outlined. However:</p>\n<ol>\n<li>I can't see the \"data\" section on the right panel. Only input. Are they the same?</li>\n<li>In file section I can see the option \"add utility script\". It opens the panel \"Add data\" on the right panel. But it is completely empty despite I saved the notebook with installation and imports.</li>\n<li>I have added auxiliary notebook as input and it is shown as utility script. But import of desired libraries in the main script still doesn't work. <br>\nCan you help me with that?</li>\n</ol>",
          "votes": null,
          "replies": [
            {
              "id": 2731674,
              "author_name": "kononenko",
              "author_url": "",
              "post_date": "04/02/2024 20:20:25",
              "content": "<p>Dear <a href=\"https://www.kaggle.com/nerkan\" target=\"_blank\">@nerkan</a></p>\n<ol>\n<li>Yes, they're the same. It just seems that Kaggle changed \"Data\" to \"Input\" at some point, I've updated my notebook text to reflect that change.</li>\n<li>You don't need to do \"Add utility script\" at all. You only need to click \"Set as Utility Script\" in your auxiliary notebook and in the main notebook you add that notebook as the input data.</li>\n<li>Have you installed the required packages and saved the auxiliary notebook version? </li>\n</ol>\n<p>You can share the sample notebooks you're using and I can take a look.</p>",
              "votes": null,
              "replies": [
                {
                  "id": 2731782,
                  "author_name": "nerkan",
                  "author_url": "",
                  "post_date": "04/02/2024 21:20:34",
                  "content": "<p>Dear <a href=\"https://www.kaggle.com/kononenko\" target=\"_blank\">@kononenko</a>,<br>\nThis is the target notebook, where I need to do the imports<br>\n<a href=\"https://www.kaggle.com/code/nerkan/target-notebook\" target=\"_blank\">https://www.kaggle.com/code/nerkan/target-notebook</a><br>\nThis is the notebook where I do installation<br>\n<a href=\"https://www.kaggle.com/code/nerkan/import-notebook\" target=\"_blank\">https://www.kaggle.com/code/nerkan/import-notebook</a></p>\n<p>In the import notebook I set persistence level on variables and files and set it as utility script. In target notebook I added import notebook as input and disabled internet. And it fails to import library (optbinning in that case) directly, and if it is imported from notebook, it tries to reinstall it and fails due to lack if internet. Also, if I try to remove  !pip install lines, it fails also with \"module not found\" error</p>\n<p>I would greatly appreciate your help.</p>",
                  "votes": null,
                  "replies": [
                    {
                      "id": 2731862,
                      "author_name": "kononenko",
                      "author_url": "",
                      "post_date": "04/02/2024 22:15:24",
                      "content": "<p>You are missing <code>--target=/kaggle/working/</code> when installing the packages, it should be</p>\n<pre><code>!pip install ==9.5.2237 =/kaggle/working/\n!pip install optbinning =/kaggle/working/\n</code></pre>",
                      "votes": null,
                      "replies": [
                        {
                          "id": 2732572,
                          "author_name": "nerkan",
                          "author_url": "",
                          "post_date": "04/03/2024 07:49:08",
                          "content": "<p>Yes, it worked! Don't know how I could miss that. Thanks a lot!<br>\nI also noticed that that notebook with instructions is also yours so thanks for it as well!</p>",
                          "votes": null,
                          "replies": []
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2727481": "I want to use some open-source libraries, and I can install them using pip. However, since the internet is disabled during evaluation I guess I won't be able to use them in submission. How can I use additional libraries?",
    "2727599": "nerkan you need to separately install these libraries in another dataset/ kernel using their .whl files and import them in your reference kernel.",
    "2727614": "Just follow directions as outlined in [pip-install-no-internet](https://www.kaggle.com/code/kononenko/pip-install-no-internet) notebook, @nerkan.",
    "2728557": "I did as it is outlined. However:\n1. I can't see the \"data\" section on the right panel. Only input. Are they the same?\n2. In file section I can see the option \"add utility script\". It opens the panel \"Add data\" on the right panel. But it is completely empty despite I saved the notebook with installation and imports.\n3. I have added auxiliary notebook as input and it is shown as utility script. But import of desired libraries in the main script still doesn't work. \nCan you help me with that?",
    "2731674": "Dear @nerkan\n\n1. Yes, they're the same. It just seems that Kaggle changed \"Data\" to \"Input\" at some point, I've updated my notebook text to reflect that change.\n2. You don't need to do \"Add utility script\" at all. You only need to click \"Set as Utility Script\" in your auxiliary notebook and in the main notebook you add that notebook as the input data.\n3. Have you installed the required packages and saved the auxiliary notebook version? \n\nYou can share the sample notebooks you're using and I can take a look.",
    "2731782": "Dear @kononenko,\nThis is the target notebook, where I need to do the imports\nhttps://www.kaggle.com/code/nerkan/target-notebook\nThis is the notebook where I do installation\nhttps://www.kaggle.com/code/nerkan/import-notebook\n\nIn the import notebook I set persistence level on variables and files and set it as utility script. In target notebook I added import notebook as input and disabled internet. And it fails to import library (optbinning in that case) directly, and if it is imported from notebook, it tries to reinstall it and fails due to lack if internet. Also, if I try to remove  !pip install lines, it fails also with \"module not found\" error\n\nI would greatly appreciate your help.",
    "2731862": "You are missing `--target=/kaggle/working/` when installing the packages, it should be\n```\n!pip install ortools==9.5.2237 --target=/kaggle/working/\n!pip install optbinning --target=/kaggle/working/\n```",
    "2732572": "Yes, it worked! Don't know how I could miss that. Thanks a lot!\nI also noticed that that notebook with instructions is also yours so thanks for it as well!"
  },
  "source": "meta"
}