The minka package
Project description
About
Minka is ment to be a middleware between your optimization problem and a modular set of supporting tools to:
- automatically perform hyperparameter optimization
- store the results, parameter sets and custom data
- compare different training runs
- visualize the results and training processes
The aim of the project is to provide a simple as possible interface without the need to change your existing code.
One line to change it all
Could it be easier than just adding one line?
minka(yourOptimizationTask, 'configuration.json').opt(numberOfRuns)
Architecture overview
Usage
Installation
!pip install --upgrade PyYAML==4.2b4 optuna sacred python-telegram-bot dnspython loguru wandb pymongo
Preparation
- In order to store the data, a mongoDB is required. You can host your own free one here: https://cloud.mongodb.com
- If you want to use the w&b interface, an account is needed. Create one here: https://app.wandb.ai
Define your optimization problem
Minka uses a very simple combination of a configuration json file and the actual optimization task, represented as a single class.
optimization class
optimization template:
class yourOptimizationTask:
def __init__(self):
pass
def prepare(self):
pass
def run(self, config):
x = config['x']
result = (x - 2) ** 2
evalMetrics = {
'error': result
}
logArrays = {
'someValues': [1,2,3,4]
}
return result, evalMetrics, logArrays
def cleanup(self):
pass
parameter configuration
content of the configuration.json file:
{
"comment": "parameter types: fix, categorical, discrete_uniform, int, loguniform, uniform",
"parameters": {
"batchSize": {"type": "fix","values": 256},
"epochs": {"type": "fix","values": 75},
"x": {"type": "categorical","values": [11,22,26]}
}
}
Screenshots
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file minka-johann-haselberger-1.0.1.tar.gz.
File metadata
- Download URL: minka-johann-haselberger-1.0.1.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e7b461472f27ec7f43bc2b5ed8558819f0a1aeed4e3bcf48bbb3680022f638c
|
|
| MD5 |
e0d625f0e683f6c8ab503d766360de62
|
|
| BLAKE2b-256 |
f47d48e516e13f542c6e635376952550e20f04dfc8b95a8323e60716d889429a
|
File details
Details for the file minka_johann_haselberger-1.0.1-py3-none-any.whl.
File metadata
- Download URL: minka_johann_haselberger-1.0.1-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8429c1da280b93fafe9f5c4909235c5001a30b584886cbab4353bbe5c8df2c02
|
|
| MD5 |
addc5a70467707ac336295e06d478f15
|
|
| BLAKE2b-256 |
7a4087bdc834db91b897a44ac9bfea2c115bc94d8bedff9d97d1217bfc49ed36
|