Hello,
I was wondering what recursion capacity is needed to run the parallel coordinates plot?
Hello,
I was wondering what recursion capacity is needed to run the parallel coordinates plot?
What do you define as recursion capacity?
When I tried to replicate the code to produce the px.parallel_coordinates graph in my own Notebook the following error occurred: “maximum recursion depth exceeded while calling a Python object”. To find out what my recursion limit was I wrote:
import sys
print(sys.getrecursionlimit())
And I found that my limit was 1000. The Python interpreter limits the depths of recursion to help avoiding infinite recursions, resulting in stack overflows. But when I tried to extend it for calculation using:
sys.setrecursionlimit(10000), my computer crashed.
Recursion errors are usually linked to a bug rather than an intended recursive call
Could you provide the snippet of code that trigger this error such that we can investigate?
Sure, the snippet of the code is the following:
import numpy as np
import plotly.express as px
fig = px.parallel_coordinates(
cv_results.rename(shorten_param, axis=1).apply(
{
"learning_rate": np.log10,
"max_leaf_nodes": np.log2,
"max_bins": np.log2,
"min_samples_leaf": np.log10,
"l2_regularization": np.log10,
"mean_test_score": lambda x: x,
}
),
color="mean_test_score",
color_continuous_scale=px.colors.sequential.Viridis,
)
fig.show()
This is unexpected. I cannot reproduce this problem.
On the MOOC platform, we use plotly 5.6.0 and pandas 1.3.3.
Maybe this is a bug with a specific plotly or pandas version?
import plotly, pandas
plotly.__version__, pandas.__version__
Could you please include a link to a copy of the full traceback you get posted on https://gists.github.com for instance?