hyperopt

Distributed Asynchronous Hyperparameter Optimization in Python

https://github.com/hyperopt/hyperopt

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    7 of 104 committers (6.7%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.9%) to scientific vocabulary

Keywords

hacktoberfest

Keywords from Contributors

optimizing-compiler tensor distributed hyperparameter-optimization mlops parallel agents observability llmops ai-governance
Last synced: 10 months ago · JSON representation

Repository

Distributed Asynchronous Hyperparameter Optimization in Python

Basic Info
Statistics
  • Stars: 7,417
  • Watchers: 118
  • Forks: 1,066
  • Open Issues: 43
  • Releases: 0
Topics
hacktoberfest
Created almost 15 years ago · Last pushed over 1 year ago
Metadata Files
Readme License

README.md

Hyperopt: Distributed Hyperparameter Optimization

build pre-commit.ci status PyPI version Anaconda-Server Badge

Hyperopt is a Python library for serial and parallel optimization over awkward search spaces, which may include real-valued, discrete, and conditional dimensions.

Getting started

Install hyperopt from PyPI

bash pip install hyperopt

to run your first example

```python

define an objective function

def objective(args): case, val = args if case == 'case 1': return val else: return val ** 2

define a search space

from hyperopt import hp space = hp.choice('a', [ ('case 1', 1 + hp.lognormal('c1', 0, 1)), ('case 2', hp.uniform('c2', -10, 10)) ])

minimize the objective over the space

from hyperopt import fmin, tpe, spaceeval best = fmin(objective, space, algo=tpe.suggest, maxevals=100)

print(best)

-> {'a': 1, 'c2': 0.01420615366247227}

print(space_eval(space, best))

-> ('case 2', 0.01420615366247227}

```

Contributing

If you're a developer and wish to contribute, please follow these steps.

Setup (based on this)

  1. Create an account on GitHub if you do not already have one.

  2. Fork the project repository: click on the ‘Fork’ button near the top of the page. This creates a copy of the code under your account on the GitHub user account. For more details on how to fork a repository see this guide.

  3. Clone your fork of the hyperopt repo from your GitHub account to your local disk:

bash git clone https://github.com/<github username>/hyperopt.git cd hyperopt

  1. Create environment with:
    $ python3 -m venv my_env or $ python -m venv my_env or with conda:
    $ conda create -n my_env python=3

  2. Activate the environment:
    $ source my_env/bin/activate
    or with conda:
    $ conda activate my_env

  3. Install dependencies for extras (you'll need these to run pytest): Linux/UNIX: $ pip install -e '.[MongoTrials, SparkTrials, ATPE, dev]'

or Windows:

cmd pip install -e .[MongoTrials] pip install -e .[SparkTrials] pip install -e .[ATPE] pip install -e .[dev]

  1. Add the upstream remote. This saves a reference to the main hyperopt repository, which you can use to keep your repository synchronized with the latest changes:

    $ git remote add upstream https://github.com/hyperopt/hyperopt.git

    You should now have a working installation of hyperopt, and your git repository properly configured. The next steps now describe the process of modifying code and submitting a PR:

  2. Synchronize your master branch with the upstream master branch:

    bash git checkout master git pull upstream master

  3. Create a feature branch to hold your development changes:

    $ git checkout -b my_feature

    and start making changes. Always use a feature branch. It’s good practice to never work on the master branch!

  4. We recommend to use Black to format your code before submitting a PR which is installed automatically in step 6.

  5. Then, once you commit ensure that git hooks are activated (Pycharm for example has the option to omit them). This can be done using pre-commit, which is installed automatically in step 6, as follows:

    bash pre-commit install

    This will run black automatically when you commit on all files you modified, failing if there are any files requiring to be blacked. In case black does not run execute the following:

    bash black {source_file_or_directory}

  6. Develop the feature on your feature branch on your computer, using Git to do the version control. When you’re done editing, add changed files using git add and then git commit:

    bash git add modified_files git commit -m "my first hyperopt commit"

  7. The tests for this project use PyTest and can be run by calling pytest.

  8. Record your changes in Git, then push the changes to your GitHub account with:

    bash git push -u origin my_feature

Note that dev dependencies require python 3.6+.

Algorithms

Currently three algorithms are implemented in hyperopt:

Hyperopt has been designed to accommodate Bayesian optimization algorithms based on Gaussian processes and regression trees, but these are not currently implemented.

All algorithms can be parallelized in two ways, using:

Documentation

Hyperopt documentation can be found here, but is partly still hosted on the wiki. Here are some quick links to the most relevant pages:

Related Projects

Examples

See projects using hyperopt on the wiki.

Announcements mailing list

Announcements

Discussion mailing list

Discussion

Cite

If you use this software for research, please cite the paper (http://proceedings.mlr.press/v28/bergstra13.pdf) as follows:

Bergstra, J., Yamins, D., Cox, D. D. (2013) Making a Science of Model Search: Hyperparameter Optimization in Hundreds of Dimensions for Vision Architectures. TProc. of the 30th International Conference on Machine Learning (ICML 2013), June 2013, pp. I-115 to I-23.

Thanks

This project has received support from

  • National Science Foundation (IIS-0963668),
  • Banting Postdoctoral Fellowship program,
  • National Science and Engineering Research Council of Canada (NSERC),
  • D-Wave Systems, Inc.

Owner

  • Name: hyperopt
  • Login: hyperopt
  • Kind: organization

GitHub Events

Total
  • Commit comment event: 1
  • Issues event: 138
  • Watch event: 236
  • Issue comment event: 121
  • Push event: 6
  • Pull request event: 6
  • Fork event: 25
Last Year
  • Commit comment event: 1
  • Issues event: 138
  • Watch event: 236
  • Issue comment event: 121
  • Push event: 6
  • Pull request event: 6
  • Fork event: 25

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 1,057
  • Total Committers: 104
  • Avg Commits per committer: 10.163
  • Development Distribution Score (DDS): 0.429
Past Year
  • Commits: 3
  • Committers: 3
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.667
Top Committers
Name Email Commits
James Bergstra j****a@g****m 604
Dan Yamins d****s@g****m 110
Max Pumperla m****a@g****m 84
marload r****8@g****m 44
WeichenXu w****u@d****m 17
David Warde-Farley w****r@i****a 11
Hristijan Bogoevski h****i@g****m 11
Aarni Koskela a****x@i****i 8
Marc Torrellas m****o@g****m 7
Lu Wang 3****l 6
Christian Clauss c****s@m****m 6
Hannes Schulz s****z@a****e 6
Liang Zhang l****g@d****m 6
Robert Parini r****i@g****m 5
Brent Komer b****r@g****m 5
lx l****b@g****m 4
Magda Stenius s****y@g****m 4
mandjevant 3****t 4
Thomas Wiecki t****i@g****m 4
Quentin q****d@g****m 4
Michael Mior m****r@m****u 4
Will Groves w****l@g****m 3
pre-commit-ci[bot] 6****] 3
Jake Bian j****e@k****o 3
Philip May e****o@g****m 3
LeowWB 4****B 3
Harish Rajagopal h****s@g****m 3
Andrej Palička a****a@g****m 2
Nicolas Pinto p****o@a****u 2
Sam Hiatt s****t@g****m 2
and 74 more...

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 432
  • Total pull requests: 43
  • Average time to close issues: about 5 years
  • Average time to close pull requests: 7 months
  • Total issue authors: 329
  • Total pull request authors: 31
  • Average comments per issue: 3.33
  • Average comments per pull request: 1.7
  • Merged pull requests: 26
  • Bot issues: 0
  • Bot pull requests: 6
Past Year
  • Issues: 9
  • Pull requests: 6
  • Average time to close issues: 4 months
  • Average time to close pull requests: 2 months
  • Issue authors: 9
  • Pull request authors: 5
  • Average comments per issue: 0.78
  • Average comments per pull request: 0.17
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 2
Top Authors
Issue Authors
  • jaberg (44)
  • yamins81 (6)
  • dwf (5)
  • Arktius (4)
  • PhilipMay (4)
  • ghost (3)
  • shaddyab (3)
  • david-waterworth (3)
  • NormanTUD (3)
  • guillaume-chevalier (3)
  • ernestum (3)
  • dwiel (2)
  • JadBatmobile (2)
  • bkozyrskiy (2)
  • bacalfa (2)
Pull Request Authors
  • pre-commit-ci[bot] (7)
  • akx (4)
  • genixpro (3)
  • rharish101 (3)
  • MorrisNein (2)
  • freekboutkan-ah (2)
  • FrankwaP (2)
  • stevetracvc (2)
  • bluestealth (2)
  • nikhilgupta0 (2)
  • NickHilton (2)
  • zzz4zzz (2)
  • WeichenXu123 (2)
  • andriyor (1)
  • marctorsoc (1)
Top Labels
Issue Labels
Stale (350) wishlist (14) bug (10) hacktoberfest (4) doc wish (2)
Pull Request Labels
Stale (8)

Packages

  • Total packages: 12
  • Total downloads:
    • pypi 2,858,643 last-month
  • Total docker downloads: 24,566,934
  • Total dependent packages: 147
    (may contain duplicates)
  • Total dependent repositories: 2,125
    (may contain duplicates)
  • Total versions: 65
  • Total maintainers: 4
pypi.org: hyperopt

Distributed Asynchronous Hyperparameter Optimization

  • Versions: 13
  • Dependent Packages: 139
  • Dependent Repositories: 2,105
  • Downloads: 2,854,920 Last month
  • Docker Downloads: 24,566,934
Rankings
Dependent packages count: 0.1%
Downloads: 0.2%
Dependent repos count: 0.2%
Stargazers count: 0.3%
Average: 0.5%
Docker downloads count: 0.7%
Forks count: 1.3%
Maintainers (2)
Last synced: 10 months ago
alpine-v3.18: py3-hyperopt-pyc

Precompiled Python bytecode for py3-hyperopt

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 1.0%
Forks count: 1.8%
Stargazers count: 2.3%
Maintainers (1)
Last synced: 10 months ago
alpine-v3.18: py3-hyperopt

Distributed Asynchronous Hyperparameter Optimization in Python

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 1.0%
Forks count: 1.8%
Stargazers count: 2.3%
Maintainers (1)
Last synced: 10 months ago
alpine-edge: py3-hyperopt-pyc

Precompiled Python bytecode for py3-hyperopt

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 1.8%
Stargazers count: 2.3%
Average: 4.6%
Dependent packages count: 14.3%
Maintainers (1)
Last synced: about 1 year ago
alpine-edge: py3-hyperopt

Distributed Asynchronous Hyperparameter Optimization in Python

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 1.7%
Stargazers count: 2.2%
Average: 4.6%
Dependent packages count: 14.6%
Maintainers (1)
Last synced: about 1 year ago
alpine-v3.13: py3-hyperopt

Distributed Asynchronous Hyperparameter Optimization in Python

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 1.6%
Stargazers count: 1.9%
Average: 5.7%
Dependent packages count: 19.5%
Maintainers (1)
Last synced: 10 months ago
conda-forge.org: hyperopt

Hyperopt is a Python library for serial and parallel optimization over awkward search spaces, which may include real-valued, discrete, and conditional dimensions.

  • Versions: 7
  • Dependent Packages: 8
  • Dependent Repositories: 20
Rankings
Stargazers count: 4.2%
Forks count: 4.8%
Average: 6.0%
Dependent packages count: 7.1%
Dependent repos count: 7.9%
Last synced: 10 months ago
alpine-v3.14: py3-hyperopt

Distributed Asynchronous Hyperparameter Optimization in Python

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 1.5%
Stargazers count: 1.8%
Average: 6.3%
Dependent packages count: 21.7%
Maintainers (1)
Last synced: 10 months ago
alpine-v3.15: py3-hyperopt

Distributed Asynchronous Hyperparameter Optimization in Python

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 1.5%
Stargazers count: 1.9%
Average: 7.3%
Dependent packages count: 25.6%
Maintainers (1)
Last synced: 10 months ago
alpine-v3.16: py3-hyperopt

Distributed Asynchronous Hyperparameter Optimization in Python

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 1.5%
Stargazers count: 1.9%
Average: 7.7%
Dependent packages count: 27.3%
Maintainers (1)
Last synced: 10 months ago
alpine-v3.17: py3-hyperopt

Distributed Asynchronous Hyperparameter Optimization in Python

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 1.7%
Stargazers count: 2.2%
Average: 7.8%
Dependent packages count: 27.3%
Maintainers (1)
Last synced: 10 months ago
pypi.org: quantybt

lightweight backtesting framework with in-built advanced statistical backtesting methods and custom models

  • Versions: 35
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 3,723 Last month
Rankings
Stargazers count: 1.6%
Forks count: 2.6%
Dependent packages count: 9.3%
Average: 16.4%
Dependent repos count: 52.3%
Maintainers (1)
Last synced: about 1 year ago

Dependencies

setup.py pypi
  • cloudpickle *
  • future *
  • networkx >=2.2
  • numpy >=1.17
  • py4j *
  • scipy *
  • six *
  • tqdm *
.github/workflows/pre-commit.yml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/setup-python v2 composite