Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

The minka package

Project description


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



!pip install --upgrade PyYAML==4.2b4 optuna sacred python-telegram-bot dnspython loguru wandb pymongo


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):

    def prepare(self):

    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):

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]}


Project details

Download files

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

Files for minka-johann-haselberger, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size minka_johann_haselberger-1.0.1-py3-none-any.whl (4.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size minka-johann-haselberger-1.0.1.tar.gz (4.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page