{
  "id": 301794,
  "title": "Submission Scoring Error ",
  "url": "/competitions/g-research-crypto-forecasting/discussion/301794",
  "author_name": "xiaoxiachen",
  "post_date": "2022-01-19T11:58:58.432000",
  "votes": 1,
  "comment_count": 0,
  "views": 0,
  "content": "<p>Hi all, I am doing research in R language. The last submission refers to Python, and the code is as follows, but the Submission Scoring Error is always displayed when submitting.<br>\nI tried to set the prediction results to 0 for submission, but the submission still failed (Submission Scoring Error). The submitted file Submission.csv has two columns (row_id, Target), all of which are numeric data.<br>\nI am new to kaggle, I have tried many methods, but the submission fails (display, Submission Scoring Error), I hope to get your help, thank you very much! </p>\n<h1>call python</h1>\n<p>gresearch_crypto &lt;- import_from_path('competition','../input/g-research-crypto-forecasting/gresearch_crypto')<br>\nenv &lt;- gresearch_crypto$make_env()<br>\niter &lt;- env$iter_test()<br>\npy_run_string(\"import io\")<br>\npy_run_string(\"import pandas\")</p>\n<h1>submit</h1>\n<p>j &lt;- 0<br>\nwhile(TRUE){<br>\n    df &lt;- iter_next(iter)<br>\n    if (is.null(df)) break<br>\n    test_df &lt;- fread(df[[1]]$to_csv(index = FALSE), data.table = TRUE)<br>\n    test_df$Target &lt;- prediction(test_df)<br>\n    test_df=test_df[order(row_id),]<br>\n    pred_df &lt;- fread(df[[2]]$to_csv(index = FALSE), data.table = FALSE)<br>\n    pred_df$group_num &lt;- j<br>\n    pred_df$Target &lt;- test_df$Target<br>\n    pred_df &lt;- pred_df[,c(\"group_num\",\"row_id\",\"Target\")]<br>\n    #summit<br>\n    py$pred_df_string &lt;- format_csv(pred_df)<br>\n    py_run_string(\"pred_df = pandas.read_csv(io.StringIO(pred_df_string))\")<br>\n    py_run_string(paste0(\"pred_df.index.values[0] = \", i))<br>\n    pred_df_pointer &lt;- py_get_attr(py, \"pred_df\")<br>\n    env$predict(pred_df_pointer)<br>\n    j &lt;- j + 1<br>\n}</p>",
  "messages": [
    {
      "id": 1656523,
      "postDate": "2022-01-19T11:58:58.433Z",
      "content": "<p>Hi all, I am doing research in R language. The last submission refers to Python, and the code is as follows, but the Submission Scoring Error is always displayed when submitting.<br>\nI tried to set the prediction results to 0 for submission, but the submission still failed (Submission Scoring Error). The submitted file Submission.csv has two columns (row_id, Target), all of which are numeric data.<br>\nI am new to kaggle, I have tried many methods, but the submission fails (display, Submission Scoring Error), I hope to get your help, thank you very much! </p>\n<h1>call python</h1>\n<p>gresearch_crypto &lt;- import_from_path('competition','../input/g-research-crypto-forecasting/gresearch_crypto')<br>\nenv &lt;- gresearch_crypto$make_env()<br>\niter &lt;- env$iter_test()<br>\npy_run_string(\"import io\")<br>\npy_run_string(\"import pandas\")</p>\n<h1>submit</h1>\n<p>j &lt;- 0<br>\nwhile(TRUE){<br>\n    df &lt;- iter_next(iter)<br>\n    if (is.null(df)) break<br>\n    test_df &lt;- fread(df[[1]]$to_csv(index = FALSE), data.table = TRUE)<br>\n    test_df$Target &lt;- prediction(test_df)<br>\n    test_df=test_df[order(row_id),]<br>\n    pred_df &lt;- fread(df[[2]]$to_csv(index = FALSE), data.table = FALSE)<br>\n    pred_df$group_num &lt;- j<br>\n    pred_df$Target &lt;- test_df$Target<br>\n    pred_df &lt;- pred_df[,c(\"group_num\",\"row_id\",\"Target\")]<br>\n    #summit<br>\n    py$pred_df_string &lt;- format_csv(pred_df)<br>\n    py_run_string(\"pred_df = pandas.read_csv(io.StringIO(pred_df_string))\")<br>\n    py_run_string(paste0(\"pred_df.index.values[0] = \", i))<br>\n    pred_df_pointer &lt;- py_get_attr(py, \"pred_df\")<br>\n    env$predict(pred_df_pointer)<br>\n    j &lt;- j + 1<br>\n}</p>",
      "rawMarkdown": "Hi all, I am doing research in R language. The last submission refers to Python, and the code is as follows, but the Submission Scoring Error is always displayed when submitting.\nI tried to set the prediction results to 0 for submission, but the submission still failed (Submission Scoring Error). The submitted file Submission.csv has two columns (row_id, Target), all of which are numeric data.\nI am new to kaggle, I have tried many methods, but the submission fails (display, Submission Scoring Error), I hope to get your help, thank you very much! \n\n#call python\ngresearch_crypto <- import_from_path('competition','../input/g-research-crypto-forecasting/gresearch_crypto')\nenv <- gresearch_crypto$make_env()\niter <- env$iter_test()\npy_run_string(\"import io\")\npy_run_string(\"import pandas\")\n#submit\nj <- 0\nwhile(TRUE){\n    df <- iter_next(iter)\n    if (is.null(df)) break\n    test_df <- fread(df[[1]]$to_csv(index = FALSE), data.table = TRUE)\n    test_df$Target <- prediction(test_df)\n    test_df=test_df[order(row_id),]\n    pred_df <- fread(df[[2]]$to_csv(index = FALSE), data.table = FALSE)\n    pred_df$group_num <- j\n    pred_df$Target <- test_df$Target\n    pred_df <- pred_df[,c(\"group_num\",\"row_id\",\"Target\")]\n    #summit\n    py$pred_df_string <- format_csv(pred_df)\n    py_run_string(\"pred_df = pandas.read_csv(io.StringIO(pred_df_string))\")\n    py_run_string(paste0(\"pred_df.index.values[0] = \", i))\n    pred_df_pointer <- py_get_attr(py, \"pred_df\")\n    env$predict(pred_df_pointer)\n    j <- j + 1\n}\n\n",
      "votes": 1
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "1656523": "Hi all, I am doing research in R language. The last submission refers to Python, and the code is as follows, but the Submission Scoring Error is always displayed when submitting.\nI tried to set the prediction results to 0 for submission, but the submission still failed (Submission Scoring Error). The submitted file Submission.csv has two columns (row_id, Target), all of which are numeric data.\nI am new to kaggle, I have tried many methods, but the submission fails (display, Submission Scoring Error), I hope to get your help, thank you very much! \n\n#call python\ngresearch_crypto <- import_from_path('competition','../input/g-research-crypto-forecasting/gresearch_crypto')\nenv <- gresearch_crypto$make_env()\niter <- env$iter_test()\npy_run_string(\"import io\")\npy_run_string(\"import pandas\")\n#submit\nj <- 0\nwhile(TRUE){\n    df <- iter_next(iter)\n    if (is.null(df)) break\n    test_df <- fread(df[[1]]$to_csv(index = FALSE), data.table = TRUE)\n    test_df$Target <- prediction(test_df)\n    test_df=test_df[order(row_id),]\n    pred_df <- fread(df[[2]]$to_csv(index = FALSE), data.table = FALSE)\n    pred_df$group_num <- j\n    pred_df$Target <- test_df$Target\n    pred_df <- pred_df[,c(\"group_num\",\"row_id\",\"Target\")]\n    #summit\n    py$pred_df_string <- format_csv(pred_df)\n    py_run_string(\"pred_df = pandas.read_csv(io.StringIO(pred_df_string))\")\n    py_run_string(paste0(\"pred_df.index.values[0] = \", i))\n    pred_df_pointer <- py_get_attr(py, \"pred_df\")\n    env$predict(pred_df_pointer)\n    j <- j + 1\n}\n\n"
  }
}