{
  "id": 139325,
  "title": "Error in Submission",
  "url": "/competitions/deepfake-detection-challenge/discussion/139325",
  "author_name": "",
  "post_date": "2020-03-28T11:51:14.787645500Z",
  "votes": 2,
  "comment_count": 7,
  "views": 0,
  "content": "<p>df_test = pd.DataFrame(columns=['filename','label'])\ndf_test['filename']=os.listdir(('../input/deepfake-detection-challenge/test_videos/'))\ndf_test['label']=0.5\ndf_test['label'] = predictions\ndf_test.to_csv('submission.csv',index=False)</p>\n\n<p>Above is my code for submission, the problem which I was initially facing was that when I was committing everything was working fine and the correct submission.csv file was created but when I uploaded my notebook to the server, it said \"submission.csv not found.\"</p>\n\n<p>Then, I changed my code as above, now it is showing me the results as the whole predictions just went 0.5 which is a score of \"0.69314\", it looks like my predictions are not getting added on the server which is not the case when I am committing in the kernel. </p>\n\n<p>Now, after again some changes it is saying \"submission scoring error\" , I am unable to submit my solution from the past 2 days now and the deadline is also near. I'll be really thankful if some of you could help me or guide me in what I'm doing wrong.</p>",
  "messages": [
    {
      "id": "789108",
      "postDate": "03/28/2020 11:51:14",
      "content": "<p>df_test = pd.DataFrame(columns=['filename','label'])\ndf_test['filename']=os.listdir(('../input/deepfake-detection-challenge/test_videos/'))\ndf_test['label']=0.5\ndf_test['label'] = predictions\ndf_test.to_csv('submission.csv',index=False)</p>\n\n<p>Above is my code for submission, the problem which I was initially facing was that when I was committing everything was working fine and the correct submission.csv file was created but when I uploaded my notebook to the server, it said \"submission.csv not found.\"</p>\n\n<p>Then, I changed my code as above, now it is showing me the results as the whole predictions just went 0.5 which is a score of \"0.69314\", it looks like my predictions are not getting added on the server which is not the case when I am committing in the kernel. </p>\n\n<p>Now, after again some changes it is saying \"submission scoring error\" , I am unable to submit my solution from the past 2 days now and the deadline is also near. I'll be really thankful if some of you could help me or guide me in what I'm doing wrong.</p>",
      "rawMarkdown": "df_test = pd.DataFrame(columns=['filename','label'])\ndf_test['filename']=os.listdir(('../input/deepfake-detection-challenge/test_videos/'))\ndf_test['label']=0.5\ndf_test['label'] = predictions\ndf_test.to_csv('submission.csv',index=False)\n\n\nAbove is my code for submission, the problem which I was initially facing was that when I was committing everything was working fine and the correct submission.csv file was created but when I uploaded my notebook to the server, it said \"submission.csv not found.\"\n\nThen, I changed my code as above, now it is showing me the results as the whole predictions just went 0.5 which is a score of \"0.69314\", it looks like my predictions are not getting added on the server which is not the case when I am committing in the kernel. \n\nNow, after again some changes it is saying \"submission scoring error\" , I am unable to submit my solution from the past 2 days now and the deadline is also near. I'll be really thankful if some of you could help me or guide me in what I'm doing wrong.",
      "votes": null
    },
    {
      "id": "789225",
      "postDate": "03/28/2020 13:36:01",
      "content": "<p>maybe you model did not run sucessful due to memory issue or something, you should check 'Notebooks' tab, you can find many useful demo there</p>",
      "rawMarkdown": "maybe you model did not run sucessful due to memory issue or something, you should check 'Notebooks' tab, you can find many useful demo there",
      "votes": null
    },
    {
      "id": "789291",
      "postDate": "03/28/2020 14:30:29",
      "content": "<p>Thank you for your response ! \nbut the predictions are coming fine in the csv file created after committing, I don't seem to understand why it is making an error after submitting.</p>",
      "rawMarkdown": "Thank you for your response ! \nbut the predictions are coming fine in the csv file created after committing, I don't seem to understand why it is making an error after submitting.",
      "votes": null
    },
    {
      "id": "789331",
      "postDate": "03/28/2020 15:04:38",
      "content": "<p>Edit:</p>\n\n<p>predictions = []\nimport time\nstart_time = time.time()\nfor video in videos:\n    try:\n        img_array= detect_video(base_dir+video)\n    except Exception as err:\n        print(err)\n    if len(img_array) == 10:\n        X = img_array\n        X = np.expand_dims(X, axis=0)</p>\n\n<pre><code>    print(video)\n    prediction = model.predict(X)\n    prediction = float(np.squeeze(prediction[0][0]))\n\n    if prediction&amp;gt;=0.7:\n        predictions.append(1)\n    elif prediction&amp;lt;=0.3:\n        predictions.append(0)\n    else:\n        predictions.append(prediction)\nelse:\n    predictions.append(0.5)\n    print('appended : 0.5')\nprint(prediction)\n</code></pre>\n\n<p>print(\"--- %s seconds ---\" % (time.time() - start_time))</p>\n\n<p>This above is our cell in which the list of predictions are getting made, the main concern now is that why aren't our predictions getting in the csv file(the result is \"0.69314\" which comes when all the predictions are 0.5, our predictions are not getting assigned) which is not the case when committing, also everything is working fine in the output of the commit.</p>\n\n<p>Any help would be appreciated, thanks in advance !</p>",
      "rawMarkdown": "Edit:\n\npredictions = []\nimport time\nstart_time = time.time()\nfor video in videos:\n    try:\n        img_array= detect_video(base_dir+video)\n    except Exception as err:\n        print(err)\n    if len(img_array) == 10:\n        X = img_array\n        X = np.expand_dims(X, axis=0)\n        \n        print(video)\n        prediction = model.predict(X)\n        prediction = float(np.squeeze(prediction[0][0]))\n        \n        if prediction&gt;=0.7:\n            predictions.append(1)\n        elif prediction&lt;=0.3:\n            predictions.append(0)\n        else:\n            predictions.append(prediction)\n    else:\n        predictions.append(0.5)\n        print('appended : 0.5')\n    print(prediction)\n\nprint(\"--- %s seconds ---\" % (time.time() - start_time))\n\n\nThis above is our cell in which the list of predictions are getting made, the main concern now is that why aren't our predictions getting in the csv file(the result is \"0.69314\" which comes when all the predictions are 0.5, our predictions are not getting assigned) which is not the case when committing, also everything is working fine in the output of the commit.\n\nAny help would be appreciated, thanks in advance !",
      "votes": null
    },
    {
      "id": "789519",
      "postDate": "03/28/2020 18:37:16",
      "content": "<p>Yes, I am having the same issue, 0.69314 is the score, it does not matter if I change the weights.\nThe commit results seem to be fine.</p>",
      "rawMarkdown": "Yes, I am having the same issue, 0.69314 is the score, it does not matter if I change the weights.\nThe commit results seem to be fine.",
      "votes": null
    },
    {
      "id": "789529",
      "postDate": "03/28/2020 18:49:22",
      "content": "<p>yeah exactly, let me know if you figure something out, thanks in advance !</p>",
      "rawMarkdown": "yeah exactly, let me know if you figure something out, thanks in advance !",
      "votes": null
    },
    {
      "id": "790862",
      "postDate": "03/29/2020 22:45:11",
      "content": "<p>You need to save the intermediate files to the disk. My kernel failed due to memory issues.</p>",
      "rawMarkdown": "You need to save the intermediate files to the disk. My kernel failed due to memory issues.",
      "votes": null
    },
    {
      "id": "791103",
      "postDate": "03/30/2020 05:41:06",
      "content": "<p>ohhh thank you ! \nI'll also look for the same.</p>",
      "rawMarkdown": "ohhh thank you ! \nI'll also look for the same.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 789225,
      "author_name": "supermantou",
      "author_url": "",
      "post_date": "03/28/2020 13:36:01",
      "content": "<p>maybe you model did not run sucessful due to memory issue or something, you should check 'Notebooks' tab, you can find many useful demo there</p>",
      "votes": null,
      "replies": [
        {
          "id": 789291,
          "author_name": "amansaimbhi",
          "author_url": "",
          "post_date": "03/28/2020 14:30:29",
          "content": "<p>Thank you for your response ! \nbut the predictions are coming fine in the csv file created after committing, I don't seem to understand why it is making an error after submitting.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 789331,
      "author_name": "amansaimbhi",
      "author_url": "",
      "post_date": "03/28/2020 15:04:38",
      "content": "<p>Edit:</p>\n\n<p>predictions = []\nimport time\nstart_time = time.time()\nfor video in videos:\n    try:\n        img_array= detect_video(base_dir+video)\n    except Exception as err:\n        print(err)\n    if len(img_array) == 10:\n        X = img_array\n        X = np.expand_dims(X, axis=0)</p>\n\n<pre><code>    print(video)\n    prediction = model.predict(X)\n    prediction = float(np.squeeze(prediction[0][0]))\n\n    if prediction&amp;gt;=0.7:\n        predictions.append(1)\n    elif prediction&amp;lt;=0.3:\n        predictions.append(0)\n    else:\n        predictions.append(prediction)\nelse:\n    predictions.append(0.5)\n    print('appended : 0.5')\nprint(prediction)\n</code></pre>\n\n<p>print(\"--- %s seconds ---\" % (time.time() - start_time))</p>\n\n<p>This above is our cell in which the list of predictions are getting made, the main concern now is that why aren't our predictions getting in the csv file(the result is \"0.69314\" which comes when all the predictions are 0.5, our predictions are not getting assigned) which is not the case when committing, also everything is working fine in the output of the commit.</p>\n\n<p>Any help would be appreciated, thanks in advance !</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 789519,
      "author_name": "saurabh7",
      "author_url": "",
      "post_date": "03/28/2020 18:37:16",
      "content": "<p>Yes, I am having the same issue, 0.69314 is the score, it does not matter if I change the weights.\nThe commit results seem to be fine.</p>",
      "votes": null,
      "replies": [
        {
          "id": 789529,
          "author_name": "amansaimbhi",
          "author_url": "",
          "post_date": "03/28/2020 18:49:22",
          "content": "<p>yeah exactly, let me know if you figure something out, thanks in advance !</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 790862,
          "author_name": "saurabh7",
          "author_url": "",
          "post_date": "03/29/2020 22:45:11",
          "content": "<p>You need to save the intermediate files to the disk. My kernel failed due to memory issues.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 791103,
          "author_name": "amansaimbhi",
          "author_url": "",
          "post_date": "03/30/2020 05:41:06",
          "content": "<p>ohhh thank you ! \nI'll also look for the same.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "789108": "df_test = pd.DataFrame(columns=['filename','label'])\ndf_test['filename']=os.listdir(('../input/deepfake-detection-challenge/test_videos/'))\ndf_test['label']=0.5\ndf_test['label'] = predictions\ndf_test.to_csv('submission.csv',index=False)\n\n\nAbove is my code for submission, the problem which I was initially facing was that when I was committing everything was working fine and the correct submission.csv file was created but when I uploaded my notebook to the server, it said \"submission.csv not found.\"\n\nThen, I changed my code as above, now it is showing me the results as the whole predictions just went 0.5 which is a score of \"0.69314\", it looks like my predictions are not getting added on the server which is not the case when I am committing in the kernel. \n\nNow, after again some changes it is saying \"submission scoring error\" , I am unable to submit my solution from the past 2 days now and the deadline is also near. I'll be really thankful if some of you could help me or guide me in what I'm doing wrong.",
    "789225": "maybe you model did not run sucessful due to memory issue or something, you should check 'Notebooks' tab, you can find many useful demo there",
    "789291": "Thank you for your response ! \nbut the predictions are coming fine in the csv file created after committing, I don't seem to understand why it is making an error after submitting.",
    "789331": "Edit:\n\npredictions = []\nimport time\nstart_time = time.time()\nfor video in videos:\n    try:\n        img_array= detect_video(base_dir+video)\n    except Exception as err:\n        print(err)\n    if len(img_array) == 10:\n        X = img_array\n        X = np.expand_dims(X, axis=0)\n        \n        print(video)\n        prediction = model.predict(X)\n        prediction = float(np.squeeze(prediction[0][0]))\n        \n        if prediction&gt;=0.7:\n            predictions.append(1)\n        elif prediction&lt;=0.3:\n            predictions.append(0)\n        else:\n            predictions.append(prediction)\n    else:\n        predictions.append(0.5)\n        print('appended : 0.5')\n    print(prediction)\n\nprint(\"--- %s seconds ---\" % (time.time() - start_time))\n\n\nThis above is our cell in which the list of predictions are getting made, the main concern now is that why aren't our predictions getting in the csv file(the result is \"0.69314\" which comes when all the predictions are 0.5, our predictions are not getting assigned) which is not the case when committing, also everything is working fine in the output of the commit.\n\nAny help would be appreciated, thanks in advance !",
    "789519": "Yes, I am having the same issue, 0.69314 is the score, it does not matter if I change the weights.\nThe commit results seem to be fine.",
    "789529": "yeah exactly, let me know if you figure something out, thanks in advance !",
    "790862": "You need to save the intermediate files to the disk. My kernel failed due to memory issues.",
    "791103": "ohhh thank you ! \nI'll also look for the same."
  },
  "source": "meta"
}