
Security News
Django Joins curl in Pushing Back on AI Slop Security Reports
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
An extension to Optuna which makes distributed hyperparameter optimization easy, and keeps all of the original Optuna semantics. Optuna-distributed can run locally, by default utilising all CPU cores, or can easily scale to many machines in Dask cluster.
Note
Optuna-distributed is still in the early stages of development. While core Optuna functionality is supported, few missing APIs (especially around Optuna integrations) might prevent this extension from being entirely plug-and-play for some users. Bug reports, feature requests and PRs are more than welcome.
pip install optuna-distributed
Optuna-distributed requires Python 3.8 or newer.
Optuna-distributed wraps standard Optuna study. The resulting object behaves just like regular study, but optimization process is asynchronous. Depending on setup of Dask client, each trial is scheduled to run on available CPU core on local machine, or physical worker in cluster.
Note
Running distributed optimization requires a Dask cluster with environment closely matching one on the client machine. For more information on cluster setup and configuration, please refer to https://docs.dask.org/en/stable/deploying.html.
import random
import time
import optuna
import optuna_distributed
from dask.distributed import Client
def objective(trial):
x = trial.suggest_float("x", -100, 100)
y = trial.suggest_categorical("y", [-1, 0, 1])
# Some expensive model fit happens here...
time.sleep(random.uniform(1.0, 2.0))
return x**2 + y
if __name__ == "__main__":
# client = Client("<your.cluster.scheduler.address>") # Enables distributed optimization.
client = None # Enables local asynchronous optimization.
study = optuna_distributed.from_study(optuna.create_study(), client=client)
study.optimize(objective, n_trials=10)
print(study.best_value)
But there's more! All of the core Optuna APIs, including storages, samplers and pruners are supported! If you'd like to know how Optuna-distributed works, then check out this article on Optuna blog.
study.stop
can't be called from trial at the moment.optuna.terminator
.FAQs
Distributed hyperparameter optimization made easy
We found that optuna-distributed demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.