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
Close
Hashes for minka-johann-haselberger-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bda98b5707222f4e8378df45c596d2a701d1cabfe8c65906cb3ce88d6ff0bbd |
|
MD5 | 686a96e9a7239ae0325e129565f54dfa |
|
BLAKE2b-256 | 10d6ef6b5cb0cf2d13aceb89ed40e03a84e5f15cbf0f47da3b187611801f117e |
Close
Hashes for minka_johann_haselberger-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 909f70a7f7b0e48b373edfb2d1cc6e33bd5783b93e3c25c816f7a29ff8d646d5 |
|
MD5 | 55726f11f79d723adeef5400dcdbee88 |
|
BLAKE2b-256 | 5831665013030bfcf1fea84f28a9ea61ca200d2b8af60e8e9549a9a5b55e2eca |