Skip to main content

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

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

Release files for minka-johann-haselberger 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for minka-johann-haselberger 1.0.1
File Size Uploaded
minka-johann-haselberger-1.0.1.tar.gz 4.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for minka-johann-haselberger 1.0.1
File Interpreter ABI Platform
minka_johann_haselberger-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.3 kB

Release files / minka-johann-haselberger-1.0.1.tar.gz

Download URL minka-johann-haselberger-1.0.1.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9e7b461472f27ec7f43bc2b5ed8558819f0a1aeed4e3bcf48bbb3680022f638c
BLAKE2b-256 checksum
How to use checksums
f47d48e516e13f542c6e635376952550e20f04dfc8b95a8323e60716d889429a
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / minka_johann_haselberger-1.0.1-py3-none-any.whl

Download URL minka_johann_haselberger-1.0.1-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8429c1da280b93fafe9f5c4909235c5001a30b584886cbab4353bbe5c8df2c02
BLAKE2b-256 checksum
How to use checksums
7a4087bdc834db91b897a44ac9bfea2c115bc94d8bedff9d97d1217bfc49ed36
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page