{
  "id": 179928,
  "title": "Need help with PyTorch Pfn extras (PPE)",
  "url": "/competitions/birdsong-recognition/discussion/179928",
  "author_name": "",
  "post_date": "2020-09-03T09:25:31.348081500Z",
  "votes": 3,
  "comment_count": 3,
  "views": 0,
  "content": "<p>In many popular kernels here, the authors are using PPE. </p>\n<p>In normal PyTorch, to call Data-Aug transforms, I would write:<br>\n    dataset_train = myDataset(df_train,   transform=transforms_train)<br>\n    dataset_valid = myDataset(df_valid,   transform=transforms_val)</p>\n<h1>In PPE, I tried without success :</h1>\n<p>settings_str = \"\"\"<br>\ndataset:<br>\n  name: SpectrogramDataset<br>\n  params:<br>\n    waveform_transforms : get_train_transforms() &lt;--- add transform here ?<br>\n    img_size: 224<br>\n    melspectrogram_parameters:<br>\n      n_mels: 128<br>\n      fmin: 20<br>\n      fmax: 16000</p>\n<p>How do I pass a function using the PPE settings ?<br>\ncheers<br>\nsid</p>",
  "messages": [
    {
      "id": "996420",
      "postDate": "09/03/2020 09:25:31",
      "content": "<p>In many popular kernels here, the authors are using PPE. </p>\n<p>In normal PyTorch, to call Data-Aug transforms, I would write:<br>\n    dataset_train = myDataset(df_train,   transform=transforms_train)<br>\n    dataset_valid = myDataset(df_valid,   transform=transforms_val)</p>\n<h1>In PPE, I tried without success :</h1>\n<p>settings_str = \"\"\"<br>\ndataset:<br>\n  name: SpectrogramDataset<br>\n  params:<br>\n    waveform_transforms : get_train_transforms() &lt;--- add transform here ?<br>\n    img_size: 224<br>\n    melspectrogram_parameters:<br>\n      n_mels: 128<br>\n      fmin: 20<br>\n      fmax: 16000</p>\n<p>How do I pass a function using the PPE settings ?<br>\ncheers<br>\nsid</p>",
      "rawMarkdown": "In many popular kernels here, the authors are using PPE. \n\nIn normal PyTorch, to call Data-Aug transforms, I would write:\n    dataset_train = myDataset(df_train,   transform=transforms_train)\n    dataset_valid = myDataset(df_valid,   transform=transforms_val)\n\nIn PPE, I tried without success :\n===============================================\nsettings_str = \"\"\"\ndataset:\n  name: SpectrogramDataset\n  params:\n    waveform_transforms : get_train_transforms() <--- add transform here ?\n    img_size: 224\n    melspectrogram_parameters:\n      n_mels: 128\n      fmin: 20\n      fmax: 16000\n\nHow do I pass a function using the PPE settings ?\ncheers\nsid",
      "votes": null
    },
    {
      "id": "997714",
      "postDate": "09/04/2020 07:36:18",
      "content": "<p>Not directly related, but maybe the below will help you.</p>\n<p>The public notebooks are really good but I found Pfnextras to be rather cumbersome to use.<br>\nI refactored the complete code by removing Pfn extras and was able to work much faster and with a lot of control. </p>",
      "rawMarkdown": "Not directly related, but maybe the below will help you.\n\nThe public notebooks are really good but I found Pfnextras to be rather cumbersome to use.\nI refactored the complete code by removing Pfn extras and was able to work much faster and with a lot of control.",
      "votes": null
    },
    {
      "id": "997725",
      "postDate": "09/04/2020 07:49:23",
      "content": "<p>Thanks, I was planning to do the same, but there is only 1 week left in competiton…</p>",
      "rawMarkdown": "Thanks, I was planning to do the same, but there is only 1 week left in competiton...",
      "votes": null
    },
    {
      "id": "997742",
      "postDate": "09/04/2020 08:08:04",
      "content": "<p>12 days :) <br>\nIt took me a day to refactor everything, but now i can experiment faster without worrying about how or what Pfnextras does.</p>",
      "rawMarkdown": "12 days :) \nIt took me a day to refactor everything, but now i can experiment faster without worrying about how or what Pfnextras does.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 997714,
      "author_name": "watzisname",
      "author_url": "",
      "post_date": "09/04/2020 07:36:18",
      "content": "<p>Not directly related, but maybe the below will help you.</p>\n<p>The public notebooks are really good but I found Pfnextras to be rather cumbersome to use.<br>\nI refactored the complete code by removing Pfn extras and was able to work much faster and with a lot of control. </p>",
      "votes": null,
      "replies": [
        {
          "id": 997725,
          "author_name": "sidneyng",
          "author_url": "",
          "post_date": "09/04/2020 07:49:23",
          "content": "<p>Thanks, I was planning to do the same, but there is only 1 week left in competiton…</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 997742,
          "author_name": "watzisname",
          "author_url": "",
          "post_date": "09/04/2020 08:08:04",
          "content": "<p>12 days :) <br>\nIt took me a day to refactor everything, but now i can experiment faster without worrying about how or what Pfnextras does.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "996420": "In many popular kernels here, the authors are using PPE. \n\nIn normal PyTorch, to call Data-Aug transforms, I would write:\n    dataset_train = myDataset(df_train,   transform=transforms_train)\n    dataset_valid = myDataset(df_valid,   transform=transforms_val)\n\nIn PPE, I tried without success :\n===============================================\nsettings_str = \"\"\"\ndataset:\n  name: SpectrogramDataset\n  params:\n    waveform_transforms : get_train_transforms() <--- add transform here ?\n    img_size: 224\n    melspectrogram_parameters:\n      n_mels: 128\n      fmin: 20\n      fmax: 16000\n\nHow do I pass a function using the PPE settings ?\ncheers\nsid",
    "997714": "Not directly related, but maybe the below will help you.\n\nThe public notebooks are really good but I found Pfnextras to be rather cumbersome to use.\nI refactored the complete code by removing Pfn extras and was able to work much faster and with a lot of control.",
    "997725": "Thanks, I was planning to do the same, but there is only 1 week left in competiton...",
    "997742": "12 days :) \nIt took me a day to refactor everything, but now i can experiment faster without worrying about how or what Pfnextras does."
  },
  "source": "meta"
}