internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: holoviz/holoviews

Issue:
Bokeh streams callback fails with convert_timestamp in Python 2.7
Discovered this while writing a BoundsX to review dates of a selected data points in a time series. It fails out and kills the stream.

https://github.com/ioam/holoviews/blob/9a6a630b727c8827a8bd6fbe77bf31e1f35a7e5a/holoviews/plotting/bokeh/util.py#L89

The output from browser console:
```
Python failed with the following traceback:
~/conda/lib/python2.7/site-packages/pyviz_comms/__init__.py _handle_msg L296
~/conda/lib/python2.7/site-packages/holoviews/plotting/bokeh/callbacks.py on_msg L121
~/conda/lib/python2.7/site-packages/holoviews/plotting/bokeh/callbacks.py _process_msg L821
~/conda/lib/python2.7/site-packages/holoviews/plotting/bokeh/util.py convert_timestamp L89
	AttributeError: 'module' object has no attribute 'timezone'
```


Discussion:
Is this a bug or just an unfortunate result of writing for 3.6+ and trying to support 2.7.15?
Both I guess. Should have added unit tests which would have caught this, since all core developers now use 3.6+.
I'm working on moving our code library to be 3.6+ compatible, but it isn't as simple as a conversion script unfortunately. Some dependencies have to be replaced so identifying replacements has been difficult. Library runs fine in 2.7.15 so I have to rely on that while working on updates. Should I just edit my install as a work around for the time being?
Sure, a PR would also be appreciated if you work out a fix. That way we can try to get the fix into the 1.11.2 release scheduled for later this week or early next week.
What's the reasoning behind not using [`dt.datetime.utcfromtimestamp`](https://docs.python.org/2/library/datetime.html#datetime.datetime.utcfromtimestamp) or was this overlooked?
Sounds like that was simply overlooked.

Resolving patch:
diff --git a/holoviews/plotting/bokeh/util.py b/holoviews/plotting/bokeh/util.py
--- a/holoviews/plotting/bokeh/util.py
+++ b/holoviews/plotting/bokeh/util.py
@@ -86,7 +86,7 @@ def convert_timestamp(timestamp):
     """
     Converts bokehJS timestamp to datetime64.
     """
-    datetime = dt.datetime.fromtimestamp(timestamp/1000., dt.timezone.utc)
+    datetime = dt.datetime.utcfromtimestamp(timestamp/1000.)
     return np.datetime64(datetime.replace(tzinfo=None))
 
 


Test patch:
Repository: holoviz/holoviews

Issue:
Supplying bokeh ticker to colorbar_opts fails
```
import holoviews as hv
from holoviews import dim
import numpy as np
hv.extension('bokeh')
from bokeh.models.tickers import LogTicker
x = np.random.rand(5,3)
hv.Points(x, ['x', 'y'], 'z').opts(
    size=10, color=dim('z'), padding=.1, 
    colorbar=True, colorbar_opts=dict(ticker=LogTicker()))
```
throws a 

```
TypeError [Call holoviews.ipython.show_traceback() for details]
MetaModel object got multiple values for keyword argument 'ticker'
```


Discussion:

Resolving patch:
diff --git a/holoviews/plotting/bokeh/element.py b/holoviews/plotting/bokeh/element.py
--- a/holoviews/plotting/bokeh/element.py
+++ b/holoviews/plotting/bokeh/element.py
@@ -1402,9 +1402,9 @@ def _draw_colorbar(self, plot, color_mapper, prefix=''):
         if any(isinstance(model, ColorBar) for model in getattr(plot, pos, [])):
             return
 
-        opts = dict(cbar_opts['opts'], **self._colorbar_defaults)
-        color_bar = ColorBar(color_mapper=color_mapper, ticker=ticker,
-                             **dict(opts, **self.colorbar_opts))
+        opts = dict(cbar_opts['opts'], color_mapper=color_mapper, ticker=ticker,
+                    **self._colorbar_defaults)
+        color_bar = ColorBar(**dict(opts, **self.colorbar_opts))
 
         plot.add_layout(color_bar, pos)
         self.handles[prefix+'colorbar'] = color_bar


Test patch:
diff --git a/holoviews/tests/plotting/bokeh/testelementplot.py b/holoviews/tests/plotting/bokeh/testelementplot.py
--- a/holoviews/tests/plotting/bokeh/testelementplot.py
+++ b/holoviews/tests/plotting/bokeh/testelementplot.py
@@ -15,7 +15,8 @@
 try:
     from bokeh.document import Document
     from bokeh.models import tools
-    from bokeh.models import FuncTickFormatter, PrintfTickFormatter, NumeralTickFormatter
+    from bokeh.models import (FuncTickFormatter, PrintfTickFormatter,
+                              NumeralTickFormatter, LogTicker)
 except:
     pass
 
@@ -400,6 +401,13 @@ def test_colormapper_min_max_colors(self):
         self.assertEqual(cmapper.low_color, 'red')
         self.assertEqual(cmapper.high_color, 'blue')
 
+    def test_custom_colorbar_ticker(self):
+        ticker = LogTicker()
+        img = Image(np.array([[0, 1], [2, 3]])).options(colorbar=True, colorbar_opts=dict(ticker=ticker))
+        plot = bokeh_renderer.get_plot(img)
+        colorbar = plot.handles['colorbar']
+        self.assertIs(colorbar.ticker, ticker)
+
     def test_explicit_categorical_cmap_on_integer_data(self):
         explicit_mapping = OrderedDict([(0, 'blue'), (1, 'red'), (2, 'green'), (3, 'purple')])
         points = Scatter(([0, 1, 2, 3], [0, 1, 2, 3], [0, 1, 2, 3]), vdims=['y', 'Category']).options(
Repository: holoviz/holoviews

Issue:
Bokeh warnings when making GridSpace
This screenshot shows the issue following the first example in the [reference gallery](http://holoviews.org/reference/containers/bokeh/GridSpace.html):

![image](https://user-images.githubusercontent.com/890576/56106133-4c3c3480-5f05-11e9-98e3-9392e6269565.png)

On HoloViews master and the latest bokeh release.


Discussion:

Resolving patch:
diff --git a/holoviews/plotting/bokeh/renderer.py b/holoviews/plotting/bokeh/renderer.py
--- a/holoviews/plotting/bokeh/renderer.py
+++ b/holoviews/plotting/bokeh/renderer.py
@@ -12,6 +12,7 @@
 from param.parameterized import bothmethod
 from bokeh.application.handlers import FunctionHandler
 from bokeh.application import Application
+from bokeh.core.validation.warnings import EMPTY_LAYOUT, MISSING_RENDERERS
 from bokeh.document import Document
 from bokeh.embed.notebook import encode_utf8, notebook_content
 from bokeh.io import curdoc, show as bkshow
@@ -26,7 +27,7 @@
 from ..plot import Plot, GenericElementPlot
 from ..renderer import Renderer, MIME_TYPES, HTML_TAGS
 from .widgets import BokehScrubberWidget, BokehSelectionWidget, BokehServerWidgets
-from .util import attach_periodic, compute_plot_size, bokeh_version
+from .util import attach_periodic, compute_plot_size, bokeh_version, silence_warnings
 
 NOTEBOOK_DIV = """
 {plot_div}
@@ -286,7 +287,8 @@ def _figure_data(self, plot, fmt='html', doc=None, as_script=False, **kwargs):
                 js = ''
         else:
             try:
-                js, div, _ = notebook_content(model)
+                with silence_warnings(EMPTY_LAYOUT, MISSING_RENDERERS):
+                    js, div, _ = notebook_content(model)
                 html = NOTEBOOK_DIV.format(plot_script=js, plot_div=div)
                 data = encode_utf8(html)
                 doc.hold()
diff --git a/holoviews/plotting/bokeh/util.py b/holoviews/plotting/bokeh/util.py
--- a/holoviews/plotting/bokeh/util.py
+++ b/holoviews/plotting/bokeh/util.py
@@ -15,6 +15,7 @@
 
 from bokeh.core.json_encoder import serialize_json # noqa (API import)
 from bokeh.core.properties import value
+from bokeh.core.validation import silence
 from bokeh.layouts import WidgetBox, Row, Column
 from bokeh.models import tools
 from bokeh.models import Model, ToolbarBox, FactorRange, Range1d, Plot, Spacer, CustomJS, GridBox
@@ -333,6 +334,20 @@ def compute_layout_properties(
              'plot_width'  : width})
 
 
+@contextmanager
+def silence_warnings(*warnings):
+    """
+    Context manager for silencing bokeh validation warnings.
+    """
+    for warning in warnings:
+        silence(warning)
+    try:
+        yield
+    finally:
+        for warning in warnings:
+            silence(warning, False)
+
+
 def empty_plot(width, height):
     """
     Creates an empty and invisible plot of the specified size.


Test patch:
Repository: holoviz/holoviews

Issue:
DataLink fails if NaN present
When there is a NaN present in the column shared by the two objects passed to DataLink, it fails, claiming `ValueError: DataLink can only be applied if overlapping dimension values are equal`

```
import holoviews as hv
import numpy as np
hv.extension('bokeh')
from holoviews.plotting.links import DataLink

x = np.random.rand(100,3)

# no problem:
x[0,1] = np.nan

# makes it fail:
# x[0,0] = np.nan

df = pd.DataFrame(x, columns=['x', 'y', 'z'])

a = hv.Scatter(df, 'x', 'z')
b = hv.Scatter(df, 'x', 'y')
DataLink(a,b)
l=a+b
l
```


Discussion:
Thanks, should be an easy fix, the array comparison simply needs to use equal_nan=True.

Resolving patch:
diff --git a/holoviews/plotting/bokeh/callbacks.py b/holoviews/plotting/bokeh/callbacks.py
--- a/holoviews/plotting/bokeh/callbacks.py
+++ b/holoviews/plotting/bokeh/callbacks.py
@@ -1313,7 +1313,7 @@ def __init__(self, root_model, link, source_plot, target_plot):
             col = np.asarray(src_cds.data[k])
             if not ((isscalar(v) and v == col) or
                     (v.dtype.kind not in 'iufc' and (v==col).all()) or
-                    np.allclose(v, np.asarray(src_cds.data[k]))):
+                    np.allclose(v, np.asarray(src_cds.data[k]), equal_nan=True)):
                 raise ValueError('DataLink can only be applied if overlapping '
                                  'dimension values are equal, %s column on source '
                                  'does not match target' % k)


Test patch:
diff --git a/holoviews/tests/plotting/bokeh/testlinks.py b/holoviews/tests/plotting/bokeh/testlinks.py
--- a/holoviews/tests/plotting/bokeh/testlinks.py
+++ b/holoviews/tests/plotting/bokeh/testlinks.py
@@ -125,3 +125,14 @@ def test_data_link_idempotent(self):
         self.assertEqual(len(Link.registry[table1]), 1)
         self.assertIn(link1, Link.registry[table1])
 
+    def test_data_link_nan(self):
+        arr = np.random.rand(3, 5)
+        arr[0, 0] = np.nan
+        data = {k: v for k, v in zip(['x', 'y', 'z'], arr)}
+        a = Scatter(data, 'x', 'z')
+        b = Scatter(data, 'x', 'y')
+        DataLink(a, b)
+        try:
+            bokeh_renderer.get_plot(a+b)
+        except:
+            self.fail()
Repository: holoviz/holoviews

Issue:
New rcparam warnings from matplotlib
Ran into this while running through pyviz tutorial:

<img width="985" alt="Screen Shot 2019-06-10 at 3 42 39 PM" src="https://user-images.githubusercontent.com/4806877/59222205-f1d2f380-8b96-11e9-9fdc-2b49ff343e38.png">



Discussion:
Seem like a high-priority. Let's aim to get this into a 1.12.4 release by next week.
See https://github.com/pyviz/holoviews/pull/3745

Resolving patch:
diff --git a/holoviews/plotting/mpl/plot.py b/holoviews/plotting/mpl/plot.py
--- a/holoviews/plotting/mpl/plot.py
+++ b/holoviews/plotting/mpl/plot.py
@@ -27,7 +27,13 @@ def _rc_context(rcparams):
     """
     Context manager that temporarily overrides the pyplot rcParams.
     """
-    deprecated = ['text.latex.unicode', 'examples.directory']
+    deprecated = [
+        'text.latex.unicode',
+        'examples.directory',
+        'savefig.frameon', # deprecated in MPL 3.1, to be removed in 3.3
+        'verbose.level', # deprecated in MPL 3.1, to be removed in 3.3
+        'verbose.fileo', # deprecated in MPL 3.1, to be removed in 3.3
+    ]
     old_rcparams = {k: mpl.rcParams[k] for k in mpl.rcParams.keys()
                     if mpl_version < '3.0' or k not in deprecated}
     mpl.rcParams.clear()


Test patch:
Repository: holoviz/holoviews

Issue:
UserWarning: Config option `use_jedi` not recognized by `IPCompleter`.
This error is show when I'm trying to import bokeh:
`hv.extension('bokeh')`

Product versions:
- numpy 1.16.4
- pandas 0.24.4
- bokeh 1.2.0
- holoviews 1.12.3
- hvplot 0.4.0


Discussion:
Which version of IPython do you have?
Python 3.6.8
Sorry, I was asking about **I**Python not Python itself. 
IPython 5.5.0
Could you try upgrading IPython to a more recent version? We should still make sure we are compatible with older versions but upgrading should be an easy fix.
Hm, I've seen this crop up in continuous integration too though IIRC.
I upgraded ipython to version 7.5.0 and now it is working.

Resolving patch:
diff --git a/holoviews/ipython/__init__.py b/holoviews/ipython/__init__.py
--- a/holoviews/ipython/__init__.py
+++ b/holoviews/ipython/__init__.py
@@ -3,10 +3,12 @@
 
 import param
 import holoviews
-from pyviz_comms import nb_mime_js
+
 from IPython import version_info
-from param import ipython as param_ext
+from IPython.core.completer import IPCompleter
 from IPython.display import HTML, publish_display_data
+from param import ipython as param_ext
+from pyviz_comms import nb_mime_js
 
 from ..core.dimension import LabelledData
 from ..core.tree import AttrTree
@@ -143,7 +145,7 @@ def __call__(self, *args, **params):
         if p.case_sensitive_completion:
             from IPython.core import completer
             completer.completions_sorting_key = self.completions_sorting_key
-        if not p.allow_jedi_completion:
+        if not p.allow_jedi_completion and hasattr(IPCompleter, 'use_jedi'):
             ip.run_line_magic('config', 'IPCompleter.use_jedi = False')
 
         resources = self._get_resources(args, params)


Test patch:
Repository: holoviz/holoviews

Issue:
hv.save broken on master 1.13.0a2.post31+gdc5fe0b
```

import xarray as xr
import holoviews as hv
ds = xr.tutorial.open_dataset('air_temperature').isel(time=slice(0, 15))

hv.save(hv.Dataset(ds).to.image(['lon', 'lat']), 'test.html')
```
```
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-8-29a6969eaffe> in <module>
      7 
      8 import holoviews as hv
----> 9 hv.save(hv.Dataset(ds).to.image(['lon', 'lat']), 'test.html', fmt='scrubber')

~/holoviews/holoviews/util/__init__.py in save(obj, filename, fmt, backend, resources, **kwargs)
    749         filename = str(filename.absolute())
    750     if isinstance(filename, basestring):
--> 751         supported = [mfmt for tformats in renderer_obj.mode_formats.values()
    752                      for mformats in tformats.values() for mfmt in mformats]
    753         formats = filename.split('.')

~/holoviews/holoviews/util/__init__.py in <listcomp>(.0)
    750     if isinstance(filename, basestring):
    751         supported = [mfmt for tformats in renderer_obj.mode_formats.values()
--> 752                      for mformats in tformats.values() for mfmt in mformats]
    753         formats = filename.split('.')
    754         if fmt == 'auto' and formats and formats[-1] != 'html':

AttributeError: 'list' object has no attribute 'values'
```


Discussion:

Resolving patch:
diff --git a/holoviews/util/__init__.py b/holoviews/util/__init__.py
--- a/holoviews/util/__init__.py
+++ b/holoviews/util/__init__.py
@@ -752,7 +752,7 @@ def save(obj, filename, fmt='auto', backend=None, resources='cdn', **kwargs):
         filename = str(filename.absolute())
     if isinstance(filename, basestring):
         supported = [mfmt for tformats in renderer_obj.mode_formats.values()
-                     for mformats in tformats.values() for mfmt in mformats]
+                     for mfmt in tformats]
         formats = filename.split('.')
         if fmt == 'auto' and formats and formats[-1] != 'html':
             fmt = formats[-1]


Test patch:
Repository: holoviz/holoviews

Issue:
Faceting methods not linking streams correctly
Currently it seems the faceting methods like .layout and .grid are not correctly linking streams. This means that when running:

```
aggregate(dmap).layout().cols(3)
```

The resulting plots do not have a linked range stream while this does work:

```
aggregate(dmap.layout()).cols(3)
```

Streams will appropriately have to be copied in this case.


Discussion:

Resolving patch:
diff --git a/holoviews/core/spaces.py b/holoviews/core/spaces.py
--- a/holoviews/core/spaces.py
+++ b/holoviews/core/spaces.py
@@ -1671,8 +1671,11 @@ def inner_fn(outer_vals, *key, **dynkwargs):
                         inner_vals = [(d.name, k) for d, k in inner_dims]
                         return self.select(**dict(outer_vals+inner_vals)).last
                     if inner_kdims or self.streams:
-                        group = self.clone(callback=partial(inner_fn, outer_vals),
-                                           kdims=inner_kdims)
+                        callback = Callable(partial(inner_fn, outer_vals),
+                                            inputs=[self])
+                        group = self.clone(
+                            callback=callback, kdims=inner_kdims
+                        )
                     else:
                         group = inner_fn(outer_vals, ())
                     groups.append((outer, group))


Test patch:
diff --git a/holoviews/tests/core/testdynamic.py b/holoviews/tests/core/testdynamic.py
--- a/holoviews/tests/core/testdynamic.py
+++ b/holoviews/tests/core/testdynamic.py
@@ -332,6 +332,9 @@ def plot_function(mydim, data):
         self.assertIsInstance(ndlayout[0], DynamicMap)
         data = np.array([(0, 0, 0), (1, 1, 1), (2, 2, 2)])
         buff.send(data)
+        self.assertIs(ndlayout[0].callback.inputs[0], dmap)
+        self.assertIs(ndlayout[1].callback.inputs[0], dmap)
+        self.assertIs(ndlayout[2].callback.inputs[0], dmap)
         self.assertEqual(ndlayout[0][()], Scatter([(0, 0)]))
         self.assertEqual(ndlayout[1][()], Scatter([(1, 1)]))
         self.assertEqual(ndlayout[2][()], Scatter([(2, 2)]))
Repository: holoviz/holoviews

Issue:
Contour/contourf don't handle datetimes
See #3079

E.g.:

```
import xarray as xr
import hvplot.xarray
ds = xr.tutorial.load_dataset('air_temperature')

ds.air.isel(lat=0).hvplot.contourf()
```
Contour/contourf don't handle datetimes
See #3079

E.g.:

```
import xarray as xr
import hvplot.xarray
ds = xr.tutorial.load_dataset('air_temperature')

ds.air.isel(lat=0).hvplot.contourf()
```


Discussion:

Resolving patch:
diff --git a/holoviews/operation/element.py b/holoviews/operation/element.py
--- a/holoviews/operation/element.py
+++ b/holoviews/operation/element.py
@@ -458,6 +458,7 @@ def _process(self, element, key=None):
             from matplotlib.contour import QuadContourSet
             from matplotlib.axes import Axes
             from matplotlib.figure import Figure
+            from matplotlib.dates import num2date, date2num
         except ImportError:
             raise ImportError("contours operation requires matplotlib.")
         extent = element.range(0) + element.range(1)[::-1]
@@ -477,6 +478,14 @@ def _process(self, element, key=None):
             ys = ys[:, :-1] + (np.diff(ys, axis=1)/2.)
         data = (xs, ys, zs)
 
+        # if any data is a datetime, transform to matplotlib's numerical format
+        data_is_datetime = tuple(isdatetime(arr) for k, arr in enumerate(data))
+        if any(data_is_datetime):
+            data = tuple(
+                date2num(d) if is_datetime else d
+                for d, is_datetime in zip(data, data_is_datetime)
+            )
+
         xdim, ydim = element.dimensions('key', label=True)
         if self.p.filled:
             contour_type = Polygons
@@ -514,6 +523,14 @@ def _process(self, element, key=None):
                 interior = []
                 polys = geom.to_polygons(closed_only=False)
                 for ncp, cp in enumerate(polys):
+                    if any(data_is_datetime[0:2]):
+                        # transform x/y coordinates back to datetimes
+                        xs, ys = np.split(cp, 2, axis=1)
+                        if data_is_datetime[0]:
+                            xs = np.array(num2date(xs))
+                        if data_is_datetime[1]:
+                            ys = np.array(num2date(ys))
+                        cp = np.concatenate((xs, ys), axis=1)
                     if ncp == 0:
                         exteriors.append(cp)
                         exteriors.append(empty)
@@ -523,7 +540,11 @@ def _process(self, element, key=None):
                     interiors.append(interior)
             if not exteriors:
                 continue
-            geom = {element.vdims[0].name: level, (xdim, ydim): np.concatenate(exteriors[:-1])}
+            geom = {
+                element.vdims[0].name:
+                num2date(level) if data_is_datetime[2] else level,
+                (xdim, ydim): np.concatenate(exteriors[:-1])
+            }
             if self.p.filled and interiors:
                 geom['holes'] = interiors
             paths.append(geom)


Test patch:
Repository: holoviz/holoviews

Issue:
Expose node_marker option on Graph
In https://github.com/bokeh/bokeh/pull/9572 I added support for modifying the node_marker on graphs, we should expose that option.


Discussion:

Resolving patch:
diff --git a/holoviews/plotting/bokeh/element.py b/holoviews/plotting/bokeh/element.py
--- a/holoviews/plotting/bokeh/element.py
+++ b/holoviews/plotting/bokeh/element.py
@@ -1022,7 +1022,8 @@ def _apply_transforms(self, element, data, ranges, style, group=None):
             if util.isscalar(val):
                 key = val
             else:
-                key = {'field': k}
+                # Node marker does not handle {'field': ...}
+                key = k if k == 'node_marker' else {'field': k} 
                 data[k] = val
 
             # If color is not valid colorspec add colormapper
diff --git a/holoviews/plotting/bokeh/graphs.py b/holoviews/plotting/bokeh/graphs.py
--- a/holoviews/plotting/bokeh/graphs.py
+++ b/holoviews/plotting/bokeh/graphs.py
@@ -56,7 +56,8 @@ class GraphPlot(CompositeElementPlot, ColorbarPlot, LegendPlot):
 
     style_opts = (['edge_'+p for p in fill_properties+line_properties] +
                   ['node_'+p for p in fill_properties+line_properties] +
-                  ['node_size', 'cmap', 'edge_cmap', 'node_cmap', 'node_radius'])
+                  ['node_size', 'cmap', 'edge_cmap', 'node_cmap',
+                   'node_radius', 'node_marker'])
 
     _nonvectorized_styles =  ['cmap', 'edge_cmap', 'node_cmap']
 


Test patch: