{
  "id": 206871,
  "title": "[SOLVED] Loading models trained in Colab or google cloud platform ",
  "url": "/competitions/riiid-test-answer-prediction/discussion/206871",
  "author_name": "",
  "post_date": "2020-12-27T01:13:39.363273Z",
  "votes": 5,
  "comment_count": 15,
  "views": 0,
  "content": "<p>I believe many of you are training their models in the cloud since this competition is computationally heavy. I am new to GCP and would like to ask you how do you load your LGBM models trained in GCP?</p>\n<p>Normally on kaggle, I save the model in the training notebook:</p>\n<pre><code>model.save_model(f\"model.txt\")\njoblib.dump(model.best_iteration, f\"model_best_iteration.pkl.zip\")\n</code></pre>\n<p>and load it in the inference notebook:</p>\n<pre><code>model = lgb.Booster(model_file=\"../input/riiid-lgbm/model.txt\")\nmodel.best_iteration = joblib.load(\"../input/riiid-lgbm/model_best_iteration.pkl.zip\")\n</code></pre>\n<p>This works correctly if the model is trained in a kaggle notebook. However, when <strong>I download the model from the AI notebook in the cloud and upload it to a kaggle dataset, I am unable to load it because the notebook restarts session whenever the 'loading model' cell is executed.</strong></p>\n<p>The problem is that the models downloaded from the cloud are truncated! Any tips or ideas to overcome this problem? Did anyone have more success loading LGBM models trained in the cloud?</p>\n<h1>UPDATE: SOLUTION</h1>\n<p>You can find the solution in <a href=\"https://www.kaggle.com/c/riiid-test-answer-prediction/discussion/208110#1135728\" target=\"_blank\">this discussion topic</a>. You can upload your model directly from your notebook in GCP to your kaggle dataset using Kaggle API</p>\n<pre><code>#Downgrade your Kaggle API version, the latest version has a bug\npip install kaggle==1.5.4\n\n# Download your API token from your account and upload it to your notebook\n!mkdir ~/.kaggle\n!cp /home/kaggle.json ~/.kaggle/kaggle.json\n\n#Create a metadata file with this code and edit it with your dataset's name\n!kaggle datasets init -p /home/\n\n#After editing the metadata file, create a dataset\n!kaggle datasets create -p /home/\n\n#Put your kaggle username / dataset name as you edited the metadata file\n!kaggle datasets metadata -p . USERNAME/DATASET_NAME #(same as metafile)\n\n#Upload the model to your dataset\n!kaggle datasets version -p . -m \"Updates my model files\"\n</code></pre>",
  "messages": [
    {
      "id": "1127871",
      "postDate": "12/27/2020 01:13:39",
      "content": "<p>I believe many of you are training their models in the cloud since this competition is computationally heavy. I am new to GCP and would like to ask you how do you load your LGBM models trained in GCP?</p>\n<p>Normally on kaggle, I save the model in the training notebook:</p>\n<pre><code>model.save_model(f\"model.txt\")\njoblib.dump(model.best_iteration, f\"model_best_iteration.pkl.zip\")\n</code></pre>\n<p>and load it in the inference notebook:</p>\n<pre><code>model = lgb.Booster(model_file=\"../input/riiid-lgbm/model.txt\")\nmodel.best_iteration = joblib.load(\"../input/riiid-lgbm/model_best_iteration.pkl.zip\")\n</code></pre>\n<p>This works correctly if the model is trained in a kaggle notebook. However, when <strong>I download the model from the AI notebook in the cloud and upload it to a kaggle dataset, I am unable to load it because the notebook restarts session whenever the 'loading model' cell is executed.</strong></p>\n<p>The problem is that the models downloaded from the cloud are truncated! Any tips or ideas to overcome this problem? Did anyone have more success loading LGBM models trained in the cloud?</p>\n<h1>UPDATE: SOLUTION</h1>\n<p>You can find the solution in <a href=\"https://www.kaggle.com/c/riiid-test-answer-prediction/discussion/208110#1135728\" target=\"_blank\">this discussion topic</a>. You can upload your model directly from your notebook in GCP to your kaggle dataset using Kaggle API</p>\n<pre><code>#Downgrade your Kaggle API version, the latest version has a bug\npip install kaggle==1.5.4\n\n# Download your API token from your account and upload it to your notebook\n!mkdir ~/.kaggle\n!cp /home/kaggle.json ~/.kaggle/kaggle.json\n\n#Create a metadata file with this code and edit it with your dataset's name\n!kaggle datasets init -p /home/\n\n#After editing the metadata file, create a dataset\n!kaggle datasets create -p /home/\n\n#Put your kaggle username / dataset name as you edited the metadata file\n!kaggle datasets metadata -p . USERNAME/DATASET_NAME #(same as metafile)\n\n#Upload the model to your dataset\n!kaggle datasets version -p . -m \"Updates my model files\"\n</code></pre>",
      "rawMarkdown": "I believe many of you are training their models in the cloud since this competition is computationally heavy. I am new to GCP and would like to ask you how do you load your LGBM models trained in GCP?\n\nNormally on kaggle, I save the model in the training notebook:\n```\nmodel.save_model(f\"model.txt\")\njoblib.dump(model.best_iteration, f\"model_best_iteration.pkl.zip\")\n```\n\nand load it in the inference notebook:\n```\nmodel = lgb.Booster(model_file=\"../input/riiid-lgbm/model.txt\")\nmodel.best_iteration = joblib.load(\"../input/riiid-lgbm/model_best_iteration.pkl.zip\")\n```\n\nThis works correctly if the model is trained in a kaggle notebook. However, when **I download the model from the AI notebook in the cloud and upload it to a kaggle dataset, I am unable to load it because the notebook restarts session whenever the 'loading model' cell is executed.**\n\nThe problem is that the models downloaded from the cloud are truncated! Any tips or ideas to overcome this problem? Did anyone have more success loading LGBM models trained in the cloud?\n\n# UPDATE: SOLUTION\n\nYou can find the solution in [this discussion topic](https://www.kaggle.com/c/riiid-test-answer-prediction/discussion/208110#1135728). You can upload your model directly from your notebook in GCP to your kaggle dataset using Kaggle API\n\n```\n#Downgrade your Kaggle API version, the latest version has a bug\npip install kaggle==1.5.4\n\n# Download your API token from your account and upload it to your notebook\n!mkdir ~/.kaggle\n!cp /home/kaggle.json ~/.kaggle/kaggle.json\n\n#Create a metadata file with this code and edit it with your dataset's name\n!kaggle datasets init -p /home/\n\n#After editing the metadata file, create a dataset\n!kaggle datasets create -p /home/\n\n#Put your kaggle username / dataset name as you edited the metadata file\n!kaggle datasets metadata -p . USERNAME/DATASET_NAME #(same as metafile)\n\n#Upload the model to your dataset\n!kaggle datasets version -p . -m \"Updates my model files\"\n```",
      "votes": null
    },
    {
      "id": "1127891",
      "postDate": "12/27/2020 02:00:38",
      "content": "<p>I believe for this competition loading from GCP is impossible because the internet in the docker is disabled if you want to submit.</p>",
      "rawMarkdown": "I believe for this competition loading from GCP is impossible because the internet in the docker is disabled if you want to submit.",
      "votes": null
    },
    {
      "id": "1127894",
      "postDate": "12/27/2020 02:09:46",
      "content": "<p>I download the model, upload it to a kaggle dataset and load it from there, so no need to Internet connection. The problem is with the model itself, it can't be loaded for some reason.</p>",
      "rawMarkdown": "I download the model, upload it to a kaggle dataset and load it from there, so no need to Internet connection. The problem is with the model itself, it can't be loaded for some reason.",
      "votes": null
    },
    {
      "id": "1127903",
      "postDate": "12/27/2020 02:30:36",
      "content": "<p>this works for me - </p>\n<pre><code>file = 'trained_model.pkl'\npickle.dump(model, open(file, 'wb'))\n</code></pre>\n<p>and </p>\n<p><code>model = pickle.load(open(file,'rb'))</code> </p>",
      "rawMarkdown": "this works for me - \n\n```\nfile = 'trained_model.pkl'\npickle.dump(model, open(file, 'wb'))\n```\nand \n\n`model = pickle.load(open(file,'rb'))`",
      "votes": null
    },
    {
      "id": "1127907",
      "postDate": "12/27/2020 02:40:09",
      "content": "<p>Thanks you! I will try it right away</p>",
      "rawMarkdown": "Thanks you! I will try it right away",
      "votes": null
    },
    {
      "id": "1127981",
      "postDate": "12/27/2020 04:42:53",
      "content": "<p>Would someone be nice and donate for me so I can train my models in the cloud lol.</p>",
      "rawMarkdown": "Would someone be nice and donate for me so I can train my models in the cloud lol.",
      "votes": null
    },
    {
      "id": "1128366",
      "postDate": "12/27/2020 11:31:00",
      "content": "<p>If you are student/educator - I would say AWS is quite generous.  Many cloud service providers have free tier options also.  </p>",
      "rawMarkdown": "If you are student/educator - I would say AWS is quite generous.  Many cloud service providers have free tier options also.",
      "votes": null
    },
    {
      "id": "1128438",
      "postDate": "12/27/2020 12:47:37",
      "content": "<p>I save and then load full model with joblib, not best iteration. I use pickle example from <a href=\"https://stackoverflow.com/questions/55208734/save-lgbmregressor-model-from-python-lightgbm-package-to-disc\" target=\"_blank\">https://stackoverflow.com/questions/55208734/save-lgbmregressor-model-from-python-lightgbm-package-to-disc</a><br>\nIt works for me, score does not change </p>",
      "rawMarkdown": "I save and then load full model with joblib, not best iteration. I use pickle example from https://stackoverflow.com/questions/55208734/save-lgbmregressor-model-from-python-lightgbm-package-to-disc\nIt works for me, score does not change",
      "votes": null
    },
    {
      "id": "1128465",
      "postDate": "12/27/2020 13:08:46",
      "content": "<p>Its not solely an issue of money for me, in my country, Tunisia, paypal or any sort of online payment in dollars is yet unavailable.</p>",
      "rawMarkdown": "Its not solely an issue of money for me, in my country, Tunisia, paypal or any sort of online payment in dollars is yet unavailable.",
      "votes": null
    },
    {
      "id": "1128766",
      "postDate": "12/27/2020 18:02:10",
      "content": "<p>Thank you :)</p>",
      "rawMarkdown": "Thank you :)",
      "votes": null
    },
    {
      "id": "1141147",
      "postDate": "01/06/2021 14:29:57",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/amiiiney\" target=\"_blank\">@amiiiney</a> ! Did you eventually solve this? I am having the same problem and none of the above suggestions seem to work for me. Thanks!</p>",
      "rawMarkdown": "Hi @amiiiney ! Did you eventually solve this? I am having the same problem and none of the above suggestions seem to work for me. Thanks!",
      "votes": null
    },
    {
      "id": "1141176",
      "postDate": "01/06/2021 14:45:23",
      "content": "<p>Use the kaggle api to create a dataset -&gt; upload files to your dataset -&gt; import them from your notebook. <br>\nAfter setting up the kaggle token, updating the database would only take one terminal command.<br>\nThis worked like charm for me.</p>",
      "rawMarkdown": "Use the kaggle api to create a dataset -> upload files to your dataset -> import them from your notebook. \nAfter setting up the kaggle token, updating the database would only take one terminal command.\nThis worked like charm for me.",
      "votes": null
    },
    {
      "id": "1141214",
      "postDate": "01/06/2021 15:05:09",
      "content": "<p><a href=\"https://www.kaggle.com/jpcpinto\" target=\"_blank\">@jpcpinto</a> I was planning to update this post with the solution and got distracted with this final leaderboard race :) <br>\nAs Abdessalem mentioned, you can upload the model directly from your GCP notebook to a kaggle dataset, you can find the solution in <a href=\"https://www.kaggle.com/c/riiid-test-answer-prediction/discussion/208110#1135728\" target=\"_blank\">this discussion post</a>. </p>\n<pre><code>#Downgrade your Kaggle API version, the latest version has a bug\npip install kaggle==1.5.4\n\n# Download your API token from your account and upload it to your notebook\n!mkdir ~/.kaggle\n!cp /home/kaggle.json ~/.kaggle/kaggle.json\n\n#Create a metadata file with this code and edit it with your dataset's name\n!kaggle datasets init -p /home/\n\n#After editing the metafile, create a dataset\n!kaggle datasets create -p /home/\n\n#Put your kaggle username / dataset name as you edited the metafile\n!kaggle datasets metadata -p . USERNAME/DATASET_NAME #(same as metafile)\n\n#Upload the model to your dataset\n!kaggle datasets version -p . -m \"Updates my model files\"\n</code></pre>\n<p>If you get some unexpected bugs, let me know :)</p>",
      "rawMarkdown": "jpcpinto I was planning to update this post with the solution and got distracted with this final leaderboard race :) \nAs Abdessalem mentioned, you can upload the model directly from your GCP notebook to a kaggle dataset, you can find the solution in [this discussion post](https://www.kaggle.com/c/riiid-test-answer-prediction/discussion/208110#1135728). \n```\n#Downgrade your Kaggle API version, the latest version has a bug\npip install kaggle==1.5.4\n\n# Download your API token from your account and upload it to your notebook\n!mkdir ~/.kaggle\n!cp /home/kaggle.json ~/.kaggle/kaggle.json\n\n#Create a metadata file with this code and edit it with your dataset's name\n!kaggle datasets init -p /home/\n\n#After editing the metafile, create a dataset\n!kaggle datasets create -p /home/\n\n#Put your kaggle username / dataset name as you edited the metafile\n!kaggle datasets metadata -p . USERNAME/DATASET_NAME #(same as metafile)\n\n#Upload the model to your dataset\n!kaggle datasets version -p . -m \"Updates my model files\"\n```\n\nIf you get some unexpected bugs, let me know :)",
      "votes": null
    },
    {
      "id": "1141449",
      "postDate": "01/06/2021 18:07:55",
      "content": "<p>Super awesome! It worked, thanks! Indeed there seems to be a problem with google cloud as it truncates files if they are \"manually\" downloaded</p>",
      "rawMarkdown": "Super awesome! It worked, thanks! Indeed there seems to be a problem with google cloud as it truncates files if they are \"manually\" downloaded",
      "votes": null
    },
    {
      "id": "1556813",
      "postDate": "10/25/2021 06:56:56",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/amiiiney\" target=\"_blank\">@amiiiney</a> , i want to upload models trained in local service to  kaggle dataset, , I try above process in anthor competition, but when i input   kaggle datasets init -p /home/ in my local terminal, it always shows<br>\nValueError: Error: Missing username in configuration.<br>\nCould you know how to solve this problem?  Thank you! </p>",
      "rawMarkdown": "Hi @amiiiney , i want to upload models trained in local service to  kaggle dataset, , I try above process in anthor competition, but when i input   kaggle datasets init -p /home/ in my local terminal, it always shows\nValueError: Error: Missing username in configuration.\nCould you know how to solve this problem?  Thank you!",
      "votes": null
    },
    {
      "id": "1556862",
      "postDate": "10/25/2021 07:17:28",
      "content": "<p>This problem has been solved. Thank you !   <br>\n:)</p>",
      "rawMarkdown": "This problem has been solved. Thank you !   \n:)",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1127891,
      "author_name": "scaomath",
      "author_url": "",
      "post_date": "12/27/2020 02:00:38",
      "content": "<p>I believe for this competition loading from GCP is impossible because the internet in the docker is disabled if you want to submit.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1127894,
          "author_name": "amiiiney",
          "author_url": "",
          "post_date": "12/27/2020 02:09:46",
          "content": "<p>I download the model, upload it to a kaggle dataset and load it from there, so no need to Internet connection. The problem is with the model itself, it can't be loaded for some reason.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1127903,
      "author_name": "rashmibanthia",
      "author_url": "",
      "post_date": "12/27/2020 02:30:36",
      "content": "<p>this works for me - </p>\n<pre><code>file = 'trained_model.pkl'\npickle.dump(model, open(file, 'wb'))\n</code></pre>\n<p>and </p>\n<p><code>model = pickle.load(open(file,'rb'))</code> </p>",
      "votes": null,
      "replies": [
        {
          "id": 1127907,
          "author_name": "amiiiney",
          "author_url": "",
          "post_date": "12/27/2020 02:40:09",
          "content": "<p>Thanks you! I will try it right away</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1127981,
      "author_name": "abdessalemboukil",
      "author_url": "",
      "post_date": "12/27/2020 04:42:53",
      "content": "<p>Would someone be nice and donate for me so I can train my models in the cloud lol.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1128366,
          "author_name": "rashmibanthia",
          "author_url": "",
          "post_date": "12/27/2020 11:31:00",
          "content": "<p>If you are student/educator - I would say AWS is quite generous.  Many cloud service providers have free tier options also.  </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1128465,
          "author_name": "abdessalemboukil",
          "author_url": "",
          "post_date": "12/27/2020 13:08:46",
          "content": "<p>Its not solely an issue of money for me, in my country, Tunisia, paypal or any sort of online payment in dollars is yet unavailable.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1128438,
      "author_name": "fredegrec",
      "author_url": "",
      "post_date": "12/27/2020 12:47:37",
      "content": "<p>I save and then load full model with joblib, not best iteration. I use pickle example from <a href=\"https://stackoverflow.com/questions/55208734/save-lgbmregressor-model-from-python-lightgbm-package-to-disc\" target=\"_blank\">https://stackoverflow.com/questions/55208734/save-lgbmregressor-model-from-python-lightgbm-package-to-disc</a><br>\nIt works for me, score does not change </p>",
      "votes": null,
      "replies": [
        {
          "id": 1128766,
          "author_name": "amiiiney",
          "author_url": "",
          "post_date": "12/27/2020 18:02:10",
          "content": "<p>Thank you :)</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1141147,
      "author_name": "jpcpinto",
      "author_url": "",
      "post_date": "01/06/2021 14:29:57",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/amiiiney\" target=\"_blank\">@amiiiney</a> ! Did you eventually solve this? I am having the same problem and none of the above suggestions seem to work for me. Thanks!</p>",
      "votes": null,
      "replies": [
        {
          "id": 1141176,
          "author_name": "abdessalemboukil",
          "author_url": "",
          "post_date": "01/06/2021 14:45:23",
          "content": "<p>Use the kaggle api to create a dataset -&gt; upload files to your dataset -&gt; import them from your notebook. <br>\nAfter setting up the kaggle token, updating the database would only take one terminal command.<br>\nThis worked like charm for me.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1141214,
          "author_name": "amiiiney",
          "author_url": "",
          "post_date": "01/06/2021 15:05:09",
          "content": "<p><a href=\"https://www.kaggle.com/jpcpinto\" target=\"_blank\">@jpcpinto</a> I was planning to update this post with the solution and got distracted with this final leaderboard race :) <br>\nAs Abdessalem mentioned, you can upload the model directly from your GCP notebook to a kaggle dataset, you can find the solution in <a href=\"https://www.kaggle.com/c/riiid-test-answer-prediction/discussion/208110#1135728\" target=\"_blank\">this discussion post</a>. </p>\n<pre><code>#Downgrade your Kaggle API version, the latest version has a bug\npip install kaggle==1.5.4\n\n# Download your API token from your account and upload it to your notebook\n!mkdir ~/.kaggle\n!cp /home/kaggle.json ~/.kaggle/kaggle.json\n\n#Create a metadata file with this code and edit it with your dataset's name\n!kaggle datasets init -p /home/\n\n#After editing the metafile, create a dataset\n!kaggle datasets create -p /home/\n\n#Put your kaggle username / dataset name as you edited the metafile\n!kaggle datasets metadata -p . USERNAME/DATASET_NAME #(same as metafile)\n\n#Upload the model to your dataset\n!kaggle datasets version -p . -m \"Updates my model files\"\n</code></pre>\n<p>If you get some unexpected bugs, let me know :)</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1141449,
          "author_name": "jpcpinto",
          "author_url": "",
          "post_date": "01/06/2021 18:07:55",
          "content": "<p>Super awesome! It worked, thanks! Indeed there seems to be a problem with google cloud as it truncates files if they are \"manually\" downloaded</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1556813,
      "author_name": "feililan",
      "author_url": "",
      "post_date": "10/25/2021 06:56:56",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/amiiiney\" target=\"_blank\">@amiiiney</a> , i want to upload models trained in local service to  kaggle dataset, , I try above process in anthor competition, but when i input   kaggle datasets init -p /home/ in my local terminal, it always shows<br>\nValueError: Error: Missing username in configuration.<br>\nCould you know how to solve this problem?  Thank you! </p>",
      "votes": null,
      "replies": [
        {
          "id": 1556862,
          "author_name": "feililan",
          "author_url": "",
          "post_date": "10/25/2021 07:17:28",
          "content": "<p>This problem has been solved. Thank you !   <br>\n:)</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1127871": "I believe many of you are training their models in the cloud since this competition is computationally heavy. I am new to GCP and would like to ask you how do you load your LGBM models trained in GCP?\n\nNormally on kaggle, I save the model in the training notebook:\n```\nmodel.save_model(f\"model.txt\")\njoblib.dump(model.best_iteration, f\"model_best_iteration.pkl.zip\")\n```\n\nand load it in the inference notebook:\n```\nmodel = lgb.Booster(model_file=\"../input/riiid-lgbm/model.txt\")\nmodel.best_iteration = joblib.load(\"../input/riiid-lgbm/model_best_iteration.pkl.zip\")\n```\n\nThis works correctly if the model is trained in a kaggle notebook. However, when **I download the model from the AI notebook in the cloud and upload it to a kaggle dataset, I am unable to load it because the notebook restarts session whenever the 'loading model' cell is executed.**\n\nThe problem is that the models downloaded from the cloud are truncated! Any tips or ideas to overcome this problem? Did anyone have more success loading LGBM models trained in the cloud?\n\n# UPDATE: SOLUTION\n\nYou can find the solution in [this discussion topic](https://www.kaggle.com/c/riiid-test-answer-prediction/discussion/208110#1135728). You can upload your model directly from your notebook in GCP to your kaggle dataset using Kaggle API\n\n```\n#Downgrade your Kaggle API version, the latest version has a bug\npip install kaggle==1.5.4\n\n# Download your API token from your account and upload it to your notebook\n!mkdir ~/.kaggle\n!cp /home/kaggle.json ~/.kaggle/kaggle.json\n\n#Create a metadata file with this code and edit it with your dataset's name\n!kaggle datasets init -p /home/\n\n#After editing the metadata file, create a dataset\n!kaggle datasets create -p /home/\n\n#Put your kaggle username / dataset name as you edited the metadata file\n!kaggle datasets metadata -p . USERNAME/DATASET_NAME #(same as metafile)\n\n#Upload the model to your dataset\n!kaggle datasets version -p . -m \"Updates my model files\"\n```",
    "1127891": "I believe for this competition loading from GCP is impossible because the internet in the docker is disabled if you want to submit.",
    "1127894": "I download the model, upload it to a kaggle dataset and load it from there, so no need to Internet connection. The problem is with the model itself, it can't be loaded for some reason.",
    "1127903": "this works for me - \n\n```\nfile = 'trained_model.pkl'\npickle.dump(model, open(file, 'wb'))\n```\nand \n\n`model = pickle.load(open(file,'rb'))`",
    "1127907": "Thanks you! I will try it right away",
    "1127981": "Would someone be nice and donate for me so I can train my models in the cloud lol.",
    "1128366": "If you are student/educator - I would say AWS is quite generous.  Many cloud service providers have free tier options also.",
    "1128438": "I save and then load full model with joblib, not best iteration. I use pickle example from https://stackoverflow.com/questions/55208734/save-lgbmregressor-model-from-python-lightgbm-package-to-disc\nIt works for me, score does not change",
    "1128465": "Its not solely an issue of money for me, in my country, Tunisia, paypal or any sort of online payment in dollars is yet unavailable.",
    "1128766": "Thank you :)",
    "1141147": "Hi @amiiiney ! Did you eventually solve this? I am having the same problem and none of the above suggestions seem to work for me. Thanks!",
    "1141176": "Use the kaggle api to create a dataset -> upload files to your dataset -> import them from your notebook. \nAfter setting up the kaggle token, updating the database would only take one terminal command.\nThis worked like charm for me.",
    "1141214": "jpcpinto I was planning to update this post with the solution and got distracted with this final leaderboard race :) \nAs Abdessalem mentioned, you can upload the model directly from your GCP notebook to a kaggle dataset, you can find the solution in [this discussion post](https://www.kaggle.com/c/riiid-test-answer-prediction/discussion/208110#1135728). \n```\n#Downgrade your Kaggle API version, the latest version has a bug\npip install kaggle==1.5.4\n\n# Download your API token from your account and upload it to your notebook\n!mkdir ~/.kaggle\n!cp /home/kaggle.json ~/.kaggle/kaggle.json\n\n#Create a metadata file with this code and edit it with your dataset's name\n!kaggle datasets init -p /home/\n\n#After editing the metafile, create a dataset\n!kaggle datasets create -p /home/\n\n#Put your kaggle username / dataset name as you edited the metafile\n!kaggle datasets metadata -p . USERNAME/DATASET_NAME #(same as metafile)\n\n#Upload the model to your dataset\n!kaggle datasets version -p . -m \"Updates my model files\"\n```\n\nIf you get some unexpected bugs, let me know :)",
    "1141449": "Super awesome! It worked, thanks! Indeed there seems to be a problem with google cloud as it truncates files if they are \"manually\" downloaded",
    "1556813": "Hi @amiiiney , i want to upload models trained in local service to  kaggle dataset, , I try above process in anthor competition, but when i input   kaggle datasets init -p /home/ in my local terminal, it always shows\nValueError: Error: Missing username in configuration.\nCould you know how to solve this problem?  Thank you!",
    "1556862": "This problem has been solved. Thank you !   \n:)"
  },
  "source": "meta"
}