{
  "id": 551725,
  "title": "Weird debugging situation",
  "url": "/competitions/czii-cryo-et-object-identification/discussion/551725",
  "author_name": "",
  "post_date": "2024-12-15T03:38:23.786448200Z",
  "votes": 1,
  "comment_count": 4,
  "views": 0,
  "content": "<p>Hi, I've been trying to debug my code many times. The code always run against local test but crashes close to the end against hidden. By slow try and repeat I've found the line responsable, I cannot imagine in what situation that line could derive into an error. The thing is that even try/except doesnt work. Any ideas?</p>\n<p>EDIT: To be more explicit I'm only tryng to do a refinement over firsts predictions. First predictions are by batches</p>\n<p>p = stats['centroids'][1:][kk<em>64:(kk+1)</em>64]</p>\n<p>Then I generate a mask of tp, and from it I refine first predictions</p>\n<p>preds = 10*p[tp.cpu()]</p>\n<p>Apparently is that the line responsable. If I comment it and simply run</p>\n<p>preds = 10*p</p>\n<p>everything works.</p>",
  "messages": [
    {
      "id": "3072333",
      "postDate": "12/15/2024 03:38:23",
      "content": "<p>Hi, I've been trying to debug my code many times. The code always run against local test but crashes close to the end against hidden. By slow try and repeat I've found the line responsable, I cannot imagine in what situation that line could derive into an error. The thing is that even try/except doesnt work. Any ideas?</p>\n<p>EDIT: To be more explicit I'm only tryng to do a refinement over firsts predictions. First predictions are by batches</p>\n<p>p = stats['centroids'][1:][kk<em>64:(kk+1)</em>64]</p>\n<p>Then I generate a mask of tp, and from it I refine first predictions</p>\n<p>preds = 10*p[tp.cpu()]</p>\n<p>Apparently is that the line responsable. If I comment it and simply run</p>\n<p>preds = 10*p</p>\n<p>everything works.</p>",
      "rawMarkdown": "Hi, I've been trying to debug my code many times. The code always run against local test but crashes close to the end against hidden. By slow try and repeat I've found the line responsable, I cannot imagine in what situation that line could derive into an error. The thing is that even try/except doesnt work. Any ideas?\n\nEDIT: To be more explicit I'm only tryng to do a refinement over firsts predictions. First predictions are by batches\n\np = stats['centroids'][1:][kk*64:(kk+1)*64]\n\nThen I generate a mask of tp, and from it I refine first predictions\n\npreds = 10*p[tp.cpu()]\n\nApparently is that the line responsable. If I comment it and simply run\n\npreds = 10*p\n\neverything works.",
      "votes": null
    },
    {
      "id": "3072354",
      "postDate": "12/15/2024 04:17:40",
      "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8722753%2F5c3b811059b385955e448bc981431cbe%2FGemini.png?generation=1734236258771444&amp;alt=media\" alt=\"\"></p>\n<p>EDIT: Las night I was tired but now I think that's not a problem. With all False tp preds would be an empty array, without crashing. Would be?</p>",
      "rawMarkdown": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8722753%2F5c3b811059b385955e448bc981431cbe%2FGemini.png?generation=1734236258771444&alt=media)\n\nEDIT: Las night I was tired but now I think that's not a problem. With all False tp preds would be an empty array, without crashing. Would be?",
      "votes": null
    },
    {
      "id": "3072460",
      "postDate": "12/15/2024 08:26:34",
      "content": "<p>\", I cannot imagine in what situation …\"<br>\ndon't have to imagine, just print it</p>\n<pre><code>\n)\npreds = *\n</code></pre>\n<p>in fact you can save tp for further investigation.</p>",
      "rawMarkdown": "\", I cannot imagine in what situation ...\"\ndon't have to imagine, just print it\n\n\n\n```\nprint(tp)\nprint(tp.cpu())\npreds = 10*p[tp.cpu()]\n\n```\n\nin fact you can save tp for further investigation.",
      "votes": null
    },
    {
      "id": "3072588",
      "postDate": "12/15/2024 12:18:33",
      "content": "<p>Thanks for the answer. But I can't print hidden execution.</p>\n<p>In local tp is in fact a boolean tensor (0,64] long that takes a subset of the corresponding initial p. I've tried to force in local all False, single False, single True…  trying to replicate whathever is causing hidden to crash. But nothing. May be that line is the cause, but crash is happening somewhere else after. May be when I collect the predictions with how I was doing it. In a few hours I'll know it.</p>",
      "rawMarkdown": "Thanks for the answer. But I can't print hidden execution.\n\nIn local tp is in fact a boolean tensor (0,64] long that takes a subset of the corresponding initial p. I've tried to force in local all False, single False, single True...  trying to replicate whathever is causing hidden to crash. But nothing. May be that line is the cause, but crash is happening somewhere else after. May be when I collect the predictions with how I was doing it. In a few hours I'll know it.",
      "votes": null
    },
    {
      "id": "3072606",
      "postDate": "12/15/2024 12:47:14",
      "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8722753%2F4bd4b6464d07e461da498e70bff02bd1%2Fcrash.png?generation=1734266832309896&amp;alt=media\" alt=\"\"></p>\n<p>A 1 boolean() long True is interpreted as a single long() beign 1. I have something.</p>",
      "rawMarkdown": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8722753%2F4bd4b6464d07e461da498e70bff02bd1%2Fcrash.png?generation=1734266832309896&alt=media)\n\nA 1 boolean() long True is interpreted as a single long() beign 1. I have something.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 3072354,
      "author_name": "sacuscreed",
      "author_url": "",
      "post_date": "12/15/2024 04:17:40",
      "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8722753%2F5c3b811059b385955e448bc981431cbe%2FGemini.png?generation=1734236258771444&amp;alt=media\" alt=\"\"></p>\n<p>EDIT: Las night I was tired but now I think that's not a problem. With all False tp preds would be an empty array, without crashing. Would be?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 3072460,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "12/15/2024 08:26:34",
      "content": "<p>\", I cannot imagine in what situation …\"<br>\ndon't have to imagine, just print it</p>\n<pre><code>\n)\npreds = *\n</code></pre>\n<p>in fact you can save tp for further investigation.</p>",
      "votes": null,
      "replies": [
        {
          "id": 3072588,
          "author_name": "sacuscreed",
          "author_url": "",
          "post_date": "12/15/2024 12:18:33",
          "content": "<p>Thanks for the answer. But I can't print hidden execution.</p>\n<p>In local tp is in fact a boolean tensor (0,64] long that takes a subset of the corresponding initial p. I've tried to force in local all False, single False, single True…  trying to replicate whathever is causing hidden to crash. But nothing. May be that line is the cause, but crash is happening somewhere else after. May be when I collect the predictions with how I was doing it. In a few hours I'll know it.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 3072606,
      "author_name": "sacuscreed",
      "author_url": "",
      "post_date": "12/15/2024 12:47:14",
      "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8722753%2F4bd4b6464d07e461da498e70bff02bd1%2Fcrash.png?generation=1734266832309896&amp;alt=media\" alt=\"\"></p>\n<p>A 1 boolean() long True is interpreted as a single long() beign 1. I have something.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "3072333": "Hi, I've been trying to debug my code many times. The code always run against local test but crashes close to the end against hidden. By slow try and repeat I've found the line responsable, I cannot imagine in what situation that line could derive into an error. The thing is that even try/except doesnt work. Any ideas?\n\nEDIT: To be more explicit I'm only tryng to do a refinement over firsts predictions. First predictions are by batches\n\np = stats['centroids'][1:][kk*64:(kk+1)*64]\n\nThen I generate a mask of tp, and from it I refine first predictions\n\npreds = 10*p[tp.cpu()]\n\nApparently is that the line responsable. If I comment it and simply run\n\npreds = 10*p\n\neverything works.",
    "3072354": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8722753%2F5c3b811059b385955e448bc981431cbe%2FGemini.png?generation=1734236258771444&alt=media)\n\nEDIT: Las night I was tired but now I think that's not a problem. With all False tp preds would be an empty array, without crashing. Would be?",
    "3072460": "\", I cannot imagine in what situation ...\"\ndon't have to imagine, just print it\n\n\n\n```\nprint(tp)\nprint(tp.cpu())\npreds = 10*p[tp.cpu()]\n\n```\n\nin fact you can save tp for further investigation.",
    "3072588": "Thanks for the answer. But I can't print hidden execution.\n\nIn local tp is in fact a boolean tensor (0,64] long that takes a subset of the corresponding initial p. I've tried to force in local all False, single False, single True...  trying to replicate whathever is causing hidden to crash. But nothing. May be that line is the cause, but crash is happening somewhere else after. May be when I collect the predictions with how I was doing it. In a few hours I'll know it.",
    "3072606": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8722753%2F4bd4b6464d07e461da498e70bff02bd1%2Fcrash.png?generation=1734266832309896&alt=media)\n\nA 1 boolean() long True is interpreted as a single long() beign 1. I have something."
  },
  "source": "meta"
}