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.

Issues with detrend='linear' in dft() killing kernel

See original GitHub issue

I have two comments, the first of which is the main issue, while the second is a small, related note. I am currently running the most up-to-date xrft version from GitHub (version 0.2.2+1.g8b7e84e) on Pangeo Cloud.

(1) I’ve been trying to use the ‘linear’ detrend option in dft() without success. (I created a sample notebook here on a subset of CESM data to illustrate this problem, which should be executable on Pangeo Cloud.) Whenever I use the ‘linear’ option, when using .load() to calculate the dft function, the cell runs for awhile (~15 minutes in my notebook example) and eventually kills the kernel without any warning or error messages. This does not seem to be an issue with running the computation with dask gateway, as I have had this problem running both with and without dask (and when trying to use dask gateway, the dashboard showed no activity the whole time). When running with detrend='constant' or detrend=None I don’t have any errors and the function runs in under 10 seconds. I’ve looked at the xrft code a bit and it may have to do with the dask chunking, but I’m not sure at this point. I believe @navidcy has had similar problems.

~(2) I just noticed today that I’ve been running the dft() function with detrend=True. This ran just fine, but also didn’t raise any errors saying that ‘True’ is, in fact, not one of the options. I wonder if it makes sense to add a warning that any arguments that are not either ‘constant’ or ‘linear’ will be treated as ‘None’? (I realize that this was entirely my mistake in not reading the xrft docs better, but since the ‘window’ flag does use ‘True’ it may be confusing for others as well.)~ (This comment is now in issue #114.)

I would be happy to make a pull request for these issues if we see the need, but since I’m new to this community I might need a few tips from the more experienced developers out there!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
navidcycommented, Oct 2, 2020

@roxyboy, I guess the idea is to use xarray.polyfit to find the linear tread and then subtract it from the data, right?

@paigem should we try to have a go at it and make a PR?

2reactions
rabernatcommented, Oct 2, 2020

We would be very happy to walk you through the PR process.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pyplot kills Kernel on jupyer-lab #21513 - matplotlib ... - GitHub
Hi, I have been running into a recurring issue with the test code ... import matplotlib.pyplot as plt plt.plot([1,2,3], [1,2,3]) plt.show().
Read more >
Pandas copying slices killing jupyter kernel - Stack Overflow
I have an issue within the for loop of this python code. I think it is due to the method of copying and...
Read more >
SciPy Reference Guide - Numpy and Scipy Documentation
Long-standing issues with using linkage on large input data (over ... #6314: scipy.stats.kendaltau() p value not in agreement with R, SPSS.
Read more >
SciPy Reference Guide - Index of /
Long-standing issues with using linkage on large input data (over ... #6314: scipy.stats.kendaltau() p value not in agreement with R, SPSS.
Read more >
running fbprophet kills kernel in Python 3.7 notebook - IBM
I have a runtime environment of 1 CPU and 4GB. Cause. This is a known issue with fbprophet and conda; some native libraries...
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