Repository: kjappelbaum/pyepal (language: python)

Issue:
add conda installation instructions



Discussion / hints:

Fix patch:
diff --git a/README.md b/README.md
index e25859b..1afb066 100644
--- a/README.md
+++ b/README.md
@@ -2,16 +2,15 @@
  <img src="pyepal_logo.png" />
 </p>
 
-|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
-| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| Continuous integration      | ![Python package](https://github.com/kjappelbaum/pyepal/workflows/Python%20package/badge.svg) ![pre-commit](https://github.com/kjappelbaum/pyepal/workflows/pre-commit/badge.svg)                                                                                                                                                                                                                                                                                                                                                                                                       |
-| Code health                | [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/Naereen/StrapDown.js/graphs/commit-activity) [![Maintainability](https://api.codeclimate.com/v1/badges/db9b3f21528574dfb141/maintainability)](https://codeclimate.com/github/kjappelbaum/pyepal/maintainability) [![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/kjappelbaum/pyepal.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/kjappelbaum/pyepal/context:python) ![GitHub last commit](https://img.shields.io/github/last-commit/kjappelbaum/pyepal) [![codecov](https://codecov.io/gh/kjappelbaum/pyepal/branch/master/graph/badge.svg?token=BL2CF4HQ06)](https://codecov.io/gh/kjappelbaum/pyepal)|
-| Documentation and tutorial | [![Documentation Status](https://readthedocs.org/projects/pyepal/badge/?version=latest)](https://pyepal.readthedocs.io/en/latest/?badge=latest) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/kjappelbaum/pyepal/HEAD?filepath=examples)                                                                                                                                                                                                                                                                                                                  |
-| Social                     | [![Gitter](https://badges.gitter.im/kjappelbaum/pyepal.svg)](https://gitter.im/kjappelbaum/pyepal?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)                                                                                                                                                                                                                                                                                                                                                                                                                              |
-| Python                     | ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyepal) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)                                                                                                                                                                                                                                                                                                                                                                                                |
-| License                    | [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
-| [Citation](#citation) |[![Paper DOI](https://img.shields.io/badge/DOI-10.26434/chemrxiv.13200197.v1-blue.svg)](https://chemrxiv.org/articles/preprint/Bias_Free_Multiobjective_Active_Learning_for_Materials_Design_and_Discovery/13200197) [![Zenodo archive](https://zenodo.org/badge/253408969.svg)](https://zenodo.org/badge/latestdoi/253408969) |
-
+|                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
+| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| Continuous integration     | ![Python package](https://github.com/kjappelbaum/pyepal/workflows/Python%20package/badge.svg) ![pre-commit](https://github.com/kjappelbaum/pyepal/workflows/pre-commit/badge.svg)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
+| Code health                | [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/Naereen/StrapDown.js/graphs/commit-activity) [![Maintainability](https://api.codeclimate.com/v1/badges/db9b3f21528574dfb141/maintainability)](https://codeclimate.com/github/kjappelbaum/pyepal/maintainability) [![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/kjappelbaum/pyepal.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/kjappelbaum/pyepal/context:python) ![GitHub last commit](https://img.shields.io/github/last-commit/kjappelbaum/pyepal) [![codecov](https://codecov.io/gh/kjappelbaum/pyepal/branch/master/graph/badge.svg?token=BL2CF4HQ06)](https://codecov.io/gh/kjappelbaum/pyepal) |
+| Documentation and tutorial | [![Documentation Status](https://readthedocs.org/projects/pyepal/badge/?version=latest)](https://pyepal.readthedocs.io/en/latest/?badge=latest) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/kjappelbaum/pyepal/HEAD?filepath=examples)                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
+| Social                     | [![Gitter](https://badges.gitter.im/kjappelbaum/pyepal.svg)](https://gitter.im/kjappelbaum/pyepal?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
+| Python                     | ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyepal) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
+| License                    | [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
+| [Citation](#citation)      | [![Paper DOI](https://img.shields.io/badge/DOI-10.26434/chemrxiv.13200197.v1-blue.svg)](https://chemrxiv.org/articles/preprint/Bias_Free_Multiobjective_Active_Learning_for_Materials_Design_and_Discovery/13200197) [![Zenodo archive](https://zenodo.org/badge/253408969.svg)](https://zenodo.org/badge/latestdoi/253408969)                                                                                                                                                                                                                                                                                                                                                                                                          |
 
 Generalized Python implementation of a modified version of the ε-PAL algorithm [[1](#1), [2](#2)].
 
@@ -25,6 +24,12 @@ To install the latest stable release use
 pip install pyepal
 ```
 
+or the conda channel (recommended)
+
+```(bash)
+conda install pyepal -c conda-forge
+```
+
 to install the latest development version from the head use
 
 ```(bash)
@@ -35,10 +40,11 @@ Developers can install the extras `[testing, docs, pre-commit]`. Installation sh
 
 ### Additional Notes
 
-- On MacOS you might need to install `libomp` (e.g., `brew install libomp`) for multithreading in some of the models.
+- On macOS you might need to install `libomp` (e.g., `brew install libomp`) for multithreading in some models.
 
 - We currently support Python 3.7 and 3.8.
 
+- If you want to [limit how many CPUs openblas uses](https://github.com/numpy/numpy/issues/8120), you can `export OPENBLAS_NUM_THREADS=1`
 
 ## Usage
 
@@ -158,6 +164,7 @@ To measure the performance, you can use the `get_hypervolume` function from `pye
 2. <a name="2"></a> Zuluaga, M.; Sergent, G.; Krause, A.; Püschel, M. Active Learning for Multi-Objective Optimization; Dasgupta, S., McAllester, D., Eds.; Proceedings of machine learning research; PMLR: Atlanta, Georgia, USA, 2013; Vol. 28, pp 462–470.
 
 ## Citation
+
 <a name="citation"></a>
 
 If you find this code useful for your work, please cite:
diff --git a/docs/getting_started.rst b/docs/getting_started.rst
index f598714..401992e 100644
--- a/docs/getting_started.rst
+++ b/docs/getting_started.rst
@@ -13,6 +13,12 @@ To install the latest stable release use
 
     pip install pyepal
 
+or the conda channel (recommended)
+
+.. code-block:: bash
+
+    conda install pyepal -c conda-forge
+
 
 The latest version of PyePAL can be installed from GitHub using
 
@@ -21,9 +27,11 @@ The latest version of PyePAL can be installed from GitHub using
     pip install git+https://github.com/kjappelbaum/pyepal.git
 
 
-On MacOS you might need to install `libomp` (e.g., `brew install libomp`) for multihreading in some of the models.
+On macOS you might need to install `libomp` (e.g., `brew install libomp`) for multihreading in some models.
+
+If you want to `limit how many CPUs openblas uses <https://github.com/numpy/numpy/issues/8120>`_, you can :code:`export OPENBLAS_NUM_THREADS=1`
 
-Which class do i use?
+Which class do I use?
 -----------------------
 
 - For Gaussian processes built with :code:`sklearn` use :py:class:`~pyepal.pal.pal_sklearn.PALSklearn`
diff --git a/pyepal/pal/validate_inputs.py b/pyepal/pal/validate_inputs.py
index e9ff9ab..ed9e294 100644
--- a/pyepal/pal/validate_inputs.py
+++ b/pyepal/pal/validate_inputs.py
@@ -17,7 +17,6 @@
 """Methods to validate inputs for the PAL classes"""
 import collections
 import warnings
-from copy import deepcopy
 from typing import Any, Iterable, List, Sequence, Union
 
 import numpy as np
@@ -383,17 +382,13 @@ def _is_jaxoptimizer(optimizer: Any) -> bool:
 
 def validate_optimizers(optimizers: Any, ndim: int) -> Sequence:
     """Make sure that we can work with a Sequence if JaxOptimizer"""
-    if not isinstance(optimizers, collections.Sequence):
-        if not _is_jaxoptimizer(optimizers):
-            raise ValueError(
-                "You need to provide a `pyepal.models.nt.JaxOptimizer` instance"
-            )
-        return [deepcopy(optimizers) for _ in range(ndim)]
-
+    if not isinstance(optimizers, Sequence):
+        raise ValueError("You must have one optimizer per objective.")
     if not len(optimizers) == ndim:
         raise ValueError(
             "If you provide a sequence it must have one optimizer per objective."
         )
+
     for optimizer in optimizers:
         if not _is_jaxoptimizer(optimizer):
             raise ValueError(
diff --git a/pyepal/plotting/__init__.py b/pyepal/plotting/__init__.py
index 9795988..fa70bd8 100644
--- a/pyepal/plotting/__init__.py
+++ b/pyepal/plotting/__init__.py
@@ -285,8 +285,6 @@ def plot_residuals(  # pylint:disable=invalid-name
         ax[index].scatter(fitted, residuals)
         ax[index].spines["top"].set_color("none")
         ax[index].spines["right"].set_color("none")
-        ax[index].spines["left"].set_smart_bounds(True)
-        ax[index].spines["bottom"].set_smart_bounds(True)
 
     if labels is None:
         labels = [f"objective {i}" for i in range(num_targets)]
@@ -361,8 +359,6 @@ def plot_jointplot(  # pylint:disable=invalid-name
 
             ax[row, column].spines["top"].set_color("none")
             ax[row, column].spines["right"].set_color("none")
-            ax[row, column].spines["left"].set_smart_bounds(True)
-            ax[row, column].spines["bottom"].set_smart_bounds(True)
 
     if labels is None:
         labels = [f"objective {i}" for i in range(num_targets)]


Test patch:
diff --git a/tests/test_validate_inputs.py b/tests/test_validate_inputs.py
index ef92d8b..e98a5e3 100644
--- a/tests/test_validate_inputs.py
+++ b/tests/test_validate_inputs.py
@@ -274,7 +274,8 @@ def test_validate_optimizers():
         validate_optimizers([optimizer], 2)
 
     assert validate_optimizers(optimizers, 2) == optimizers
-    assert validate_optimizers(optimizer, 2) == optimizers
+    with pytest.raises(ValueError):
+        validate_optimizers(optimizer, 2)
 
 
 def test_validate_nt_models():