poli.core.registry.register_problem

poli.core.registry.register_problem#

poli.core.registry.register_problem(problem_factory: AbstractProblemFactory, conda_environment_name: Optional[Union[str, Path]] = None, python_paths: Optional[List[str]] = None, force: bool = True, **kwargs)#

Registers a problem.

This function takes a problem factory, a conda environment, a list of python environments, and additional keyword arguments. With these, it creates a script that can be run to instantiate the problem factory in a separate process. It also sets the configuration so that the problem factory can be instantiated later.

Parameters
  • problem_factory (AbstractProblemFactory or str) – The problem factory to be registered.

  • conda_environment_name (str or Path) – The name or path of the conda environment to be used.

  • python_paths (List[str]) – A list of paths to append to the python path of the run script.

  • force (bool) – Flag indicating whether to overwrite the existing problem.

  • **kwargs (dict) – Additional keyword arguments to be passed to the problem factory.