Skip to main content

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

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


Download files

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

Source Distribution

minka-johann-haselberger-1.0.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

minka_johann_haselberger-1.0.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

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

Hashes for minka-johann-haselberger-1.0.1.tar.gz
Algorithm Hash digest
SHA256 9e7b461472f27ec7f43bc2b5ed8558819f0a1aeed4e3bcf48bbb3680022f638c
MD5 e0d625f0e683f6c8ab503d766360de62
BLAKE2b-256 f47d48e516e13f542c6e635376952550e20f04dfc8b95a8323e60716d889429a

See more details on using hashes here.

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

Hashes for minka_johann_haselberger-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8429c1da280b93fafe9f5c4909235c5001a30b584886cbab4353bbe5c8df2c02
MD5 addc5a70467707ac336295e06d478f15
BLAKE2b-256 7a4087bdc834db91b897a44ac9bfea2c115bc94d8bedff9d97d1217bfc49ed36

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page