Skip to content

Commit

Permalink
Add progressbar section
Browse files Browse the repository at this point in the history
  • Loading branch information
be-marc committed Jan 23, 2021
1 parent 85e40d6 commit 0366ade
Show file tree
Hide file tree
Showing 22 changed files with 104 additions and 28 deletions.
5 changes: 3 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
* `ArchiveBest` stores no data but records the best scoring evaluation.
* Reduced runtime if `ObjectiveRFunDt` and a domain without trafo is used.
* `OptimizerDesignPoints` supports `ParamUty`.
* Start values for `OptimizerCmaes` abd `OptimizerNloptr` are created randomly or
from center of search space.
* Start values for `OptimizerCmaes` abd `OptimizerNloptr` are created randomly
or from center of search space.
* `Optimizer$optimize()` supports progress bars via the package `progressr`.

# bbotk 0.2.2

Expand Down
6 changes: 1 addition & 5 deletions R/Optimizer.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@
#' of the [OptimInstance] at the end in order to store the best point and its
#' estimated performance vector.
#'
#' @section Progress Bars:
#' `$optimize()` supports progress bars via the package \CRANpkg{progressr}
#' combined with a [Terminator]. Simply wrap the function in
#' `progressr::with_progress()` to enable them. We recommend to use package
#' \CRANpkg{progress} as backend; enable with `progressr::handlers("progress")`.
#' @template section_progress_bars
#' @export
Optimizer = R6Class("Optimizer",
public = list(
Expand Down
2 changes: 2 additions & 0 deletions R/OptimizerCmaes.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
#' For the meaning of the control parameters, see [adagio::pureCMAES()]. Note
#' that we have removed all control parameters which refer to the termination of
#' the algorithm and where our terminators allow to obtain the same behavior.
#'
#' @template section_progress_bars
#'
#' @export
#' @examples
Expand Down
2 changes: 2 additions & 0 deletions R/OptimizerDesignPoints.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#' \item{`design`}{[data.table::data.table]\cr
#' Design points to try in search, one per row.}
#' }
#'
#' @template section_progress_bars
#'
#' @export
#' @examples
Expand Down
2 changes: 2 additions & 0 deletions R/OptimizerGenSA.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#' For the meaning of the control parameters, see [GenSA::GenSA()]. Note that we
#' have removed all control parameters which refer to the termination of the
#' algorithm and where our terminators allow to obtain the same behavior.
#'
#' @template section_progress_bars
#'
#' @source
#' `r format_bib("tsallis_1996", "xiang_2013")`
Expand Down
2 changes: 2 additions & 0 deletions R/OptimizerGridSearch.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#' \item{`batch_size`}{`integer(1)`\cr
#' Maximum number of points to try in a batch.}
#' }
#'
#' @template section_progress_bars
#'
#' @export
#' @template example
Expand Down
2 changes: 2 additions & 0 deletions R/OptimizerNLoptr.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#' (`xtol_rel = 10^-4`, `xtol_abs = rep(0.0, length(x0))`, `ftol_rel = 0.0` and
#' `ftol_abs = 0.0`) are still available and implemented with their package
#' defaults. To deactivate these conditions, set them to `-1`.
#'
#' @template section_progress_bars
#'
#' @source
#' `r format_bib("johnson_2014")`
Expand Down
2 changes: 2 additions & 0 deletions R/OptimizerRandomSearch.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#' Maximum number of points to try in a batch.}
#' }
#'
#' @template section_progress_bars
#'
#' @source
#' `r format_bib("bergstra_2012")`
#'
Expand Down
8 changes: 5 additions & 3 deletions man-roxygen/param_search_space.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#' @param search_space ([paradox::ParamSet])\cr
#' Specifies the search space for the [Optimizer].
#' The [paradox::ParamSet] describes either a subset of the `domain` of the [Objective] or it describes a set of parameters together with a `trafo` function that transforms values from the search space to values of the domain.
#' Depending on the context, this value defaults to the domain of the objective.
#' Specifies the search space for the [Optimizer]. The [paradox::ParamSet]
#' describes either a subset of the `domain` of the [Objective] or it describes
#' a set of parameters together with a `trafo` function that transforms values
#' from the search space to values of the domain. Depending on the context, this
#' value defaults to the domain of the objective.
5 changes: 5 additions & 0 deletions man-roxygen/section_progress_bars.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#' @section Progress Bars:
#' `$optimize()` supports progress bars via the package \CRANpkg{progressr}
#' combined with a [Terminator]. Simply wrap the function in
#' `progressr::with_progress()` to enable them. We recommend to use package
#' \CRANpkg{progress} as backend; enable with `progressr::handlers("progress")`.
8 changes: 5 additions & 3 deletions man/Archive.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions man/ArchiveBest.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions man/OptimInstance.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions man/OptimInstanceMultiCrit.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions man/OptimInstanceSingleCrit.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions man/mlr_optimizers_cmaes.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions man/mlr_optimizers_design_points.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions man/mlr_optimizers_gensa.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions man/mlr_optimizers_grid_search.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions man/mlr_optimizers_nloptr.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions man/mlr_optimizers_random_search.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions man/transform_xdt_to_xss.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0366ade

Please sign in to comment.