Skip to main content

Conf-Generator is a tool for specifying and exploring hyper-parameters sets in Machine Learning pipelines defined through configuration files.

Project description

Conf-Generator is a tool for specifying and exploring hyper-parameters sets in Machine Learning pipelines defined through configuration files.

A typical configuration instance to train a model would look like this:

model: resnet
learning_rate: 0.01
training_epochs: 10

With Conf-Generator it is possible to specify multiple configurations representing parameter exploration:

model: resnet
$learning_rate: [0.01, 0.005]
$training_epochs: [10, 20]

The $ prefix is used to specify the varying parameters. The configurations can be generated with the following snippet:

from conf_generator import ConfGenerator

exp = ConfGenerator("some/config.yml")
for conf, summary in exp.generate():
   print(conf)

The generator generates the configurations as python dictionary objects:

{'learning_rate': 0.01, 'training_epochs': 10, 'model': 'resnet'}
{'learning_rate': 0.01, 'training_epochs': 20, 'model': 'resnet'}
{'learning_rate': 0.005, 'training_epochs': 10, 'model': 'resnet'}
{'learning_rate': 0.005, 'training_epochs': 20, 'model': 'resnet'}

The cartesian product is made over the varying parameters if those are defined using lists, we can tie them using dictionaries:

model: resnet
$learning_rate: {a:0.01, b:0.005}
$training_epochs: {a:10, b:20}

Output:

{'learning_rate': 0.01, 'training_epochs': 10, 'model': 'resnet'}
{'learning_rate': 0.005, 'training_epochs': 20, 'model': 'resnet'}

Keys can be joined using |:

model: resnet
$learning_rate: {a: 0.01, b: 0.001, c: 0.1}
$training_epochs: {a|b: 20, c: 10}

Output:

{'learning_rate': 0.01, 'training_epochs': 20, 'model': 'resnet'}
{'learning_rate': 0.001, 'training_epochs': 20, 'model': 'resnet'}
{'learning_rate': 0.1, 'training_epochs': 10, 'model': 'resnet'}

Nesting is possible:

model: resnet
$$learning_rate: [{a: 0.01, b: 0.001}, {a: 0.05, b: 0.005}]
$training_epochs: {a: 10, b: 20}

Output:

{'learning_rate': 0.01, 'model': 'resnet', 'training_epochs': 10}
{'learning_rate': 0.05, 'model': 'resnet', 'training_epochs': 10}
{'learning_rate': 0.001, 'model': 'resnet', 'training_epochs': 20}
{'learning_rate': 0.005, 'model': 'resnet', 'training_epochs': 20}

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

conf-generator-1.0.1.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

conf_generator-1.0.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file conf-generator-1.0.1.tar.gz.

File metadata

  • Download URL: conf-generator-1.0.1.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.0

File hashes

Hashes for conf-generator-1.0.1.tar.gz
Algorithm Hash digest
SHA256 999f3cf73da43849cac43af39d898bc1b54ba8fc250fd9cb181637891a863790
MD5 8f251660eb83f73dcfa831a518b8cbca
BLAKE2b-256 dddb4be0fb525067a84f5b7d0bab2cd995236237e374f5b9e5174cb1a8c1c600

See more details on using hashes here.

File details

Details for the file conf_generator-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: conf_generator-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.0

File hashes

Hashes for conf_generator-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b21e5ff1d69ecac70ba6830ccc71c42ebf5e8920b37e5bf290d82eca5d3e911f
MD5 4df80be922f4bbe466eafd8b98c70136
BLAKE2b-256 ac866baf0fcd0dd089863f22575e832f53c306d55569445fd3b98701cd9a28a0

See more details on using hashes here.

Supported by

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