Large scale and asynchronous Hyperparameter and Architecture Optimization at your fingertips.
We are excited to announce the following updates in Syne Tune v0.13.0:
When running Bayesian optimization or MOBSTER, you can now choose the acquisition function which is optimized in order to select the next configuration to be evaluated, using the acq_function
and acq_function_kwargs
arguments in search_options
when creating the scheduler. Here are more details.
At present, we support the (negative) expected improvement ("ei"; default) and lower confidence bound ("lcb") acquisition functions. Your favorite acquisition function is missing? Why not implement it yourself (detailed hints are given here) and send us a pull request?
By default, the local backend makes use of all GPUs available on the instance it runs on. Using the gpus_to_use
argument of LocalBackend
, you can now restrict the backend to use a subset of these only. This is useful if the remaining GPUs are needed for something else, or if you want to benchmark under restricted conditions.
The new functions get_pareto_optimal
and get_pareto_set
filter results to obtain a Pareto optimal set. This is useful for visualizing the results from multi-objective hyperparameter optimization.
@aaronkl, @dependabot, @dependabot[bot], @mseeger and @wesk
We are excited to announce the following updates in Syne Tune v0.10.0:
Syne Tune now contains a wrapper allowing optimization with SMAC. We hope the integration will encourage more extensive benchmarking and allow users to leverage advanced features of SMAC.
Sometimes, one wants to resume a previous tuning, to tune a bit longer, perhaps rerun a failed tuning job, or rerun with restricted the search space. Given that this scenario is quite common, we added an example showing how to resume a previous tuning experiment and update the search space.
This is Syne Tuneβs first example that is written as a Jupyter notebook. It shows how to tune XGBoost with Syne Tune.
An efficient way to see how an experiment performed is to plot the results of trials over time. We added the following tool to make this easier:
from syne_tune.experiments import load_experiment
exp = load_experiment("PREVIOUS_EXPERIMENT_TAG")
exp.plot_trials_over_time()
Which generates plots that look like this:
examples/notebooks
and render them in docs page (#756) by @wesk@aaronkl, @dependabot, @dependabot[bot], @geoalgo, @mseeger and @wesk
You can now install Syne Tune with the command pip install 'syne-tune[basic]'
This installs Syne Tune with a recommended set of dependencies.
You can still customize your installation and install Syne Tune using all the existing options, including:
pip install syne-tune
, for the minimum dependenciespip install 'syne-tune[gpsearchers]'
, for built-in Gaussian process based optimizerspip install 'syne-tune[gpsearchers,aws]'
, for AWS SageMaker and gpsearchers
dependenciespip install 'syne-tune[extra]'
, for all dependenciesRefer to the Syne Tune documentation for more information.
@dependabot, @dependabot[bot], @mseeger and @wesk
We are excited to announce the following updates in Syne Tune v0.9.0
:
Syne Tune's experimentation framework (aka benchmarking framework) is moved from benchmarking/commons
to syne_tune/experiments
, so it can be used without installing Syne Tune from source. This framework makes it very easy to compose launcher scripts, run studies with many experiments in parallel, explore the different trial execution backends, and plot results aggregated from many experiments. Learn more in this tutorial.
Syne Tune contains a number of multi-objective tuning methods, which explore the Pareto frontier for a setup where multiple objectives matter. These are now easily available as MOASHA
, MORandomScalarizationBayesOpt
, NSGA2
, MOREA
, MOLinearScalarizationBayesOpt
in syne_tune/optimizer/baselines.py.
This extension of our developer tutorial shows how Bayesian optimization is implemented in Syne Tune. You learn how to implement a new surrogate model, a new acquisition function, or a new covariance function for Gaussian process models, or also how to combine existing GP code into a composite surrogate model.
In this release we fixed import bugs to make sure that many of our examples work with minimal dependencies, and also updated testing in our CI system.
There are several different ways you can install Syne Tune, including:
pip install syne-tune
, with core dependencies onlypip install 'syne-tune[aws]'
, for AWS dependenciespip install 'syne-tune[gpsearchers]'
, for Gaussian Process dependenciespip install 'syne-tune[moo]'
, for multi-objective dependenciespip install 'syne-tune[extra]'
, for all extra dependenciesThe full list of extras is available here.
Syne Tune allows you to install just the dependencies that you want to use for your use-case.
If your use case does not need Bayesian optimization, multi-objective support, and AWS, for example, you may be able to run with just core dependencies (obtained with pip install syne-tune
, as opposed to pip install syne-tune[extra]
or a related command which installs extra dependencies).
@geoalgo, @mseeger and @ystein
We are excited to announce the following new features in Syne Tune v0.8.0
:
β Congratulations to @eddiebergman for making their first contribution to Syne Tune and @sighellan for their latest contribution!
Users of Syne Tune can now use any surrogate model that conforms with SKLearn interface in the new flexible Bayesian Optimization (BO) Searcher; take advantage of state of the art BO with custom models without boilerplate code. Simply define your Estimator (responsible for fitting the predictor) and Predictor (responsible for making predictions) and pass them to SKLearnSurrogateSearcher
to take advantage of Bayesian Optimization (including acquisition functions, scheduling, etc.) in Syne Tune based on your custom models. Using models like BayesianRidge
can be as simple as the example below (see launch_sklearn_surrogate_bo for details).
class BayesianRidgePredictor(SKLearnPredictor):
def __init__(self, ridge: BayesianRidge):
self.ridge = ridge
def predict(self, X: np.ndarray) -> Tuple[np.ndarray, np.ndarray]:
return self.ridge.predict(X, return_std=True)
class BayesianRidgeEstimator(SKLearnEstimator):
def __init__(self, *args, **kwargs):
self.ridge = BayesianRidge(*args, **kwargs)
def fit(
self, X: np.ndarray, y: np.ndarray, update_params: bool
) -> SKLearnPredictor:
self.ridge.fit(X, y.ravel())
return BayesianRidgePredictor(ridge=copy.deepcopy(self.ridge))
searcher = SKLearnSurrogateSearcher(
config_space=config_space,
estimator=BayesianRidgeEstimator(),
)
scheduler = FIFOScheduler(
config_space,
metric=METRIC_ATTR,
mode=METRIC_MODE,
searcher=searcher,
)
Many state-of-the-art hyperparameter optimization (HPO) algorithms rely on model-based optimizers that learn surrogate models of the target function to guide the search. Gaussian processes are the de facto surrogate model due to their ability to capture uncertainty but they make strong assumptions about the observation noise, which might not be warranted in practice. In this work, we propose to leverage conformalized quantile regression which makes minimal assumptions about the observation noise and, as a result, models the target function in a more realistic and robust fashion which translates to quicker HPO convergence on empirical benchmarks. Read more about this work in Optimizing Hyperparameters with Conformal Quantile Regression and see example usage in launch_cqr_nasbench201.
Combine multiple surrogate models in a single method in the new Multi Surrogate Searcher. Define custom models for every objective, for example Gaussian process regressor for some and a simple lookup table for others, and use them together to efficiently sample the pareto front of your MO problem. This is the latest release in our ongoing effort to expand Syne Tuneβs coverage of multi-objective methods.
For the full list of multi-objective optimization methods that Syne Tune supports, refer to this table.
We provide an implementation of OTHPO, a transfer learning method that takes the intrinsic order of tasks into account, such as, for example HPO where the dataset is increasing over time. Instead of modelling tasks as a set, OTHPO models them as a sequence to focus on more recent tasks. The code for this paper by Hellan et al is now available in Syne Tune and the experiments can be found in benchmarking/nursery.
Plotting tools now allow for custom transformation to be applied on the results dataframe before aggregation. This allows users to define and plot new derived metrics based on recorded ones such as hypervolume indicator.
@aaronkl, @eddiebergman, @geoalgo, @jgolebiowski, @mseeger, @sighellan, @wesk and @wistuba
We are excited to announce the following new features in Syne Tune v0.7.0
:
As well as a variety of bug fixes and documentation improvements.
β Congratulations to @ystein for making their first contribution to Syne Tune!
Documentation: https://syne-tune.readthedocs.io/en/latest/tutorials/benchmarking/bm_plotting.html
Syne Tune now supports plotting tools which make it easy to visualize the results of comparative experiments.
For example, the below plots comparing model-based methods (MOBSTER and HYPERTUNE) against baseline methods (ASHA, SYNCHBOB, and BOHB) were generated using Syne Tune:
To learn how to use the plotting tools, refer to the tutorial.
The new backoff decorator makes it easier to avoid hitting SageMaker Training Job quota limits when running tuning jobs using the SageMaker backend. With this decorator, you can easily configure your code so that it automatically retries if you hit ResourceShareLimitExceededException
or similar errors, making your trials more resilient.
New in this release is support for NSGA-2, a popular genetic algorithm for multi-objective optimization that is frequently used in the literature. Our implementation is based on the pymoo library. This is the latest release in our ongoing effort to expand Syne Tuneβs coverage of multi-objective methods.
For the full list of multi-objective optimization methods that Syne Tune supports, refer to this table.
@aaronkl, @dependabot, @dependabot[bot], @jgolebiowski, @mseeger, @wesk and @ystein
In this release we introduce 1) New example for tuning Hugging Face models on the SWAG benchmark, and 2) LocalBackend allows for more than 1 GPU per trial.
Demonstrates how to automate fine-tuning of a Hugging Face transformer model on the SWAG benchmark.
You can specify num_gpus_per_trial
with the local backend now, so that trials can use more than 1 GPU for training.
ListTrainingJobs
throttling for E2E tests (#634) by @wesk@aaronkl, @dependabot, @dependabot[bot], @geoalgo, @mseeger and @wesk
In this release we introduce 1) Speculative early checkpoint removal, 2) Simple linear scalarization scheduler, 3) Plotting functions for multi-objective experiments, 4) Automatic termination criterion by Makarova et al., 5) support for custom results in results.csv.zip
, and 6) Downsampling of observed data for Bayesian Optimization.
Retaining all checkpoints often exhausts all available disk space when training large models. With this optional feature, Syne Tune can now automatically remove checkpoints that are unlikely to be needed. Syne Tune now offers early checkpoint removal. For ASHA, MOBSTER, or HYPERTUNE, this involves dedicated logic to decide which checkpoints can safely be removed early.
We have expanded the offering of Multi-Objective Schedulers in Syne Tune by adding a simple scalarized optimizer. The method works by taking a multi-objective problem and turning it into a single-objective task by optimizing for a linear combination of all objectives. This wrapper works with all single-objective schedulers.
We have added experiment and plotting support for multi-objective benchmarks. You can now compute hypervolume indicator the points suggested by Tuner and plot the progress. Similarly with all individual objectives as well as their scalarization.
This implements the automatic termination criterion proposed by Makarova et al. Instead of defining a fix number of iterations or wall-clock time limit, we can set a threshold on how much worse do we allow the final solution to be compared to the global optima, such that we automatically stop the optimization process, once we found a solution meeting this criteria.
It is now easy to add extra results to be written to the time-stamped dataframe, which by default stores all metric values recorded over time. This is useful, for example, to monitor the inner state of a scheduler.
Bayesian optimization computations scale cubically with the number of observations. You can now bound the maximum number of observations used in BO, using a combination of retaining the best metric values and random sampling.
ModuleNotFoundError: No module named 'examples'
error (#626) by @wesk@aaronkl, @dependabot, @dependabot[bot], @jgolebiowski, @mseeger, @sighellan and @wesk
We release version 0.4.1 which you can install with pip install syne-tune[extra]
.
Thanks to all contributors: @mseeger, @wesk, @sighellan, @aaronkl, @wistuba, @jgolebiowski, @610v4nn1, @geoalgo
benchmarking
We release version 0.4.0 which you can install with pip install syne-tune[extra]
.
Thanks to all contributors! @mseeger, @ondrejbohdal, @sighellan, @wistuba, @wesk, @jgolebiowski, @geoalgo, and @aaronkl
restrict_configurations
)max_size_data_for_model
)allow_duplicates
). Unify duplicate filtering across all searchersOrdinal
and OrdinalNearestNeighbor
in active_config_space
and
warmstartingbenchmarking
max_resource_attr
instead of max_t
RemoteLauncher
does not require custom container anymoreTensorboardCallback
: Logging of hyperparameters made optional, and updated
exampleBoTorchSearcher