Skip to main content

Does one thing

Project description

embarrassingly

parallel

Example

from embarrassingly.parallel import Parallel
import optuna

def pre_objective(worker, trial):
    print('Hi this is worker ' + str(worker))
    x = [trial.suggest_float('x' + str(i), 0, 1) for i in range(3)]
    return x[0] + x[1] * x[2]

def test_optuna():
    objective = Parallel(pre_objective, num_workers=7)
    study = optuna.create_study()
    study.optimize(objective, n_trials=15)

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

embarrassingly-0.0.3.tar.gz (2.2 kB view hashes)

Uploaded Source

Built Distribution

embarrassingly-0.0.3-py3-none-any.whl (2.6 kB view hashes)

Uploaded Python 3

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