Closed HuifangYeo closed 3 years ago
I had to fix it in your notebook when I checked it out last time for another issue.
One of your visualize
widget has a Twitter_Cyptocurrency
context value (which doesn't exist) in its state. Not sure how it got there.
hmm... I'm pretty sure I didn't add in any context value. However, what is weird is that it's working in 0.4.2 but not in 0.4.3
The Jupyter lab still crashes after I removed the context value
Do you have any error log in the Jupyter lab process ?
There's no exception in the log: subprocess.log
Hi Hui Fang, it's the query in your third cube.visualize()
that returns a huge cellset.
SELECT NON EMPTY Crossjoin( Hierarchize( Union( Hierarchize( DrilldownLevel( [Hierarchies].[date].[ALL].[AllMember] ) ), [Hierarchies].[date].[ALL].[AllMember].[2020-02-28] ) ), Hierarchize( DrilldownLevel( [Hierarchies].[tweet_id].[ALL].[AllMember] ) ) ) ON ROWS, NON EMPTY Crossjoin( Hierarchize( DrilldownLevel( [Hierarchies].[coin_symbol].[ALL].[AllMember] ) ), { [Measures].[polarity.VALUE], [Measures].[contributors.COUNT] } ) ON COLUMNS FROM ( SELECT Filter( [Hierarchies].[date].[date].Members, IsDate( [Hierarchies].[date].CurrentMember.MemberValue ) AND ( CDate( [Hierarchies].[date].CurrentMember.MemberValue ) >= CDate( "2020-08-15" ) AND CDate( [Hierarchies].[date].CurrentMember.MemberValue ) < CDate( "2020-08-26" ) ) ) ON COLUMNS FROM [Twitter_Cyptocurrency] ) CELL PROPERTIES VALUE, FORMATTED_VALUE, BACK_COLOR, FORE_COLOR, FONT_FLAGS
If you look at the 0.4.3 changelog, you'll see this item:
The first MDX query ran by an atoti widget in JupyterLab is now executed in Python and its resulting cell set is outputted to the corresponding notebook cell. It allows to ensure that the data displayed by the widget reflects the expected state of the cube without having to block the IPython kernel in a fragile way.
So this MDX query is executed in the Python side and its whole cellset is outputted in the notebook cell, crashing JupyterLab.
It used to work in 0.4.2 because it was ActiveUI that was executing the MDX request and telling the server to only get back the first 200 positions out of the 248066 existing ones (using ranges).
Ranges are not supported on the Python side because it requires using the WebSocket API instead of the classic REST API and also because there would be no easy way to tell the server to load the other positions (like it's possible in ActiveUI by listening to the scrolling events).
Can you add some filters to your query so that its resulting cellset is smaller?
Hi @tibdex, Just thinking aloud on the following:
Cheers,
FYI @tibdex is working on this.
In the next release, the query will be executed client-side again so it will support ranges and that will fix this issue.
Steps to reproduce
Referring to the attached notebook. I have no issue running it on atoti 0.4.2. However, upon upgrading to 0.4.3, Jupyter lab kept crashing. Speed of processing also seems to be longer. Twitter and Cryptocurrency - jupyterlab.zip
Environment
Logs (if relevant)