{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": ".. image:: https://github.com/dnouri/skorch/blob/master/assets/skorch.svg\n :width: 30%\n\n------------\n\n|build| |coverage| |docs| |powered|\n\nA scikit-learn compatible neural network library that wraps PyTorch.\n\n.. |build| image:: https://travis-ci.org/dnouri/skorch.svg?branch=master\n :alt: Build Status\n :scale: 100%\n :target: https://travis-ci.org/dnouri/skorch?branch=master\n\n.. |coverage| image:: https://github.com/dnouri/skorch/blob/master/assets/coverage.svg\n :alt: Test Coverage\n :scale: 100%\n\n.. |docs| image:: https://readthedocs.org/projects/skorch/badge/?version=latest\n :alt: Documentation Status\n :scale: 100%\n :target: https://skorch.readthedocs.io/en/latest/?badge=latest\n\n.. |powered| image:: https://github.com/dnouri/skorch/blob/master/assets/powered.svg\n :alt: Powered by\n :scale: 100%\n :target: https://github.com/ottogroup/\n\n=========\nResources\n=========\n\n- `Documentation `_\n- `Source Code `_\n\n========\nExamples\n========\n\nTo see more elaborate examples, look `here\n`__.\n\n.. code:: python\n\n import numpy as np\n from sklearn.datasets import make_classification\n from torch import nn\n import torch.nn.functional as F\n\n from skorch import NeuralNetClassifier\n\n\n X, y = make_classification(1000, 20, n_informative=10, random_state=0)\n X = X.astype(np.float32)\n y = y.astype(np.int64)\n\n class MyModule(nn.Module):\n def __init__(self, num_units=10, nonlin=F.relu):\n super(MyModule, self).__init__()\n\n self.dense0 = nn.Linear(20, num_units)\n self.nonlin = nonlin\n self.dropout = nn.Dropout(0.5)\n self.dense1 = nn.Linear(num_units, 10)\n self.output = nn.Linear(10, 2)\n\n def forward(self, X, **kwargs):\n X = self.nonlin(self.dense0(X))\n X = self.dropout(X)\n X = F.relu(self.dense1(X))\n X = F.softmax(self.output(X), dim=-1)\n return X\n\n\n net = NeuralNetClassifier(\n MyModule,\n max_epochs=10,\n lr=0.1,\n # Shuffle training data on each epoch\n iterator_train__shuffle=True,\n )\n\n net.fit(X, y)\n y_proba = net.predict_proba(X)\n\nIn an sklearn Pipeline:\n\n.. code:: python\n\n from sklearn.pipeline import Pipeline\n from sklearn.preprocessing import StandardScaler\n\n\n pipe = Pipeline([\n ('scale', StandardScaler()),\n ('net', net),\n ])\n\n pipe.fit(X, y)\n y_proba = pipe.predict_proba(X)\n\nWith grid search\n\n.. code:: python\n\n from sklearn.model_selection import GridSearchCV\n\n\n params = {\n 'lr': [0.01, 0.02],\n 'max_epochs': [10, 20],\n 'module__num_units': [10, 20],\n }\n gs = GridSearchCV(net, params, refit=False, cv=3, scoring='accuracy')\n\n gs.fit(X, y)\n print(gs.best_score_, gs.best_params_)\n\nskorch also provides many convenient features, among others:\n\n- `Learning rate schedulers `_ (Warm restarts, cyclic LR and many more)\n- `Scoring using sklearn (and custom) scoring functions `_\n- `Early stopping `_\n- `Checkpointing `_\n- `Parameter freezing/unfreezing `_\n- `Progress bar `_ (for CLI as well as jupyter)\n- `Automatic inference of CLI parameters `_\n\n============\nInstallation\n============\n\nskorch requires Python 3.5 or higher.\n\npip installation\n================\n\nTo install with pip, run:\n\n.. code:: bash\n\n pip install -U skorch\n\nWe recommend to use a virtual environment for this.\n\nFrom source\n===========\n\nIf you would like to use the must recent additions to skorch or\nhelp development, you should install skorch from source.\n\nUsing conda\n===========\n\nYou need a working conda installation. Get the correct miniconda for\nyour system from `here `__.\n\nIf you just want to use skorch, use:\n\n.. code:: bash\n\n git clone https://github.com/dnouri/skorch.git\n cd skorch\n conda env create\n source activate skorch\n # install pytorch version for your system (see below)\n python setup.py install\n\nIf you want to help developing, run:\n\n.. code:: bash\n\n git clone https://github.com/dnouri/skorch.git\n cd skorch\n conda env create\n source activate skorch\n # install pytorch version for your system (see below)\n conda install -c conda-forge --file requirements-dev.txt\n python setup.py develop\n\n py.test # unit tests\n pylint skorch # static code checks\n\nUsing pip\n=========\n\nIf you just want to use skorch, use:\n\n.. code:: bash\n\n git clone https://github.com/dnouri/skorch.git\n cd skorch\n # create and activate a virtual environment\n pip install -r requirements.txt\n # install pytorch version for your system (see below)\n python setup.py install\n\nIf you want to help developing, run:\n\n.. code:: bash\n\n git clone https://github.com/dnouri/skorch.git\n cd skorch\n # create and activate a virtual environment\n pip install -r requirements.txt\n # install pytorch version for your system (see below)\n pip install -r requirements-dev.txt\n python setup.py develop\n\n py.test # unit tests\n pylint skorch # static code checks\n\nPyTorch\n=======\n\nPyTorch is not covered by the dependencies, since the PyTorch version\nyou need is dependent on your system. For installation instructions\nfor PyTorch, visit the `PyTorch website `__. The\ncurrent version of skorch assumes PyTorch >= 1.1.0.\n\nIn general, this should work (assuming CUDA 9):\n\n.. code:: bash\n\n # using conda:\n conda install pytorch -c pytorch\n # using pip\n pip install torch\n\n=============\nCommunication\n=============\n\n- `GitHub issues `_: bug\n reports, feature requests, install issues, RFCs, thoughts, etc.\n\n- Slack: We run the #skorch channel on the `PyTorch Slack server\n `_. If you need an invite, send an\n email to daniel.nouri@gmail.com.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dnouri/skorch", "keywords": "", "license": "new BSD 3-Clause", "maintainer": "", "maintainer_email": "", "name": "skorch", "package_url": "https://pypi.org/project/skorch/", "platform": "", "project_url": "https://pypi.org/project/skorch/", "project_urls": { "Homepage": "https://github.com/dnouri/skorch" }, "release_url": "https://pypi.org/project/skorch/0.6.0/", "requires_dist": [ "numpy (>=1.13.3)", "scikit-learn (>=0.19.1)", "scipy (>=1.1.0)", "tabulate (>=0.7.7)", "tqdm (>=4.14.0)", "Sphinx; extra == 'docs'", "sphinx-rtd-theme; extra == 'docs'", "numpydoc; extra == 'docs'", "pytest; extra == 'testing'", "pytest-cov; extra == 'testing'" ], "requires_python": "", "summary": "scikit-learn compatible neural network library for pytorch", "version": "0.6.0" }, "last_serial": 5420785, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "15a308a6baa1fae0a1216a4e937acc4e", "sha256": "413c66c26f1356637ebe67221da700a91d727b54f51cb2a6c4a3eeab44be56ac" }, "downloads": -1, "filename": "skorch-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "15a308a6baa1fae0a1216a4e937acc4e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 38722, "upload_time": "2017-10-10T15:45:33", "url": "https://files.pythonhosted.org/packages/43/cd/293ef43ff57ccf9a860731c4fd00408ab0aa54e28456a7be227733232453/skorch-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e68384443a921698030777b783013a44", "sha256": "c35fb8c5d72e56f5b0ee4abfdc979d4b9647b030d0b3822208d09e5157ed03fa" }, "downloads": -1, "filename": "skorch-0.0.1.tar.gz", "has_sig": false, "md5_digest": "e68384443a921698030777b783013a44", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33111, "upload_time": "2017-10-10T15:45:35", "url": "https://files.pythonhosted.org/packages/59/4a/39a844d1754550cf03580a3fdce2641dc41c27ddeb73b4a5b0fbf8e546e1/skorch-0.0.1.tar.gz" } ], "0.1.0.post1": [ { "comment_text": "", "digests": { "md5": "77fd6f5cdbe7bf648ab2597cb6e707e1", "sha256": "485d024fcb0131099b68c36205b50149fc1f0d7eeee8cdbc704cb2ee01f5a5ce" }, "downloads": -1, "filename": "skorch-0.1.0.post1-py3-none-any.whl", "has_sig": false, "md5_digest": "77fd6f5cdbe7bf648ab2597cb6e707e1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 48379, "upload_time": "2017-12-08T14:11:46", "url": "https://files.pythonhosted.org/packages/f2/be/472f2b485404004fcf1924c92b2f1e6eddef56eb3b403978eb421051bb23/skorch-0.1.0.post1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8b86db94199cd08d68089a85a11a2f9e", "sha256": "d1903dbc621c4d39cee3708bb8b4c4fcc3d1ce769edf60f718780f6ddc9148c7" }, "downloads": -1, "filename": "skorch-0.1.0.post1.tar.gz", "has_sig": false, "md5_digest": "8b86db94199cd08d68089a85a11a2f9e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 41372, "upload_time": "2017-12-08T14:11:48", "url": "https://files.pythonhosted.org/packages/6e/14/eb6255b4a4e3472983b25ed21b5305b2d2d4c41dc3049d75286cbe0fd247/skorch-0.1.0.post1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "c045391d33ad610eabbd664d80f40807", "sha256": "16ab46e23a1c1aa2bf026b1696239ad373a0ff9476dabb3bd6452abfc560d955" }, "downloads": -1, "filename": "skorch-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "c045391d33ad610eabbd664d80f40807", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 76094, "upload_time": "2018-05-04T14:58:57", "url": "https://files.pythonhosted.org/packages/f5/91/d69d044da36315c4c24182938cfb12d7941be0d141884b3ed75fe5d52818/skorch-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "27cdaec5f0865e81be41fcec04ae11d9", "sha256": "b1dd0690167df5d6c369592b41b48df2cf79c23584dac4039f4a3412b5fb28b2" }, "downloads": -1, "filename": "skorch-0.2.0.tar.gz", "has_sig": false, "md5_digest": "27cdaec5f0865e81be41fcec04ae11d9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 58075, "upload_time": "2018-05-04T14:58:58", "url": "https://files.pythonhosted.org/packages/4b/26/b7c2ee9a91ac44a667b425747d834f89c938e2e000c76f7a36ce8cc82188/skorch-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "7be7531eb86744ab3c1fb967ec3a27b6", "sha256": "1a5c9b94cc86b48b2edc3cd6118500c8a0ecb0a6b8145b69b5361cf59481fb59" }, "downloads": -1, "filename": "skorch-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "7be7531eb86744ab3c1fb967ec3a27b6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 89542, "upload_time": "2018-07-26T12:56:53", "url": "https://files.pythonhosted.org/packages/49/61/d0949b994b8e1faa7c0218c45e94034d6ebf1c4fd87e99663eddfe761e95/skorch-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "41deb1d43e19a5e32c3c1eba5fd3e765", "sha256": "f5d912119283de3d96a414cf8523ad6d86de1d8dc6de09379dade9b11b171fd4" }, "downloads": -1, "filename": "skorch-0.3.0.tar.gz", "has_sig": false, "md5_digest": "41deb1d43e19a5e32c3c1eba5fd3e765", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 63162, "upload_time": "2018-07-26T12:56:55", "url": "https://files.pythonhosted.org/packages/e1/20/0b9601105b8b1ee51a4288af9258a71f58fc53fe951d032d2af6283f5d87/skorch-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "62fa32410a93d40e7c2ee0d44412456b", "sha256": "3d8fb2b0f15457fc19693b77b8721c359d3071d24b24e9b38796d51fd0f6a766" }, "downloads": -1, "filename": "skorch-0.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "62fa32410a93d40e7c2ee0d44412456b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 89068, "upload_time": "2018-10-24T13:56:10", "url": "https://files.pythonhosted.org/packages/52/9e/6a1f51fe538005d4fc2b28c270ffa0a2186ee4de345428811823bb4ba6eb/skorch-0.4.0-py3-none-any.whl" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "cf67080d7ba3beb048f4452bc602afdf", "sha256": "826cc8138e992cecf7ea3be7d1e64fd1603ff1f9aefa50a0d57ebbb229559279" }, "downloads": -1, "filename": "skorch-0.5.0-py3.6.egg", "has_sig": false, "md5_digest": "cf67080d7ba3beb048f4452bc602afdf", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 245275, "upload_time": "2018-12-13T13:05:22", "url": "https://files.pythonhosted.org/packages/47/3e/9555482e43c8e4e7b11d19c52941385866031bb7368cc7c9fc6d742a3feb/skorch-0.5.0-py3.6.egg" }, { "comment_text": "", "digests": { "md5": "e5d75d15c25ec61de0a176f3ad9d36ec", "sha256": "154e24e6cbd608cc41cbc8c515e980390c46a52b8380958d2f590205cd1f7674" }, "downloads": -1, "filename": "skorch-0.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "e5d75d15c25ec61de0a176f3ad9d36ec", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 99680, "upload_time": "2018-12-13T13:05:20", "url": "https://files.pythonhosted.org/packages/60/e8/ba5c79709b1e4381f15889662c9937442af5e85d6780bbf246053082bfc4/skorch-0.5.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4f4f3bc8222817837bdc5f82f39ef96d", "sha256": "1ec8c9144da95a633ff13db8b769011ff958cdc5c2b4cff09ada8f9a4e6fb6a6" }, "downloads": -1, "filename": "skorch-0.5.0.tar.gz", "has_sig": false, "md5_digest": "4f4f3bc8222817837bdc5f82f39ef96d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 85975, "upload_time": "2018-12-13T13:05:24", "url": "https://files.pythonhosted.org/packages/9b/4a/94661d27e6ac6e6ec14d1f2fd1fc03aa3d5226388ce1c8caf848132bbc39/skorch-0.5.0.tar.gz" } ], "0.5.0.post0": [ { "comment_text": "", "digests": { "md5": "c4b15620e2c778b502fdac3e6d680dd0", "sha256": "47affdae17ec76ef66925438d4417a2e2256485fab2883bd21ee32281ba9c166" }, "downloads": -1, "filename": "skorch-0.5.0.post0-py3.6.egg", "has_sig": false, "md5_digest": "c4b15620e2c778b502fdac3e6d680dd0", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 245295, "upload_time": "2018-12-17T13:17:07", "url": "https://files.pythonhosted.org/packages/c2/04/c7ea1b7e67fd1a8e3a6dbb1c4433e80c1ba68b981273637df0bee5ef5940/skorch-0.5.0.post0-py3.6.egg" }, { "comment_text": "", "digests": { "md5": "1ac5930f8b594c5753a5ba1437fc04c2", "sha256": "cfa2c1800dde7456891144a9c0d7f02aa08cb62c21ab49400f42ba82f2ce68b0" }, "downloads": -1, "filename": "skorch-0.5.0.post0-py3-none-any.whl", "has_sig": false, "md5_digest": "1ac5930f8b594c5753a5ba1437fc04c2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 99749, "upload_time": "2018-12-17T13:17:05", "url": "https://files.pythonhosted.org/packages/87/3a/b7598ff2f317194c98212cc602d395d46eab60e0c8d4f45876a35f5ffe2e/skorch-0.5.0.post0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "68d99640698c278888904b54b212e0af", "sha256": "e7646ec1d796509927782a036f617716ce9a2da7981035b2ca73a614f09c25b5" }, "downloads": -1, "filename": "skorch-0.5.0.post0.tar.gz", "has_sig": false, "md5_digest": "68d99640698c278888904b54b212e0af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 86120, "upload_time": "2018-12-17T13:17:09", "url": "https://files.pythonhosted.org/packages/ae/9b/aa432b4f4fc2fab2b1434dae183d3bc279efa172f8912dc199b7141ab289/skorch-0.5.0.post0.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "8ff6cd644bd6ca634c885934b6c7ee93", "sha256": "df9128e8605792882de113150b40049a849a536cb538d9e03c51f2f3cf2b28d0" }, "downloads": -1, "filename": "skorch-0.6.0-py3.6.egg", "has_sig": false, "md5_digest": "8ff6cd644bd6ca634c885934b6c7ee93", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 251157, "upload_time": "2019-06-19T15:12:46", "url": "https://files.pythonhosted.org/packages/49/7e/ded52f837fe8fb328ee2ba5ff3833e6216ed5654380560d7737141bb4c54/skorch-0.6.0-py3.6.egg" }, { "comment_text": "", "digests": { "md5": "b8fb6df3e9fc0ea50e9590e181fe5285", "sha256": "3c52f5874b0e231a1cb431b1af096a778aee9b4696f04332e94b0a768da9772a" }, "downloads": -1, "filename": "skorch-0.6.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b8fb6df3e9fc0ea50e9590e181fe5285", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 101810, "upload_time": "2019-06-19T15:12:43", "url": "https://files.pythonhosted.org/packages/c7/df/1e0be91bf4c91fce5f99cc4edd89d3dfc16930d3fc77588493558036a8d2/skorch-0.6.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "370ffef71611db35d604c9c6d288ef0f", "sha256": "4ee4c67bf8a412a5b583a1ac4c5e4b6b92c8d98ae9319eafa977ce8209e0fc93" }, "downloads": -1, "filename": "skorch-0.6.0.tar.gz", "has_sig": false, "md5_digest": "370ffef71611db35d604c9c6d288ef0f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 88357, "upload_time": "2019-06-19T15:12:49", "url": "https://files.pythonhosted.org/packages/c3/fc/517e70d1262daba416eb79b5a24a83b7da11dc4cad8d61f7034388cc3ea4/skorch-0.6.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8ff6cd644bd6ca634c885934b6c7ee93", "sha256": "df9128e8605792882de113150b40049a849a536cb538d9e03c51f2f3cf2b28d0" }, "downloads": -1, "filename": "skorch-0.6.0-py3.6.egg", "has_sig": false, "md5_digest": "8ff6cd644bd6ca634c885934b6c7ee93", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 251157, "upload_time": "2019-06-19T15:12:46", "url": "https://files.pythonhosted.org/packages/49/7e/ded52f837fe8fb328ee2ba5ff3833e6216ed5654380560d7737141bb4c54/skorch-0.6.0-py3.6.egg" }, { "comment_text": "", "digests": { "md5": "b8fb6df3e9fc0ea50e9590e181fe5285", "sha256": "3c52f5874b0e231a1cb431b1af096a778aee9b4696f04332e94b0a768da9772a" }, "downloads": -1, "filename": "skorch-0.6.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b8fb6df3e9fc0ea50e9590e181fe5285", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 101810, "upload_time": "2019-06-19T15:12:43", "url": "https://files.pythonhosted.org/packages/c7/df/1e0be91bf4c91fce5f99cc4edd89d3dfc16930d3fc77588493558036a8d2/skorch-0.6.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "370ffef71611db35d604c9c6d288ef0f", "sha256": "4ee4c67bf8a412a5b583a1ac4c5e4b6b92c8d98ae9319eafa977ce8209e0fc93" }, "downloads": -1, "filename": "skorch-0.6.0.tar.gz", "has_sig": false, "md5_digest": "370ffef71611db35d604c9c6d288ef0f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 88357, "upload_time": "2019-06-19T15:12:49", "url": "https://files.pythonhosted.org/packages/c3/fc/517e70d1262daba416eb79b5a24a83b7da11dc4cad8d61f7034388cc3ea4/skorch-0.6.0.tar.gz" } ] }