Skip to main content

spotGUI - GUI for the Sequential Parameter Optimization in Python

Project description

spot_logo

spotGUI

GUI for the 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 spotGUI

spotPython Documentation

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

  • Bartz-Beielstein (2023). PyTorch Hyperparameter Tuning --- A Tutorial for spotPython (Working Paper).

    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

@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}
}
@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}
}
@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.

Python

  • Mac Users: Install brew

    • brew install python and brew install graphviz etc.
  • Generate and activate a virtual environment, see venv, 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

Editor/IDE

Package Building

Local Setup

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

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spotGUI-0.2.4.tar.gz (5.9 MB view details)

Uploaded Source

Built Distribution

spotGUI-0.2.4-py3-none-any.whl (78.6 kB view details)

Uploaded Python 3

File details

Details for the file spotGUI-0.2.4.tar.gz.

File metadata

  • Download URL: spotGUI-0.2.4.tar.gz
  • Upload date:
  • Size: 5.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for spotGUI-0.2.4.tar.gz
Algorithm Hash digest
SHA256 01f7a01200d1bb42581f3edbbebe679b0ddbc189a2c5188d4bf8b005e2d2fe6c
MD5 c0f1666eba8a6097b8d17f83b46b07dd
BLAKE2b-256 e10ccfdf67c21b328a4e9304e084d01bd2bbf4dca765d36f37f1953a834d68dc

See more details on using hashes here.

File details

Details for the file spotGUI-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: spotGUI-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 78.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for spotGUI-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 179f7ec68a7e91d323517af4d7c118c3134f89b1984cf92f3340ac9cc7d4e7e5
MD5 02360a02585ef9b5d1b49869ce732fa1
BLAKE2b-256 e653bfea3b8897ed6d393ab0bea0bc4fa317207406f96ad1dc8a2ce5f4d62cdd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page