spotPython


NamespotPython JSON
Version 0.14.6 PyPI version JSON
download
home_pageNone
SummaryspotPython - Sequential Parameter Optimization in Python
upload_time2024-04-04 08:23:20
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseAGPL-3.0-or-later
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="left">
  <img height="200" src="img/spotLogo.png" alt="spot_logo">
</p>

# spotPython

Sequential Parameter Optimization in Python

* spotPython is a Python version of the well-known hyperparameter tuner SPOT, which has been developed in the R programming environment for statistical analysis for over a decade [bart21i].
* spotPython is a sequential model-based optimization (SMBO) method [BLP05].


# Installation

* Installation can be done with `pip`:

`pip install spotPython`

# spotPython Documentation

* Hyperparameter-tuning Cookbook: A guide for scikit-learn, PyTorch, river, and spotPython. Available at [https://sequential-parameter-optimization.github.io/spotPython/](https://sequential-parameter-optimization.github.io/spotPython/).

* [Bartz-Beielstein (2023). PyTorch Hyperparameter Tuning --- A Tutorial for spotPython (Working Paper)](https://arxiv.org/abs/2305.11930).

    > **Abstract**: The goal of hyperparameter tuning (or hyperparameter optimization) is to optimize the hyperparameters to improve the performance of the machine or deep learning model. spotPython ("Sequential Parameter Optimization Toolbox in Python") is the Python version of the well-known hyperparameter tuner SPOT, which has been developed in the R programming environment for statistical analysis for over a decade. PyTorch is an optimized tensor library for deep learning using GPUs and CPUs. This document shows how to integrate the spotPython hyperparameter tuner into the PyTorch training workflow.  As an example, the results of the CIFAR10 image classifier are used. In addition to an introduction to spotPython, this tutorial also includes a brief comparison with Ray Tune, a Python library for running experiments and tuning hyperparameters. This comparison is based on the PyTorch hyperparameter tuning tutorial. The advantages and disadvantages of both approaches are discussed. We show that spotPython achieves similar or even better results while being more flexible and transparent than Ray Tune.


# spotPython Features

* Some of the advantages of `spotPython` are:

  - Numerical and categorical hyperparameters.
  - Powerful surrogate models.
  - Flexible approach and easy to use.
  - Simple JSON files for the specification of the hyperparameters.
  - Extension of default and user specified network classes.
  - Noise handling techniques.
  - Tensorboard interaction.

# Citation

```bibtex
@ARTICLE{bart23earxiv,
       author = {{Bartz-Beielstein}, Thomas},
        title = "{PyTorch Hyperparameter Tuning -- A Tutorial for spotPython}",
      journal = {arXiv e-prints},
     keywords = {Computer Science - Machine Learning, Computer Science - Artificial Intelligence, Mathematics - Numerical Analysis, 68T07, A.1, B.8.0, G.1.6, G.4, I.2.8},
         year = 2023,
        month = may,
          eid = {arXiv:2305.11930},
        pages = {arXiv:2305.11930},
          doi = {10.48550/arXiv.2305.11930},
archivePrefix = {arXiv},
       eprint = {2305.11930},
 primaryClass = {cs.LG},
       adsurl = {https://ui.adsabs.harvard.edu/abs/2023arXiv230511930B},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
```


```bibtex
@book{bart21i,
	editor = {Bartz,Eva and Bartz-Beielstein, Thomas and Zaefferer, Martin and Mersmann, Olaf},
	isbn = {ISBN 978-981-19-5169-5},
	keywords = {bartzPublic},
	note = {in print},
	publisher = {Springer},
	title = {{Hyperparameter Tuning for Machine and Deep Learning with R - A Practical Guide}},
	year = {2022}
  url = {https://link.springer.com/book/10.1007/978-981-19-5170-1}
}
```

```bibtex
@inproceedings{BLP05,
	author = {Bartz-Beielstein, Thomas and Lasarczyk, Christian and Preuss, Mike},
	title = {{Sequential Parameter Optimization}},
	booktitle = {{Proceedings 2005 Congress on Evolutionary Computation (CEC'05), Edinburgh, Scotland}},
	date-added = {2016-10-30 11:44:52 +0000},
	date-modified = {2021-07-22 12:12:43 +0200},
	doi = {10.1109/CEC.2005.1554761},
	editor = {McKay, B and others},
	isbn = {0-7803-9363-5},
	issn = {1089-778X},
	pages = {773--780},
	publisher = {{IEEE Press}},
  address = {Piscataway NJ},
	year = {2005},
	url= {http://dx.doi.org/10.1109/CEC.2005.1554761}
  }

```

# Appendix

* This appendix contains some information on how to setup the development environment for spotPython.
Information provided here is not required for the installation of spotPython.

## Styleguide

Follow the Google Python Style Guide from [https://google.github.io/styleguide/pyguide.html]([https://google.github.io/styleguide/pyguide.html).


## Python

* Mac Users: Install [brew](https://brew.sh/index_de)
  * `brew install python` and `brew install graphviz` etc.

* Generate and activate a virtual environment, see [venv](https://docs.python.org/3/library/venv.html), e.g.,
  * `cd ~; python3 -m venv .venv`
  * `source ~/.venv/bin/activate`

### Python mkdocs

* `python -m pip install mkdocs mkdocs-gen-files mkdocs-literate-nav mkdocs-section-index mkdocs-material`
* `mkdocs build`
* `mkdocs serve`
* `http://127.0.0.1:8000/`


### Optimizing/Profiling Code

* [scipy lecture notes: optimizing code](https://scipy-lectures.org/advanced/optimizing/index.html)

## Editor/IDE

* Optional: Install [visualstudio](https://code.visualstudio.com)
* Optional: Install [quarto](https://quarto.org)


## Package Building

### Local Setup

* This information is based on [https://packaging.python.org/en/latest/tutorials/packaging-projects/](https://packaging.python.org/en/latest/tutorials/packaging-projects/)
* Information is stored in `pyproject.toml` (`setup.py` is not used anymore.)
* A `src` folder is used for the package sources.
* The following files are used for the package building:
   * `pyproject.toml`: see [pyproject.toml](./pyproject.toml). 
   * Important: Follow the instructions from [https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html](https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html) for including data files (like *.csv, *.tar, etc.). These files can be specified in the following `MANIFEST` file:
     * `MANIFEST`: see [MANIFEST](MANIFEST.in). It describes the data files to be included, e.g.:
       * `include src/spotPython/data/*.rst`
    * `LICENSE`: see [LICENSE](./LICENSE)

### Local Installation

* Perform the following steps to install the package:
  * Make sure you have the latest version of PyPA’s build installed:
    * `python3 -m pip install --upgrade build`
  * Start the package building process via:  `python3 -m build` 
  * This command should output a lot of text and once completed should generate two files in the `dist` directory.
  * You can use the local `spotPython*.tar.gz` file from the `dist` folder for your package installation with `pip`, e.g.;
  * `python3 -m pip install ./dist/spotPython-0.0.1.tar.gz`



            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "spotPython",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "\"T. Bartz-Beielstein\" <tbb@bartzundbartz.de>",
    "download_url": "https://files.pythonhosted.org/packages/53/ad/186d37902ccb86bce2616bac2c64a5943fcd73ced20b7cf6278a3ecbcaab/spotPython-0.14.6.tar.gz",
    "platform": null,
    "description": "<p align=\"left\">\n  <img height=\"200\" src=\"img/spotLogo.png\" alt=\"spot_logo\">\n</p>\n\n# spotPython\n\nSequential Parameter Optimization in Python\n\n* spotPython is a Python version of the well-known hyperparameter tuner SPOT, which has been developed in the R programming environment for statistical analysis for over a decade [bart21i].\n* spotPython is a sequential model-based optimization (SMBO) method [BLP05].\n\n\n# Installation\n\n* Installation can be done with `pip`:\n\n`pip install spotPython`\n\n# spotPython Documentation\n\n* Hyperparameter-tuning Cookbook: A guide for scikit-learn, PyTorch, river, and spotPython. Available at [https://sequential-parameter-optimization.github.io/spotPython/](https://sequential-parameter-optimization.github.io/spotPython/).\n\n* [Bartz-Beielstein (2023). PyTorch Hyperparameter Tuning --- A Tutorial for spotPython (Working Paper)](https://arxiv.org/abs/2305.11930).\n\n    > **Abstract**: The goal of hyperparameter tuning (or hyperparameter optimization) is to optimize the hyperparameters to improve the performance of the machine or deep learning model. spotPython (\"Sequential Parameter Optimization Toolbox in Python\") is the Python version of the well-known hyperparameter tuner SPOT, which has been developed in the R programming environment for statistical analysis for over a decade. PyTorch is an optimized tensor library for deep learning using GPUs and CPUs. This document shows how to integrate the spotPython hyperparameter tuner into the PyTorch training workflow.  As an example, the results of the CIFAR10 image classifier are used. In addition to an introduction to spotPython, this tutorial also includes a brief comparison with Ray Tune, a Python library for running experiments and tuning hyperparameters. This comparison is based on the PyTorch hyperparameter tuning tutorial. The advantages and disadvantages of both approaches are discussed. We show that spotPython achieves similar or even better results while being more flexible and transparent than Ray Tune.\n\n\n# spotPython Features\n\n* Some of the advantages of `spotPython` are:\n\n  - Numerical and categorical hyperparameters.\n  - Powerful surrogate models.\n  - Flexible approach and easy to use.\n  - Simple JSON files for the specification of the hyperparameters.\n  - Extension of default and user specified network classes.\n  - Noise handling techniques.\n  - Tensorboard interaction.\n\n# Citation\n\n```bibtex\n@ARTICLE{bart23earxiv,\n       author = {{Bartz-Beielstein}, Thomas},\n        title = \"{PyTorch Hyperparameter Tuning -- A Tutorial for spotPython}\",\n      journal = {arXiv e-prints},\n     keywords = {Computer Science - Machine Learning, Computer Science - Artificial Intelligence, Mathematics - Numerical Analysis, 68T07, A.1, B.8.0, G.1.6, G.4, I.2.8},\n         year = 2023,\n        month = may,\n          eid = {arXiv:2305.11930},\n        pages = {arXiv:2305.11930},\n          doi = {10.48550/arXiv.2305.11930},\narchivePrefix = {arXiv},\n       eprint = {2305.11930},\n primaryClass = {cs.LG},\n       adsurl = {https://ui.adsabs.harvard.edu/abs/2023arXiv230511930B},\n      adsnote = {Provided by the SAO/NASA Astrophysics Data System}\n}\n```\n\n\n```bibtex\n@book{bart21i,\n\teditor = {Bartz,Eva and Bartz-Beielstein, Thomas and Zaefferer, Martin and Mersmann, Olaf},\n\tisbn = {ISBN 978-981-19-5169-5},\n\tkeywords = {bartzPublic},\n\tnote = {in print},\n\tpublisher = {Springer},\n\ttitle = {{Hyperparameter Tuning for Machine and Deep Learning with R - A Practical Guide}},\n\tyear = {2022}\n  url = {https://link.springer.com/book/10.1007/978-981-19-5170-1}\n}\n```\n\n```bibtex\n@inproceedings{BLP05,\n\tauthor = {Bartz-Beielstein, Thomas and Lasarczyk, Christian and Preuss, Mike},\n\ttitle = {{Sequential Parameter Optimization}},\n\tbooktitle = {{Proceedings 2005 Congress on Evolutionary Computation (CEC'05), Edinburgh, Scotland}},\n\tdate-added = {2016-10-30 11:44:52 +0000},\n\tdate-modified = {2021-07-22 12:12:43 +0200},\n\tdoi = {10.1109/CEC.2005.1554761},\n\teditor = {McKay, B and others},\n\tisbn = {0-7803-9363-5},\n\tissn = {1089-778X},\n\tpages = {773--780},\n\tpublisher = {{IEEE Press}},\n  address = {Piscataway NJ},\n\tyear = {2005},\n\turl= {http://dx.doi.org/10.1109/CEC.2005.1554761}\n  }\n\n```\n\n# Appendix\n\n* This appendix contains some information on how to setup the development environment for spotPython.\nInformation provided here is not required for the installation of spotPython.\n\n## Styleguide\n\nFollow the Google Python Style Guide from [https://google.github.io/styleguide/pyguide.html]([https://google.github.io/styleguide/pyguide.html).\n\n\n## Python\n\n* Mac Users: Install [brew](https://brew.sh/index_de)\n  * `brew install python` and `brew install graphviz` etc.\n\n* Generate and activate a virtual environment, see [venv](https://docs.python.org/3/library/venv.html), e.g.,\n  * `cd ~; python3 -m venv .venv`\n  * `source ~/.venv/bin/activate`\n\n### Python mkdocs\n\n* `python -m pip install mkdocs mkdocs-gen-files mkdocs-literate-nav mkdocs-section-index mkdocs-material`\n* `mkdocs build`\n* `mkdocs serve`\n* `http://127.0.0.1:8000/`\n\n\n### Optimizing/Profiling Code\n\n* [scipy lecture notes: optimizing code](https://scipy-lectures.org/advanced/optimizing/index.html)\n\n## Editor/IDE\n\n* Optional: Install [visualstudio](https://code.visualstudio.com)\n* Optional: Install [quarto](https://quarto.org)\n\n\n## Package Building\n\n### Local Setup\n\n* This information is based on [https://packaging.python.org/en/latest/tutorials/packaging-projects/](https://packaging.python.org/en/latest/tutorials/packaging-projects/)\n* Information is stored in `pyproject.toml` (`setup.py` is not used anymore.)\n* A `src` folder is used for the package sources.\n* The following files are used for the package building:\n   * `pyproject.toml`: see [pyproject.toml](./pyproject.toml). \n   * Important: Follow the instructions from [https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html](https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html) for including data files (like *.csv, *.tar, etc.). These files can be specified in the following `MANIFEST` file:\n     * `MANIFEST`: see [MANIFEST](MANIFEST.in). It describes the data files to be included, e.g.:\n       * `include src/spotPython/data/*.rst`\n    * `LICENSE`: see [LICENSE](./LICENSE)\n\n### Local Installation\n\n* Perform the following steps to install the package:\n  * Make sure you have the latest version of PyPA\u2019s build installed:\n    * `python3 -m pip install --upgrade build`\n  * Start the package building process via:  `python3 -m build` \n  * This command should output a lot of text and once completed should generate two files in the `dist` directory.\n  * You can use the local `spotPython*.tar.gz` file from the `dist` folder for your package installation with `pip`, e.g.;\n  * `python3 -m pip install ./dist/spotPython-0.0.1.tar.gz`\n\n\n",
    "bugtrack_url": null,
    "license": "AGPL-3.0-or-later",
    "summary": "spotPython - Sequential Parameter Optimization in Python",
    "version": "0.14.6",
    "project_urls": {
        "Homepage": "https://www.spotseven.de",
        "Issues": "https://github.com/sequential-parameter-optimization/spotPython/issues",
        "Repository": "https://github.com/sequential-parameter-optimization/spotPython"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7b96394b9b0b58680de690183ce501fa968b0ac99adae4fc6190ab833a689a37",
                "md5": "2160ca146440ed04cfa24a188e215a44",
                "sha256": "614f6a73b5ea0ef8534f78e46bf4500c6cb880e40864c7d586a5b9bb6a2dca53"
            },
            "downloads": -1,
            "filename": "spotPython-0.14.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2160ca146440ed04cfa24a188e215a44",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 180192,
            "upload_time": "2024-04-04T08:23:14",
            "upload_time_iso_8601": "2024-04-04T08:23:14.643820Z",
            "url": "https://files.pythonhosted.org/packages/7b/96/394b9b0b58680de690183ce501fa968b0ac99adae4fc6190ab833a689a37/spotPython-0.14.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "53ad186d37902ccb86bce2616bac2c64a5943fcd73ced20b7cf6278a3ecbcaab",
                "md5": "fa0aad832cf9bf17f9405af925afe8cb",
                "sha256": "482cacf033f8cf01fc9eac78aede969105d047436fb6e75008f2e5bee5f3bcff"
            },
            "downloads": -1,
            "filename": "spotPython-0.14.6.tar.gz",
            "has_sig": false,
            "md5_digest": "fa0aad832cf9bf17f9405af925afe8cb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 7101884,
            "upload_time": "2024-04-04T08:23:20",
            "upload_time_iso_8601": "2024-04-04T08:23:20.702975Z",
            "url": "https://files.pythonhosted.org/packages/53/ad/186d37902ccb86bce2616bac2c64a5943fcd73ced20b7cf6278a3ecbcaab/spotPython-0.14.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-04 08:23:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sequential-parameter-optimization",
    "github_project": "spotPython",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "spotpython"
}
        
Elapsed time: 0.20637s