question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

canvas.line freezes indefinitely with numba 0.51.1

See original GitHub issue

ALL software version info

python 3.8 numba 0.51.1 datashader 0.11.1 bokeh 2.2.0 numpy 1.19.1

Description of expected behavior and the observed behavior

Observed behavior: canvas.line function freezes indefinitely

Complete, minimal, self-contained example code that reproduces the issue

# code goes here between backticks
import datetime
import pandas as pd
import numpy as np
import xarray as xr
import datashader as ds
import datashader.transfer_functions as tf
from collections import OrderedDict
# Constants
np.random.seed(2)
n = 100000                               # Number of points
cols = list('abcdefg')                   # Column names of samples
start = datetime.datetime(2010, 10, 1, 0)   # Start time
# Generate a fake signal
signal = np.random.normal(0, 0.3, size=n).cumsum() + 50
# Generate many noisy samples from the signal
noise = lambda var, bias, n: np.random.normal(bias, var, n)
data = {c: signal + noise(1, 10*(np.random.random() - 0.5), n) for c in cols}
# Add some "rogue lines" that differ from the rest 
cols += ['x'] ; data['x'] = signal + np.random.normal(0, 0.02, size=n).cumsum() # Gradually diverges
cols += ['y'] ; data['y'] = signal + noise(1, 20*(np.random.random() - 0.5), n) # Much noisier
cols += ['z'] ; data['z'] = signal # No noise at all
# Pick a few samples from the first line and really blow them out
locs = np.random.choice(n, 10)
data['a'][locs] *= 2
# Create a dataframe
data['Time'] = [start + datetime.timedelta(minutes=1)*i for i in range(n)]
df = pd.DataFrame(data)
df['ITime'] = pd.to_datetime(df['Time']).astype('int64')
# Default plot ranges:
x_range = (df.iloc[0].ITime, df.iloc[-1].ITime)
y_range = (1.2*signal.min(), 1.2*signal.max())
print("x_range: {0} y_range: {1}".format(x_range,y_range))
cvs = ds.Canvas(x_range=x_range, y_range=y_range, plot_height=300, plot_width=900)
aggs= OrderedDict((c, cvs.line(df, 'ITime', c)) for c in cols)
img = tf.shade(aggs['a'])

cc @philippjfr

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
AjayThorvecommented, Sep 3, 2020

can confirm this is now fixed with numba 0.51.2, @gmarkall thanks for the quick fix.

but I don’t know that it’s doing the right thing because the reproducer produces no output. Is there a way I can check that Datashader is working properly with Numba 0.51.1 + the patch? the final img output should be something like this (which it now is) image

1reaction
quasibencommented, Aug 28, 2020

After digging for a bit it might have something to do with https://github.com/numba/numba/pull/6146

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installation — Numba 0.50.1 documentation
To enable ROCm support in Numba, conda is required, so begin with an Anaconda or Miniconda installation with Numba 0.40 or later installed....
Read more >
ubuntupackages.cgi - UDD - Debian
... aspell-hy 0.10.0-0-3.2 aspell-id 1.2-0-0ubuntu1 aspell-is 0.51.1-0-2 aspell-it ... casacore-data-lines 0+git2016.11.26-2.1 casacore-data-observatories ...
Read more >
Modern Javascript for the Impatient This Page Intentionally ...
First, note that the spread operator is used with an argument, and the rest syntax applies to a variable declaration. Math.max(...numbers) // Spread...
Read more >
conda-forge
argparse, 1.4.0, PSF, X, Python command-line parsing library ... 0.0.3, doc · dev, GPLv2+, Celery task subclass for jobs that should run forever....
Read more >
Issues-holoviz/datashader - PythonTechWorld
canvas.line freezes indefinitely with numba 0.51.1. 888. ALL software version info python 3.8 numba 0.51.1 datashader 0.11.1 bokeh 2.2.0 numpy 1.19.1 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found