From c67a6322c277be3fc23d0a97e6f9cfa283950bdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Gonz=C3=A1lez=20Duque?= Date: Mon, 28 Oct 2024 11:58:24 +0100 Subject: [PATCH] Revert "Adds a check on whether conda is installed when using isolation (#283)" This reverts commit a14a95426353406457046127168d01e5b2595799. --- src/poli/core/util/isolation/instancing.py | 11 ----------- src/poli/objective_repository/ehrlich/register.py | 13 ------------- 2 files changed, 24 deletions(-) diff --git a/src/poli/core/util/isolation/instancing.py b/src/poli/core/util/isolation/instancing.py index 89015f04..3d312816 100644 --- a/src/poli/core/util/isolation/instancing.py +++ b/src/poli/core/util/isolation/instancing.py @@ -3,7 +3,6 @@ import configparser import importlib import logging -import shutil import subprocess from pathlib import Path @@ -308,16 +307,6 @@ def instance_function_as_isolated_process( quiet: bool = False, **kwargs_for_black_box, ) -> ExternalFunction: - # Check if the user has conda installed - if shutil.which("conda") is None: - raise RuntimeError( - "Conda is not installed. For poli's isolation mechanisms to work, " - "we need conda to be installed.\n" - "If you are not interested in using conda, you can install all the " - "relevant dependencies for black boxes using pip and optional arguments.\n" - "Check the documentation of the black box you are interested in for more information." - ) - # Register the problem if it hasn't been registered. register_isolated_function(name=name, quiet=quiet) diff --git a/src/poli/objective_repository/ehrlich/register.py b/src/poli/objective_repository/ehrlich/register.py index 8f7d9614..48cd689d 100644 --- a/src/poli/objective_repository/ehrlich/register.py +++ b/src/poli/objective_repository/ehrlich/register.py @@ -25,8 +25,6 @@ from __future__ import annotations -import warnings - import numpy as np from poli.core.abstract_black_box import AbstractBlackBox @@ -108,12 +106,6 @@ def __init__( num_workers: int = None, evaluation_budget: int = float("inf"), ): - warnings.warn( - "The EhrlichBlackBox class is deprecated and will be removed in a future version. " - " Please use EhrlichHoloBlackBox after installing with pip install poli[ehrlich].", - DeprecationWarning, - ) - super().__init__(batch_size, parallelize, num_workers, evaluation_budget) self.alphabet = alphabet self.sequence_length = sequence_length @@ -442,11 +434,6 @@ def create( Closed-Form Test Functions for Biophysical Sequence Optimization Algorithms. arXiv preprint arXiv:2407.00236. https://arxiv.org/abs/2407.00236 """ - warnings.warn( - "The EhrlichProblemFactory class is deprecated and will be removed in a future version. " - " Please use EhrlichHoloProblemFactory after installing with pip install poli[ehrlich].", - DeprecationWarning, - ) if seed is not None: seed_python_numpy_and_torch(seed)