{
  "id": 180254,
  "title": "Why resample at prediction time?",
  "url": "/competitions/birdsong-recognition/discussion/180254",
  "author_name": "",
  "post_date": "2020-09-04T11:18:41.373932300Z",
  "votes": 7,
  "comment_count": 5,
  "views": 0,
  "content": "<p>Host wrote that test data is sampled at 32 kHz.  Why are most public notebooks resampling data instead of passing <code>sr=None</code>to librosa.load ?</p>\n<p>I prefer to ask before wasting one sub to test this.</p>\n<p>Edit: notebooks have an error if there is no explicit resampling, kudos to <a href=\"https://www.kaggle.com/jackvial\" target=\"_blank\">@jackvial</a> for sharing his experience, see his comment below.</p>",
  "messages": [
    {
      "id": "997961",
      "postDate": "09/04/2020 11:18:41",
      "content": "<p>Host wrote that test data is sampled at 32 kHz.  Why are most public notebooks resampling data instead of passing <code>sr=None</code>to librosa.load ?</p>\n<p>I prefer to ask before wasting one sub to test this.</p>\n<p>Edit: notebooks have an error if there is no explicit resampling, kudos to <a href=\"https://www.kaggle.com/jackvial\" target=\"_blank\">@jackvial</a> for sharing his experience, see his comment below.</p>",
      "rawMarkdown": "Host wrote that test data is sampled at 32 kHz.  Why are most public notebooks resampling data instead of passing `sr=None `to librosa.load ?\n\nI prefer to ask before wasting one sub to test this.\n\nEdit: notebooks have an error if there is no explicit resampling, kudos to @jackvial for sharing his experience, see his comment below.",
      "votes": null
    },
    {
      "id": "997970",
      "postDate": "09/04/2020 11:32:04",
      "content": "<p>Because 0.568 public notebook passes sr=32000, because making submission to this competition from scratch is hard, and because it is still fast enough to complete in time, so majority of the public notebooks just do not touch what is working.</p>\n<p>I changed resampling to kaiser_fast after checking that it is barely (~0.01% avg) changes predictions and i do not plan changing that part of the code anymore.</p>",
      "rawMarkdown": "Because 0.568 public notebook passes sr=32000, because making submission to this competition from scratch is hard, and because it is still fast enough to complete in time, so majority of the public notebooks just do not touch what is working.\n\nI changed resampling to kaiser_fast after checking that it is barely (~0.01% avg) changes predictions and i do not plan changing that part of the code anymore.",
      "votes": null
    },
    {
      "id": "998040",
      "postDate": "09/04/2020 12:59:49",
      "content": "<p>I changed <code>sr=None</code> on a previously working sub and it gave an error about 30 seconds in. Seems there are some files where the native sample rate is null.</p>\n<p>I've not read all the previous discusses about how the test set was prepared but I guess all the meta data was removed from the files to prevent leaks. Possibly the sampling rate metadata was also removed. </p>",
      "rawMarkdown": "I changed `sr=None` on a previously working sub and it gave an error about 30 seconds in. Seems there are some files where the native sample rate is null.\n\nI've not read all the previous discusses about how the test set was prepared but I guess all the meta data was removed from the files to prevent leaks. Possibly the sampling rate metadata was also removed.",
      "votes": null
    },
    {
      "id": "998052",
      "postDate": "09/04/2020 13:07:37",
      "content": "<p>Thanks.  I also had an error in my first sub, and I was not sure about the cause, but the error disappeared once I resampled.  I <a href=\"https://www.kaggle.com/c/birdsong-recognition/discussion/179253\" target=\"_blank\">asked the hosts to double check</a> and they did not respond, which is why i started a new topic.  Your answer closes it, thanks for that.</p>",
      "rawMarkdown": "Thanks.  I also had an error in my first sub, and I was not sure about the cause, but the error disappeared once I resampled.  I [asked the hosts to double check](https://www.kaggle.com/c/birdsong-recognition/discussion/179253) and they did not respond, which is why i started a new topic.  Your answer closes it, thanks for that.",
      "votes": null
    },
    {
      "id": "998087",
      "postDate": "09/04/2020 13:40:32",
      "content": "<p>No problem. It would be nice to get more clarity on how the test data was processed.</p>",
      "rawMarkdown": "No problem. It would be nice to get more clarity on how the test data was processed.",
      "votes": null
    },
    {
      "id": "998094",
      "postDate": "09/04/2020 13:49:26",
      "content": "<p>host described what they did in the other thread I link to.  But I am pretty sure something else was done given the sr in files is not always 32 kHz.  I don't know why they don't answer properly.  So be it.</p>",
      "rawMarkdown": "host described what they did in the other thread I link to.  But I am pretty sure something else was done given the sr in files is not always 32 kHz.  I don't know why they don't answer properly.  So be it.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 997970,
      "author_name": "fffrrt",
      "author_url": "",
      "post_date": "09/04/2020 11:32:04",
      "content": "<p>Because 0.568 public notebook passes sr=32000, because making submission to this competition from scratch is hard, and because it is still fast enough to complete in time, so majority of the public notebooks just do not touch what is working.</p>\n<p>I changed resampling to kaiser_fast after checking that it is barely (~0.01% avg) changes predictions and i do not plan changing that part of the code anymore.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 998040,
      "author_name": "jackvial",
      "author_url": "",
      "post_date": "09/04/2020 12:59:49",
      "content": "<p>I changed <code>sr=None</code> on a previously working sub and it gave an error about 30 seconds in. Seems there are some files where the native sample rate is null.</p>\n<p>I've not read all the previous discusses about how the test set was prepared but I guess all the meta data was removed from the files to prevent leaks. Possibly the sampling rate metadata was also removed. </p>",
      "votes": null,
      "replies": [
        {
          "id": 998052,
          "author_name": "cpmpml",
          "author_url": "",
          "post_date": "09/04/2020 13:07:37",
          "content": "<p>Thanks.  I also had an error in my first sub, and I was not sure about the cause, but the error disappeared once I resampled.  I <a href=\"https://www.kaggle.com/c/birdsong-recognition/discussion/179253\" target=\"_blank\">asked the hosts to double check</a> and they did not respond, which is why i started a new topic.  Your answer closes it, thanks for that.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 998087,
          "author_name": "jackvial",
          "author_url": "",
          "post_date": "09/04/2020 13:40:32",
          "content": "<p>No problem. It would be nice to get more clarity on how the test data was processed.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 998094,
          "author_name": "cpmpml",
          "author_url": "",
          "post_date": "09/04/2020 13:49:26",
          "content": "<p>host described what they did in the other thread I link to.  But I am pretty sure something else was done given the sr in files is not always 32 kHz.  I don't know why they don't answer properly.  So be it.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "997961": "Host wrote that test data is sampled at 32 kHz.  Why are most public notebooks resampling data instead of passing `sr=None `to librosa.load ?\n\nI prefer to ask before wasting one sub to test this.\n\nEdit: notebooks have an error if there is no explicit resampling, kudos to @jackvial for sharing his experience, see his comment below.",
    "997970": "Because 0.568 public notebook passes sr=32000, because making submission to this competition from scratch is hard, and because it is still fast enough to complete in time, so majority of the public notebooks just do not touch what is working.\n\nI changed resampling to kaiser_fast after checking that it is barely (~0.01% avg) changes predictions and i do not plan changing that part of the code anymore.",
    "998040": "I changed `sr=None` on a previously working sub and it gave an error about 30 seconds in. Seems there are some files where the native sample rate is null.\n\nI've not read all the previous discusses about how the test set was prepared but I guess all the meta data was removed from the files to prevent leaks. Possibly the sampling rate metadata was also removed.",
    "998052": "Thanks.  I also had an error in my first sub, and I was not sure about the cause, but the error disappeared once I resampled.  I [asked the hosts to double check](https://www.kaggle.com/c/birdsong-recognition/discussion/179253) and they did not respond, which is why i started a new topic.  Your answer closes it, thanks for that.",
    "998087": "No problem. It would be nice to get more clarity on how the test data was processed.",
    "998094": "host described what they did in the other thread I link to.  But I am pretty sure something else was done given the sr in files is not always 32 kHz.  I don't know why they don't answer properly.  So be it."
  },
  "source": "meta"
}