Repository: evidentlyai/evidently
Issue: metrics/tests fail when data contains infinite values 
Root cause: Validation Gap

I've noticed that some parts of Evidently (such as `ColumnSummaryMetric`) handle infinite values in data, but other parts do not. 

The following metrics and tests raise errors during creation of the HTML report when infinite values are found in the data.
`ColumnSummaryMetric`
`ColumnValueRangeMetric`
`TestAllColumnsMostCommonValueShare`
`TestNumColumnsOutOfRangeValues`

A minimal example is shown below:

```
reference_df = pd.DataFrame.from_dict(
    {
        "id": {"0": 1, "1": 2},
        "B": {
            "0": -2,
            "1": -1,
        },
    }
)

current_df = pd.DataFrame.from_dict(
    {
        "id": {"0": 1, "1": 2},
        "B": {
            "0": -2,
            "1": np.inf,
        },
    }
)

# Define the data comparison tests report
report = TestSuite(
    tests=[
        ev_tests.TestNumColumnsOutOfRangeValues(),
    ],
)

# Create and save report
report.run(
    reference_data=reference_df, current_data=current_df
)

report.save_html("test.html")
```

An example traceback is shown below:
```
Traceback (most recent call last):
  File "/Users/kkhabaz/global-venv/lib/python3.9/site-packages/evidently/suite/base_suite.py", line 309, in run_checks
    test_results[test] = test.check()
  File "/Users/kkhabaz/global-venv/lib/python3.9/site-packages/evidently/tests/base_test.py", line 300, in check
    value = self.calculate_value_for_test()
  File "/Users/kkhabaz/global-venv/lib/python3.9/site-packages/evidently/tests/data_quality_tests.py", line 1174, in calculate_value_for_test
    return self.metric.get_result().current.share_not_in_range
  File "/Users/kkhabaz/global-venv/lib/python3.9/site-packages/evidently/base_metric.py", line 131, in get_result
    raise result.exception
  File "/Users/kkhabaz/global-venv/lib/python3.9/site-packages/evidently/suite/base_suite.py", line 291, in run_calculate
    calculations[calculation] = calculation.calculate(data)
  File "/Users/kkhabaz/global-venv/lib/python3.9/site-packages/evidently/metrics/data_quality/column_value_range_metric.py", line 124, in calculate
    cur_distribution, ref_distribution = get_distribution_for_column(
  File "/Users/kkhabaz/global-venv/lib/python3.9/site-packages/evidently/utils/visualizations.py", line 458, in get_distribution_for_column
    bins = np.histogram_bin_edges(pd.concat([current.dropna(), reference.dropna()]), bins="doane")
  File "<__array_function__ internals>", line 5, in histogram_bin_edges
  File "/Users/kkhabaz/global-venv/lib/python3.9/site-packages/numpy/lib/histograms.py", line 669, in histogram_bin_edges
    bin_edges, _ = _get_bin_edges(a, bins, range, weights)
  File "/Users/kkhabaz/global-venv/lib/python3.9/site-packages/numpy/lib/histograms.py", line 396, in _get_bin_edges
    first_edge, last_edge = _get_outer_edges(a, range)
  File "/Users/kkhabaz/global-venv/lib/python3.9/site-packages/numpy/lib/histograms.py", line 323, in _get_outer_edges
    raise ValueError(
ValueError: autodetected range of [-2.0, inf] is not finite
```

It seems that the underlying issue is that these metrics rely on `np.histogram_bin_edges()` but do not handle infinite values before feeding them into this function. Furthermore, the failure of a single metric or test seems to make the entire report fail to generate.

**Suggested Changes**: handle infinite values in the fail metrics and, more generally, contain errors/failures in report generation in `.save_html()`

I am using version `1.21.6` of numpy and version `0.2.7` of evidently.

Hi @kameelkhabaz ! 
Thanks for letting us know about this issue! We have fixed the error and the changes will be available in the next release.

fixed in https://github.com/evidentlyai/evidently/pull/617

Thank you!