{
  "id": 448402,
  "title": "Help! Adding new features",
  "url": "/competitions/predict-ai-model-runtime/discussion/448402",
  "author_name": "",
  "post_date": "2023-10-19T14:18:56.040874600Z",
  "votes": 3,
  "comment_count": 4,
  "views": 0,
  "content": "<p>After spending few hours on reading the code shared on <a href=\"https://github.com/google-research-datasets/tpu_graphs\" target=\"_blank\">github</a>, I found that maybe the main point is in the file 'featurizers.h' function 'FeaturizeHloInstruction'</p>\n<pre><code>FEATURIZE_FUNCTION_PAIR_2ARG(\n    FeaturizeHloInstruction, HloInstructionProto, HloComputationProto, {\n      \n      \n     ..\n</code></pre>\n<p>But when I add some code in it, for example, I pick out the code <code>out-&gt;push_back(FEATURIZE_SWITCH( \"indices_are_sorted\", source1.indices_are_sorted() ? 1. : 0.));</code> from the 'if' section. I got an error <code>\nF tpu_graphs/process_data/xla/hlo_encoder.cc:144] Check failed: values_added_ &lt; out_values_-&gt;NumElements() (5646480 vs. 5646480)\n</code></p>",
  "messages": [
    {
      "id": "2488816",
      "postDate": "10/19/2023 14:18:56",
      "content": "<p>After spending few hours on reading the code shared on <a href=\"https://github.com/google-research-datasets/tpu_graphs\" target=\"_blank\">github</a>, I found that maybe the main point is in the file 'featurizers.h' function 'FeaturizeHloInstruction'</p>\n<pre><code>FEATURIZE_FUNCTION_PAIR_2ARG(\n    FeaturizeHloInstruction, HloInstructionProto, HloComputationProto, {\n      \n      \n     ..\n</code></pre>\n<p>But when I add some code in it, for example, I pick out the code <code>out-&gt;push_back(FEATURIZE_SWITCH( \"indices_are_sorted\", source1.indices_are_sorted() ? 1. : 0.));</code> from the 'if' section. I got an error <code>\nF tpu_graphs/process_data/xla/hlo_encoder.cc:144] Check failed: values_added_ &lt; out_values_-&gt;NumElements() (5646480 vs. 5646480)\n</code></p>",
      "rawMarkdown": "After spending few hours on reading the code shared on [github](https://github.com/google-research-datasets/tpu_graphs), I found that maybe the main point is in the file 'featurizers.h' function 'FeaturizeHloInstruction'\n```\nFEATURIZE_FUNCTION_PAIR_2ARG(\n    FeaturizeHloInstruction, HloInstructionProto, HloComputationProto, {\n      // Add a feature to indicate whether or not this instruction is the\n      // computation's root instruction\n     .....\n```\nBut when I add some code in it, for example, I pick out the code `out->push_back(FEATURIZE_SWITCH( \"indices_are_sorted\", source1.indices_are_sorted() ? 1. : 0.));` from the 'if' section. I got an error `\nF tpu_graphs/process_data/xla/hlo_encoder.cc:144] Check failed: values_added_ < out_values_->NumElements() (5646480 vs. 5646480)\n`",
      "votes": null
    },
    {
      "id": "2492829",
      "postDate": "10/22/2023 23:35:26",
      "content": "<p>You also need to modify the node feature size to match the change here: <a href=\"https://github.com/google-research-datasets/tpu_graphs/blob/main/tpu_graphs/process_data/xla/hlo_opcode.h#L33\" target=\"_blank\">https://github.com/google-research-datasets/tpu_graphs/blob/main/tpu_graphs/process_data/xla/hlo_opcode.h#L33</a></p>",
      "rawMarkdown": "You also need to modify the node feature size to match the change here: https://github.com/google-research-datasets/tpu_graphs/blob/main/tpu_graphs/process_data/xla/hlo_opcode.h#L33",
      "votes": null
    },
    {
      "id": "2493259",
      "postDate": "10/23/2023 08:57:33",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/tonyarobertson\" target=\"_blank\">@tonyarobertson</a>, I first came across you guys during the LLM competition and, honestly, I felt a bit gutted about how things turned out for you there. However, I've seen that the Avengers have bounced back remarkably in just a few days in this competition. Massive congrats on that! Did you manage to integrate some new features into your strategy?</p>",
      "rawMarkdown": "Hi @tonyarobertson, I first came across you guys during the LLM competition and, honestly, I felt a bit gutted about how things turned out for you there. However, I've seen that the Avengers have bounced back remarkably in just a few days in this competition. Massive congrats on that! Did you manage to integrate some new features into your strategy?",
      "votes": null
    },
    {
      "id": "2493694",
      "postDate": "10/23/2023 14:26:12",
      "content": "<p>Thanks to your kind word. We have not tried to train any model based on additional features. Maybe we will try it later.</p>",
      "rawMarkdown": "Thanks to your kind word. We have not tried to train any model based on additional features. Maybe we will try it later.",
      "votes": null
    },
    {
      "id": "2493709",
      "postDate": "10/23/2023 14:30:25",
      "content": "<p>Thanks. We are still in the process of boosting LB scores for the original features. But new features have been extracted and may be used in the future.</p>",
      "rawMarkdown": "Thanks. We are still in the process of boosting LB scores for the original features. But new features have been extracted and may be used in the future.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2492829,
      "author_name": "mangpophothilimthana",
      "author_url": "",
      "post_date": "10/22/2023 23:35:26",
      "content": "<p>You also need to modify the node feature size to match the change here: <a href=\"https://github.com/google-research-datasets/tpu_graphs/blob/main/tpu_graphs/process_data/xla/hlo_opcode.h#L33\" target=\"_blank\">https://github.com/google-research-datasets/tpu_graphs/blob/main/tpu_graphs/process_data/xla/hlo_opcode.h#L33</a></p>",
      "votes": null,
      "replies": [
        {
          "id": 2493709,
          "author_name": "rdxsun",
          "author_url": "",
          "post_date": "10/23/2023 14:30:25",
          "content": "<p>Thanks. We are still in the process of boosting LB scores for the original features. But new features have been extracted and may be used in the future.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 2493259,
      "author_name": "chitra077",
      "author_url": "",
      "post_date": "10/23/2023 08:57:33",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/tonyarobertson\" target=\"_blank\">@tonyarobertson</a>, I first came across you guys during the LLM competition and, honestly, I felt a bit gutted about how things turned out for you there. However, I've seen that the Avengers have bounced back remarkably in just a few days in this competition. Massive congrats on that! Did you manage to integrate some new features into your strategy?</p>",
      "votes": null,
      "replies": [
        {
          "id": 2493694,
          "author_name": "tonyarobertson",
          "author_url": "",
          "post_date": "10/23/2023 14:26:12",
          "content": "<p>Thanks to your kind word. We have not tried to train any model based on additional features. Maybe we will try it later.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2488816": "After spending few hours on reading the code shared on [github](https://github.com/google-research-datasets/tpu_graphs), I found that maybe the main point is in the file 'featurizers.h' function 'FeaturizeHloInstruction'\n```\nFEATURIZE_FUNCTION_PAIR_2ARG(\n    FeaturizeHloInstruction, HloInstructionProto, HloComputationProto, {\n      // Add a feature to indicate whether or not this instruction is the\n      // computation's root instruction\n     .....\n```\nBut when I add some code in it, for example, I pick out the code `out->push_back(FEATURIZE_SWITCH( \"indices_are_sorted\", source1.indices_are_sorted() ? 1. : 0.));` from the 'if' section. I got an error `\nF tpu_graphs/process_data/xla/hlo_encoder.cc:144] Check failed: values_added_ < out_values_->NumElements() (5646480 vs. 5646480)\n`",
    "2492829": "You also need to modify the node feature size to match the change here: https://github.com/google-research-datasets/tpu_graphs/blob/main/tpu_graphs/process_data/xla/hlo_opcode.h#L33",
    "2493259": "Hi @tonyarobertson, I first came across you guys during the LLM competition and, honestly, I felt a bit gutted about how things turned out for you there. However, I've seen that the Avengers have bounced back remarkably in just a few days in this competition. Massive congrats on that! Did you manage to integrate some new features into your strategy?",
    "2493694": "Thanks to your kind word. We have not tried to train any model based on additional features. Maybe we will try it later.",
    "2493709": "Thanks. We are still in the process of boosting LB scores for the original features. But new features have been extracted and may be used in the future."
  },
  "source": "meta"
}