{
  "id": 62849,
  "title": "Using Starter Kit code",
  "url": "/competitions/flavours-of-physics-kernels-only/discussion/62849",
  "author_name": "",
  "post_date": "2018-08-08T04:39:04.552332600Z",
  "votes": 2,
  "comment_count": 2,
  "views": 0,
  "content": "<p>Would it be possible to access evaluation.py from the github starter kit from competition kernels?\n<a href=\"https://github.com/yandexdataschool/flavours-of-physics-start/blob/master/evaluation.py\">flavours-of-physics-start/evaluation.py</a> <br>\nI was considering trying something with R.  It appears I can run python from an R kernel with the reticulate package. <br>\n<a href=\"https://github.com/yandexdataschool/flavours-of-physics-start/blob/master/evaluation.py\">Hybrid R and python code in kernels?</a> <br>\nI would like to be able to use these starter kit functions from R without attempting to translate the python. <br>\nThere appear to be options where I can upload my own datasets. But would it be preferred if the competition somehow provided it?</p>",
  "messages": [
    {
      "id": "367603",
      "postDate": "08/08/2018 04:39:04",
      "content": "<p>Would it be possible to access evaluation.py from the github starter kit from competition kernels?\n<a href=\"https://github.com/yandexdataschool/flavours-of-physics-start/blob/master/evaluation.py\">flavours-of-physics-start/evaluation.py</a> <br>\nI was considering trying something with R.  It appears I can run python from an R kernel with the reticulate package. <br>\n<a href=\"https://github.com/yandexdataschool/flavours-of-physics-start/blob/master/evaluation.py\">Hybrid R and python code in kernels?</a> <br>\nI would like to be able to use these starter kit functions from R without attempting to translate the python. <br>\nThere appear to be options where I can upload my own datasets. But would it be preferred if the competition somehow provided it?</p>",
      "rawMarkdown": "Would it be possible to access evaluation.py from the github starter kit from competition kernels?\n[flavours-of-physics-start/evaluation.py](https://github.com/yandexdataschool/flavours-of-physics-start/blob/master/evaluation.py)  \nI was considering trying something with R.  It appears I can run python from an R kernel with the reticulate package.  \n[Hybrid R and python code in kernels?](https://github.com/yandexdataschool/flavours-of-physics-start/blob/master/evaluation.py)  \nI would like to be able to use these starter kit functions from R without attempting to translate the python.  \nThere appear to be options where I can upload my own datasets. But would it be preferred if the competition somehow provided it?",
      "votes": null
    },
    {
      "id": "367779",
      "postDate": "08/08/2018 14:06:02",
      "content": "<p>I tried this loading my own dataset to see if it works but it looks like it might not quite get there. <br>\nFirst, the kaggle R reticulate package seems to be missing 'source_python'? That could be worked around by cut and paste from a local installed version. It seemed to work. <br>\nHowever, evaluation.py from the starter kit requires sklearn.metrics which is also missing from the kernel version.</p>\n\n<pre><code>&gt; import(\"sklearn.metrics\")  \nError in py_module_import(module, convert = convert): ImportError: No module named sklearn.metrics  \nTraceback:  \n</code></pre>\n\n<p>What you get for python is...  </p>\n\n<pre><code>&gt; Sys.getenv(\"RETICULATE_PYTHON\", unset = NA)  \n[1] \"/root/.virtualenvs/r-tensorflow/bin/python\"\n</code></pre>\n\n<p>So I'm guessing the kernel gives you a python version geared to working with r-tensorflow that doesn't include sklearn.</p>\n\n<p>For now if I try any R I'll have to go without the extra checks. If anyone has any other thoughts on how I could get this to work R/Python I would still be willing to attempt it.</p>",
      "rawMarkdown": "I tried this loading my own dataset to see if it works but it looks like it might not quite get there.  \nFirst, the kaggle R reticulate package seems to be missing 'source_python'? That could be worked around by cut and paste from a local installed version. It seemed to work.  \nHowever, evaluation.py from the starter kit requires sklearn.metrics which is also missing from the kernel version.\n\n    &gt; import(\"sklearn.metrics\")  \n    Error in py_module_import(module, convert = convert): ImportError: No module named sklearn.metrics  \n    Traceback:  \n\nWhat you get for python is...  \n\n    &gt; Sys.getenv(\"RETICULATE_PYTHON\", unset = NA)  \n    [1] \"/root/.virtualenvs/r-tensorflow/bin/python\"\n\nSo I'm guessing the kernel gives you a python version geared to working with r-tensorflow that doesn't include sklearn.\n\nFor now if I try any R I'll have to go without the extra checks. If anyone has any other thoughts on how I could get this to work R/Python I would still be willing to attempt it.",
      "votes": null
    },
    {
      "id": "368824",
      "postDate": "08/11/2018 00:13:47",
      "content": "<p>Someone had already re-invented the wheel on this one <br>\n<a href=\"https://www.kaggle.com/rajivranjansingh/understanding-evalulation-metrics\">Calculation Evalulation Metrics in R</a> <br>\nI gave it a 3 year belated up vote. </p>",
      "rawMarkdown": "Someone had already re-invented the wheel on this one  \n[Calculation Evalulation Metrics in R](https://www.kaggle.com/rajivranjansingh/understanding-evalulation-metrics)  \nI gave it a 3 year belated up vote.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 367779,
      "author_name": "mik3hall",
      "author_url": "",
      "post_date": "08/08/2018 14:06:02",
      "content": "<p>I tried this loading my own dataset to see if it works but it looks like it might not quite get there. <br>\nFirst, the kaggle R reticulate package seems to be missing 'source_python'? That could be worked around by cut and paste from a local installed version. It seemed to work. <br>\nHowever, evaluation.py from the starter kit requires sklearn.metrics which is also missing from the kernel version.</p>\n\n<pre><code>&gt; import(\"sklearn.metrics\")  \nError in py_module_import(module, convert = convert): ImportError: No module named sklearn.metrics  \nTraceback:  \n</code></pre>\n\n<p>What you get for python is...  </p>\n\n<pre><code>&gt; Sys.getenv(\"RETICULATE_PYTHON\", unset = NA)  \n[1] \"/root/.virtualenvs/r-tensorflow/bin/python\"\n</code></pre>\n\n<p>So I'm guessing the kernel gives you a python version geared to working with r-tensorflow that doesn't include sklearn.</p>\n\n<p>For now if I try any R I'll have to go without the extra checks. If anyone has any other thoughts on how I could get this to work R/Python I would still be willing to attempt it.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 368824,
      "author_name": "mik3hall",
      "author_url": "",
      "post_date": "08/11/2018 00:13:47",
      "content": "<p>Someone had already re-invented the wheel on this one <br>\n<a href=\"https://www.kaggle.com/rajivranjansingh/understanding-evalulation-metrics\">Calculation Evalulation Metrics in R</a> <br>\nI gave it a 3 year belated up vote. </p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "367603": "Would it be possible to access evaluation.py from the github starter kit from competition kernels?\n[flavours-of-physics-start/evaluation.py](https://github.com/yandexdataschool/flavours-of-physics-start/blob/master/evaluation.py)  \nI was considering trying something with R.  It appears I can run python from an R kernel with the reticulate package.  \n[Hybrid R and python code in kernels?](https://github.com/yandexdataschool/flavours-of-physics-start/blob/master/evaluation.py)  \nI would like to be able to use these starter kit functions from R without attempting to translate the python.  \nThere appear to be options where I can upload my own datasets. But would it be preferred if the competition somehow provided it?",
    "367779": "I tried this loading my own dataset to see if it works but it looks like it might not quite get there.  \nFirst, the kaggle R reticulate package seems to be missing 'source_python'? That could be worked around by cut and paste from a local installed version. It seemed to work.  \nHowever, evaluation.py from the starter kit requires sklearn.metrics which is also missing from the kernel version.\n\n    &gt; import(\"sklearn.metrics\")  \n    Error in py_module_import(module, convert = convert): ImportError: No module named sklearn.metrics  \n    Traceback:  \n\nWhat you get for python is...  \n\n    &gt; Sys.getenv(\"RETICULATE_PYTHON\", unset = NA)  \n    [1] \"/root/.virtualenvs/r-tensorflow/bin/python\"\n\nSo I'm guessing the kernel gives you a python version geared to working with r-tensorflow that doesn't include sklearn.\n\nFor now if I try any R I'll have to go without the extra checks. If anyone has any other thoughts on how I could get this to work R/Python I would still be willing to attempt it.",
    "368824": "Someone had already re-invented the wheel on this one  \n[Calculation Evalulation Metrics in R](https://www.kaggle.com/rajivranjansingh/understanding-evalulation-metrics)  \nI gave it a 3 year belated up vote."
  },
  "source": "meta"
}