fastkaggle


Namefastkaggle JSON
Version 0.0.8 PyPI version JSON
download
home_pagehttps://github.com/fastai/fastkaggle/tree/master/
SummaryKaggling for fast kagglers!
upload_time2023-01-26 00:33:50
maintainer
docs_urlNone
authorJeremy Howard
requires_python>=3.7
licenseApache Software License 2.0
keywords machine-learning kaggle fastai nbdev
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            fastkaggle
================

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

## Install

Either:

    pip install fastkaggle

or:

    mamba install -c fastai fastkaggle

(or replace `mamba` with `conda` if you don’t mind it taking much longer
to run…)

## How to use

### Competition

This little library is where I’ll be putting snippets of stuff which are
useful on Kaggle. Functionality includes the following:

It defines
[`iskaggle`](https://fastai.github.io/fastkaggle/core.html#iskaggle)
which is `True` if you’re running on Kaggle:

``` python
'Kaggle' if iskaggle else 'Not Kaggle'
```

    'Not Kaggle'

It provides a
[`setup_comp`](https://fastai.github.io/fastkaggle/core.html#setup_comp)
function which gets a path to the data for a competition, downloading it
if needed, and also installs any modules that might be missing or out of
data if running on Kaggle:

``` python
setup_comp('titanic')
```

    Path('titanic')

There’s also
[`push_notebook`](https://fastai.github.io/fastkaggle/core.html#push_notebook)
to push a notebook to Kaggle Notebooks, and
[`import_kaggle`](https://fastai.github.io/fastkaggle/core.html#import_kaggle)
to use the Kaggle API (even when you’re on Kaggle!) See the
`fastkaggle.core` docs for details.

### Datasets

This section is designed to make uploading pip libraries to kaggle
datasets easy. There’s 2 primary high level functions to be used. First
we can define our kaggle username and the local path we want to use to
store datasets when we create them.

<div>

> **Usage tip**
>
> The purpose of this is to create datasets that can be used in no
> internet inference competitions to install libraries using
> `pip install -Uqq library --no-index --find-links=file:///kaggle/input/your_dataset/`

</div>

``` python
lib_path = Path('/root/kaggle_datasets')
username = 'isaacflath'
```

#### List of Libraries

We can take a list of libraries and upload them as seperate datasets.
For example the below will create a `library-fastcore` and
`library-timm` dataset. If they already exist, it will push a new
version if there is a more recent version available.

``` python
libs = ['fastcore','timm']
create_libs_datasets(libs,lib_path,username)
```

    Processing fastcore as library-fastcore at /root/kaggle_datasets/library-fastcore
    -----Downloading or Creating Dataset
    -----Checking dataset version against pip
    -----Kaggle dataset already up to date 1.5.16 to 1.5.16
    Processing timm as library-timm at /root/kaggle_datasets/library-timm
    -----Downloading or Creating Dataset
    -----Checking dataset version against pip
    -----Kaggle dataset already up to date 0.6.7 to 0.6.7
    Complete

This creates datasets in kaggle with the needed files.

![Pawpularity Dataset](images/libraries-pawpularity.png)

#### requirements.txt

We can also create a singular dataset with multiple libraries based on a
`requirements.txt` file for the project. If there are any different
files it will push a new version.

``` python
create_requirements_dataset('test_files/requirements.txt',lib_path,'libraries-pawpularity', username)
```

    Processing libraries-pawpularity at /root/kaggle_datasets/libraries-pawpularity
    -----Downloading or Creating Dataset
    Data package template written to: /root/kaggle_datasets/libraries-pawpularity/dataset-metadata.json
    -----Checking dataset version against pip
    -----Updating libraries-pawpularity in Kaggle
    Complete

This creats a dataset in kaggle with the needed files.

![Fastkaggle Dataset](images/library-fastkaggle.png)



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/fastai/fastkaggle/tree/master/",
    "name": "fastkaggle",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "machine-learning kaggle fastai nbdev",
    "author": "Jeremy Howard",
    "author_email": "info@fast.ai",
    "download_url": "https://files.pythonhosted.org/packages/ba/52/8a23984eedcf3803f0f71f2040309c0944a93c1d51f15e8a1f9ef309461c/fastkaggle-0.0.8.tar.gz",
    "platform": null,
    "description": "fastkaggle\n================\n\n<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->\n\n## Install\n\nEither:\n\n    pip install fastkaggle\n\nor:\n\n    mamba install -c fastai fastkaggle\n\n(or replace `mamba` with `conda` if you don\u2019t mind it taking much longer\nto run\u2026)\n\n## How to use\n\n### Competition\n\nThis little library is where I\u2019ll be putting snippets of stuff which are\nuseful on Kaggle. Functionality includes the following:\n\nIt defines\n[`iskaggle`](https://fastai.github.io/fastkaggle/core.html#iskaggle)\nwhich is `True` if you\u2019re running on Kaggle:\n\n``` python\n'Kaggle' if iskaggle else 'Not Kaggle'\n```\n\n    'Not Kaggle'\n\nIt provides a\n[`setup_comp`](https://fastai.github.io/fastkaggle/core.html#setup_comp)\nfunction which gets a path to the data for a competition, downloading it\nif needed, and also installs any modules that might be missing or out of\ndata if running on Kaggle:\n\n``` python\nsetup_comp('titanic')\n```\n\n    Path('titanic')\n\nThere\u2019s also\n[`push_notebook`](https://fastai.github.io/fastkaggle/core.html#push_notebook)\nto push a notebook to Kaggle Notebooks, and\n[`import_kaggle`](https://fastai.github.io/fastkaggle/core.html#import_kaggle)\nto use the Kaggle API (even when you\u2019re on Kaggle!) See the\n`fastkaggle.core` docs for details.\n\n### Datasets\n\nThis section is designed to make uploading pip libraries to kaggle\ndatasets easy. There\u2019s 2 primary high level functions to be used. First\nwe can define our kaggle username and the local path we want to use to\nstore datasets when we create them.\n\n<div>\n\n> **Usage tip**\n>\n> The purpose of this is to create datasets that can be used in no\n> internet inference competitions to install libraries using\n> `pip install -Uqq library --no-index --find-links=file:///kaggle/input/your_dataset/`\n\n</div>\n\n``` python\nlib_path = Path('/root/kaggle_datasets')\nusername = 'isaacflath'\n```\n\n#### List of Libraries\n\nWe can take a list of libraries and upload them as seperate datasets.\nFor example the below will create a `library-fastcore` and\n`library-timm` dataset. If they already exist, it will push a new\nversion if there is a more recent version available.\n\n``` python\nlibs = ['fastcore','timm']\ncreate_libs_datasets(libs,lib_path,username)\n```\n\n    Processing fastcore as library-fastcore at /root/kaggle_datasets/library-fastcore\n    -----Downloading or Creating Dataset\n    -----Checking dataset version against pip\n    -----Kaggle dataset already up to date 1.5.16 to 1.5.16\n    Processing timm as library-timm at /root/kaggle_datasets/library-timm\n    -----Downloading or Creating Dataset\n    -----Checking dataset version against pip\n    -----Kaggle dataset already up to date 0.6.7 to 0.6.7\n    Complete\n\nThis creates datasets in kaggle with the needed files.\n\n![Pawpularity Dataset](images/libraries-pawpularity.png)\n\n#### requirements.txt\n\nWe can also create a singular dataset with multiple libraries based on a\n`requirements.txt` file for the project. If there are any different\nfiles it will push a new version.\n\n``` python\ncreate_requirements_dataset('test_files/requirements.txt',lib_path,'libraries-pawpularity', username)\n```\n\n    Processing libraries-pawpularity at /root/kaggle_datasets/libraries-pawpularity\n    -----Downloading or Creating Dataset\n    Data package template written to: /root/kaggle_datasets/libraries-pawpularity/dataset-metadata.json\n    -----Checking dataset version against pip\n    -----Updating libraries-pawpularity in Kaggle\n    Complete\n\nThis creats a dataset in kaggle with the needed files.\n\n![Fastkaggle Dataset](images/library-fastkaggle.png)\n\n\n",
    "bugtrack_url": null,
    "license": "Apache Software License 2.0",
    "summary": "Kaggling for fast kagglers!",
    "version": "0.0.8",
    "split_keywords": [
        "machine-learning",
        "kaggle",
        "fastai",
        "nbdev"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "214667cde22d6d061f3f7ff6160c404abed3411b55c5446a2adea7718d74daf0",
                "md5": "a0680b49a699fb58ca13f1ee8331f33e",
                "sha256": "d9c261c70d390a53227d66efa305106ed5ba339e86d915d4cb8abc81306986f7"
            },
            "downloads": -1,
            "filename": "fastkaggle-0.0.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a0680b49a699fb58ca13f1ee8331f33e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 11932,
            "upload_time": "2023-01-26T00:33:48",
            "upload_time_iso_8601": "2023-01-26T00:33:48.173680Z",
            "url": "https://files.pythonhosted.org/packages/21/46/67cde22d6d061f3f7ff6160c404abed3411b55c5446a2adea7718d74daf0/fastkaggle-0.0.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ba528a23984eedcf3803f0f71f2040309c0944a93c1d51f15e8a1f9ef309461c",
                "md5": "b9d05e96f5f028e3b1f0b389e19ef25a",
                "sha256": "43cf8f6a5a96577e49af9a9d8595b01f5d67a581cfa111597ed68d3adeb34b7f"
            },
            "downloads": -1,
            "filename": "fastkaggle-0.0.8.tar.gz",
            "has_sig": false,
            "md5_digest": "b9d05e96f5f028e3b1f0b389e19ef25a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 12195,
            "upload_time": "2023-01-26T00:33:50",
            "upload_time_iso_8601": "2023-01-26T00:33:50.208013Z",
            "url": "https://files.pythonhosted.org/packages/ba/52/8a23984eedcf3803f0f71f2040309c0944a93c1d51f15e8a1f9ef309461c/fastkaggle-0.0.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-26 00:33:50",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "fastkaggle"
}
        
Elapsed time: 0.03393s