nebius/SWE-bench-extra huggingface dataset:
Repository: fairlearn/fairlearn

Issue:
MetricFrame: missing error message
#### Describe the bug


#### Steps/Code to Reproduce
![image](https://user-images.githubusercontent.com/10245648/98857843-7bce5e00-2414-11eb-8ed8-1b123440f733.png)



```
from fairlearn.metrics import MetricFrame
from sklearn.metrics import balanced_accuracy_score
MetricFrame(balanced_accuracy_score, [1], [1], sensitive_features=[0])
```

#### Versions

System:
    python: 3.7.6 (default, Jan  8 2020, 20:23:39) [MSC v.1916 64 bit (AMD64)]
executable: C:\Users\<alias>\Anaconda3\python.exe
   machine: Windows-10-10.0.19041-SP0

Python dependencies:
    Cython: 0.29.15
matplotlib: 3.2.2
     numpy: 1.19.0
    pandas: 1.0.5
       pip: 20.0.2
     scipy: 1.4.1
setuptools: 45.2.0.post20200210
   sklearn: 0.23.1
    tempeh: 0.1.12


Comments:

Patch:
diff --git a/fairlearn/metrics/_metric_frame.py b/fairlearn/metrics/_metric_frame.py
index 1dd33d0..e8644f9 100644
--- a/fairlearn/metrics/_metric_frame.py
+++ b/fairlearn/metrics/_metric_frame.py
@@ -512,7 +512,7 @@ class MetricFrame:
                 result.append(GroupFeature(base_name, column, i, None))
         elif isinstance(features, list):
             if np.isscalar(features[0]):
-                f_arr = np.squeeze(np.asarray(features))
+                f_arr = np.atleast_1d(np.squeeze(np.asarray(features)))
                 assert len(f_arr.shape) == 1  # Sanity check
                 check_consistent_length(f_arr, sample_array)
                 result.append(GroupFeature(base_name, f_arr, 0, None))


Test patch:
diff --git a/test/unit/metrics/test_metricframe_smoke.py b/test/unit/metrics/test_metricframe_smoke.py
index a0787ab..1e18442 100644
--- a/test/unit/metrics/test_metricframe_smoke.py
+++ b/test/unit/metrics/test_metricframe_smoke.py
@@ -260,3 +260,9 @@ def test_duplicate_cf_sf_names():
                                 sensitive_features=sf,
                                 control_features=cf)
     assert execInfo.value.args[0] == msg
+
+
+def test_single_element_lists():
+    mf = metrics.MetricFrame(skm.balanced_accuracy_score,
+                             [1], [1], sensitive_features=[0])
+    assert mf.overall == 1
Repository: fastmonkeys/stellar

Issue:
ValueError: invalid literal for int() with base 10: '6beta1'
Related to following issue: #67 
I'm using Postgres 9.6beta1 on Linux.
The error happens when I try to take a snapshot.

Comments:

Patch:
diff --git a/README.md b/README.md
index 9e6bbaf..f6d3155 100644
--- a/README.md
+++ b/README.md
@@ -62,4 +62,4 @@ sqlalchemy.exc.OperationalError: (OperationalError) (1044, u"Access denied for u
 
 Make sure you have the rights to create new databases. See [Issue 10](https://github.com/fastmonkeys/stellar/issues/10) for discussion
 
-If you are using PostreSQL, make sure you have a database that is named the same as the unix username. You can test this by running just `psql`. (See [issue #44](https://github.com/fastmonkeys/stellar/issues/44) for details)
+If you are using PostgreSQL, make sure you have a database that is named the same as the unix username. You can test this by running just `psql`. (See [issue #44](https://github.com/fastmonkeys/stellar/issues/44) for details)
diff --git a/stellar/operations.py b/stellar/operations.py
index d1394ea..e5ba60d 100644
--- a/stellar/operations.py
+++ b/stellar/operations.py
@@ -1,4 +1,5 @@
 import logging
+import re
 
 import sqlalchemy_utils
 
@@ -27,7 +28,7 @@ def get_engine_url(raw_conn, database):
 def _get_pid_column(raw_conn):
     # Some distros (e.g Debian) may inject their branding into server_version
     server_version = raw_conn.execute('SHOW server_version;').first()[0]
-    version_string, _, _ = server_version.partition(' ')
+    version_string = re.search('^(\d+\.\d+)', server_version).group(0)
     version = [int(x) for x in version_string.split('.')]
     return 'pid' if version >= [9, 2] else 'procpid'
 


Test patch:
diff --git a/tests/test_operations.py b/tests/test_operations.py
index 2f6d7d3..62b1e2e 100644
--- a/tests/test_operations.py
+++ b/tests/test_operations.py
@@ -21,7 +21,7 @@ class TestGetPidColumn(object):
         assert _get_pid_column(raw_conn) == 'procpid'
 
     @pytest.mark.parametrize('version', [
-        '9.2', '9.3', '10.0', '9.2.1', '10.1.1',
+        '9.2', '9.3', '10.0', '9.2.1', '9.6beta1', '10.1.1',
         '10.3 (Ubuntu 10.3-1.pgdg16.04+1)'
     ])
     def test_returns_pid_for_version_equal_or_newer_than_9_2(self, version):