{
  "id": 303021,
  "title": "How to reset test env",
  "url": "/competitions/tensorflow-great-barrier-reef/discussion/303021",
  "author_name": "",
  "post_date": "2022-01-25T13:32:59.447877500Z",
  "votes": 1,
  "comment_count": 8,
  "views": 0,
  "content": "<p>When initializing test env, we can use below, but how do I reset env?<br>\nI sometimes want to rerun test codes without reset session.</p>\n<pre><code>import greatbarrierreef\n\nenv = greatbarrierreef.make_env()\niter_test = env.iter_test()\n</code></pre>",
  "messages": [
    {
      "id": "1663838",
      "postDate": "01/25/2022 13:32:59",
      "content": "<p>When initializing test env, we can use below, but how do I reset env?<br>\nI sometimes want to rerun test codes without reset session.</p>\n<pre><code>import greatbarrierreef\n\nenv = greatbarrierreef.make_env()\niter_test = env.iter_test()\n</code></pre>",
      "rawMarkdown": "When initializing test env, we can use below, but how do I reset env?\nI sometimes want to rerun test codes without reset session.\n\n```\nimport greatbarrierreef\n\nenv = greatbarrierreef.make_env()\niter_test = env.iter_test()\n```",
      "votes": null
    },
    {
      "id": "1663841",
      "postDate": "01/25/2022 13:34:29",
      "content": "<p>env.reset() did not work.</p>",
      "rawMarkdown": "env.reset() did not work.",
      "votes": null
    },
    {
      "id": "1663872",
      "postDate": "01/25/2022 13:57:47",
      "content": "<p></p>\n<blockquote>\n  <p>without reset session.</p>\n</blockquote>\n<p>Sorry, you don’t want to restart.</p>",
      "rawMarkdown": "~~Just restart notebook.\nI’m always doing so.~~\n\n> without reset session.\n\nSorry, you don’t want to restart.",
      "votes": null
    },
    {
      "id": "1663877",
      "postDate": "01/25/2022 14:00:22",
      "content": "<p>i think you can click ‘’start session‘’  and \"stop session\"button  left top. wish help you..</p>",
      "rawMarkdown": "i think you can click ‘’start session‘’  and \"stop session\"button  left top. wish help you..",
      "votes": null
    },
    {
      "id": "1663882",
      "postDate": "01/25/2022 14:03:13",
      "content": "<p>I think all Kagglers don’t know more than the information we are provided.<br>\nWhy don’t you ask Kaggle staff about this?</p>",
      "rawMarkdown": "I think all Kagglers don’t know more than the information we are provided.\nWhy don’t you ask Kaggle staff about this?",
      "votes": null
    },
    {
      "id": "1663996",
      "postDate": "01/25/2022 16:05:11",
      "content": "<p>You can try:</p>\n<pre><code>import gc\n\ndel env\n\ngc.collect()\n</code></pre>",
      "rawMarkdown": "You can try:\n\n````\nimport gc\n\ndel env\n\ngc.collect()\n````",
      "votes": null
    },
    {
      "id": "1665106",
      "postDate": "01/26/2022 15:20:51",
      "content": "<p>Thank you for comment, but I got below.<br>\n<code>Exception: You can only call `make_env()` once.</code></p>",
      "rawMarkdown": "Thank you for comment, but I got below.\n````Exception: You can only call `make_env()` once.````",
      "votes": null
    },
    {
      "id": "1665151",
      "postDate": "01/26/2022 16:06:24",
      "content": "<p><a href=\"https://www.kaggle.com/yoshito\" target=\"_blank\">@yoshito</a> we disallow resetting the env within a session because it would allow peeking forward in time (i.e. you could just loop through and save all the data, then reset it and loop again).</p>",
      "rawMarkdown": "yoshito we disallow resetting the env within a session because it would allow peeking forward in time (i.e. you could just loop through and save all the data, then reset it and loop again).",
      "votes": null
    },
    {
      "id": "1683014",
      "postDate": "02/09/2022 14:08:11",
      "content": "<p><a href=\"https://www.kaggle.com/wcukierski\" target=\"_blank\">@wcukierski</a> Thank you for reply!</p>",
      "rawMarkdown": "wcukierski Thank you for reply!",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1663841,
      "author_name": "yoshito",
      "author_url": "",
      "post_date": "01/25/2022 13:34:29",
      "content": "<p>env.reset() did not work.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1663872,
      "author_name": "tatamikenn",
      "author_url": "",
      "post_date": "01/25/2022 13:57:47",
      "content": "<p></p>\n<blockquote>\n  <p>without reset session.</p>\n</blockquote>\n<p>Sorry, you don’t want to restart.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1663882,
          "author_name": "tatamikenn",
          "author_url": "",
          "post_date": "01/25/2022 14:03:13",
          "content": "<p>I think all Kagglers don’t know more than the information we are provided.<br>\nWhy don’t you ask Kaggle staff about this?</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1663877,
      "author_name": "junyun1002",
      "author_url": "",
      "post_date": "01/25/2022 14:00:22",
      "content": "<p>i think you can click ‘’start session‘’  and \"stop session\"button  left top. wish help you..</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1663996,
      "author_name": "henriqueabpassos",
      "author_url": "",
      "post_date": "01/25/2022 16:05:11",
      "content": "<p>You can try:</p>\n<pre><code>import gc\n\ndel env\n\ngc.collect()\n</code></pre>",
      "votes": null,
      "replies": [
        {
          "id": 1665106,
          "author_name": "yoshito",
          "author_url": "",
          "post_date": "01/26/2022 15:20:51",
          "content": "<p>Thank you for comment, but I got below.<br>\n<code>Exception: You can only call `make_env()` once.</code></p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1665151,
      "author_name": "wcukierski",
      "author_url": "",
      "post_date": "01/26/2022 16:06:24",
      "content": "<p><a href=\"https://www.kaggle.com/yoshito\" target=\"_blank\">@yoshito</a> we disallow resetting the env within a session because it would allow peeking forward in time (i.e. you could just loop through and save all the data, then reset it and loop again).</p>",
      "votes": null,
      "replies": [
        {
          "id": 1683014,
          "author_name": "yoshito",
          "author_url": "",
          "post_date": "02/09/2022 14:08:11",
          "content": "<p><a href=\"https://www.kaggle.com/wcukierski\" target=\"_blank\">@wcukierski</a> Thank you for reply!</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1663838": "When initializing test env, we can use below, but how do I reset env?\nI sometimes want to rerun test codes without reset session.\n\n```\nimport greatbarrierreef\n\nenv = greatbarrierreef.make_env()\niter_test = env.iter_test()\n```",
    "1663841": "env.reset() did not work.",
    "1663872": "~~Just restart notebook.\nI’m always doing so.~~\n\n> without reset session.\n\nSorry, you don’t want to restart.",
    "1663877": "i think you can click ‘’start session‘’  and \"stop session\"button  left top. wish help you..",
    "1663882": "I think all Kagglers don’t know more than the information we are provided.\nWhy don’t you ask Kaggle staff about this?",
    "1663996": "You can try:\n\n````\nimport gc\n\ndel env\n\ngc.collect()\n````",
    "1665106": "Thank you for comment, but I got below.\n````Exception: You can only call `make_env()` once.````",
    "1665151": "yoshito we disallow resetting the env within a session because it would allow peeking forward in time (i.e. you could just loop through and save all the data, then reset it and loop again).",
    "1683014": "wcukierski Thank you for reply!"
  },
  "source": "meta"
}