Skip to content

External Optimizer Plugin

ropt.plugins.optimizer.external.ExternalOptimizer

Bases: Optimizer

Plugin class for optimization using an external process.

This class enables optimization via an external process, which performs the optimization independently and communicates with this class over pipes to request function evaluations, report optimizer states, and handle any errors.

Typically, the optimizer is specified within an OptimizerConfig via the method field, which either provides the algorithm name directly or follows the form plugin-name/method-name. In the first case, ropt searches among all available optimizer plugins to find the specified method. In the second case, it checks if the plugin identified by plugin-name contains method-name and, if so, uses it. Both of these are not supported by the external optimizer class. Instead, it requires that the method field includes both the plugin and method names in the format external/plugin-name/method-name or external/method-name. This ensures the external optimizer can identify and launch the specified optimization method method-name and launch it as an external process.