Closed jmagosta closed 1 year ago
@jmagosta could you please share your notebook?
What type of notebook are you using and what is that list cell code?
VSCode does use built-in renderers by default, and I documented the supported notebook cell output formats in extension docs already.
I don't think your cell output is csv, json or any of the other supported data formats.
See Features in docs for more info: https://github.com/RandomFractals/vscode-data-table#-features
The notebook is trivial. It just a VSCode jupyter notebook -- the point is that whatever the default renderer is that is used fails to show list output. Honestly, except for the fact that Databricks VSCode requires this extension I'm not sure what the point of it is.
John Mark Agosta Palo Alto, CA @.***
On Tue, Feb 28, 2023 at 2:36 PM Taras Novak @.***> wrote:
@jmagosta https://github.com/jmagosta could you please share your notebook?
What type of notebook are you using and what is that list cell code?
VSCode does use built-in renderers by default, and I documented the supported notebook cell output formats in extension docs already.
I don't think your cell output is csv, json or any of the other supported data formats.
— Reply to this email directly, view it on GitHub https://github.com/RandomFractals/vscode-data-table/issues/149#issuecomment-1449032377, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAVKO3WYGQABOCAJBKGEQLWZZ4VDANCNFSM6AAAAAAVLJWS7E . You are receiving this because you were mentioned.Message ID: @.***>
the output is an array:
"data": {
"text/plain": [
"[0, 1, 2, 3, 4]"
]
},
Yes, but it's not displayed.
John Mark Agosta Palo Alto, CA @.***
On Tue, Feb 28, 2023 at 4:22 PM Aaron Munger @.***> wrote:
the output is an array:
"data": { "text/plain": [ "[0, 1, 2, 3, 4]" ] },
— Reply to this email directly, view it on GitHub https://github.com/RandomFractals/vscode-data-table/issues/149#issuecomment-1449126151, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAVKO63GFZXDAJ6C2D4ZZ3WZ2JD3ANCNFSM6AAAAAAVLJWS7E . You are receiving this because you were mentioned.Message ID: @.***>
I was responding to @RandomFractals comment
I don't think your cell output is csv, json or any of the other supported data formats.
Also, on this -
VSCode does use built-in renderers by default
Merely installing this extension causes this blank output to show up, so the extension's renderer is prioritized over the built-in
so the output of that command list(range(5))
is a text/plain as already mentioned by @amunger
the data table renderers are mainly for displaying data frames/tables and not for text outputs like in your example.
it will be displayed the same way as any other text e.g. "My random text"
Thats what Databricks returns, a text and not a table hence your text will not be rendered properly as a list or table
if you were to use display(df)
instead, it would output as text/x-json
and json/application
which will then be rendered properly using the Table Renderers
It is not true that "it will be displayed the same way as any other text " A list, unlike a text string or tuple results in no display at all. This is inconsistent. _J
John Mark Agosta Palo Alto, CA @.***
On Tue, Feb 28, 2023 at 11:46 PM Gerhard Brueckl @.***> wrote:
so the output of that command list(range(5)) is a text/plain as already mentioned by @amunger https://github.com/amunger the data table renderers are mainly for displaying data frames/tables and not for text outputs like in your example. it will be displayed the same way as any other text e.g. "My random text" Thats what Databricks returns, a text and not a table hence your text will not be rendered properly as a list or table if you were to use display(df) instead, it would output as text/x-json and json/application which will then be rendered properly using the Table Renderers
— Reply to this email directly, view it on GitHub https://github.com/RandomFractals/vscode-data-table/issues/149#issuecomment-1449498205, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAVKO5ZCNJ6H52LOINWSULWZ35GDANCNFSM6AAAAAAVLJWS7E . You are receiving this because you were mentioned.Message ID: @.***>
@gbrueckl thanks for clarifying the way data table renderers work.
@jmagosta you should use built-in or other renderers for your list.
This extension is open source and you can actually see where and how cell output is handled and parsed in getData()
in our outputLoader.ts
: https://github.com/RandomFractals/vscode-data-table/blob/main/src/renderer/outputLoader.ts#L22
It would help if you actually included a simple notebook to reproduce your issue better. Your output screenshot doesn't even show the whole cell output rendering or anything about that list.
A list, unlike a text string or tuple results in no display at all. Merely installing this extension causes this blank output to show up, because the extension's renderer is prioritized over the built-in. This is inconsistent, confusing behavior.
@jmagosta please read all of the above. Looks like you joined github to just troll us about this one issue, with yet a full notebook to reproduce it and logging more of your speculations without examples to run in another vscode extension I created.
I like good, critical feedback, but I don't have time reiterating what was shared and well documented already. For those reasons, I will block you from posting here.
Thank you for your vague and lacking details feedback! You can just uninstall this extension and use the built-ins as I've suggested.
the repro notebook is a single code cell. Running the cell with this extension installed will result in a blank output.
list(range(5))
so it works (in terms of displaying some text) for me: using built-in VSCode renderer:
using Data Table renderer from this extension:
using Data Summary renderer from this extension
using Flat Data Grid renderer from this extension:
as I said, it is just a text thats returned by databricks and the extension tries to parse it into table as it is built for tabular visulalization. I agree that the output is useless but thats because of the input and not because of the renderer
If one has switched to the grid renderer any list output is not displayed.
For instance:
This happened unexpectedly -- I don't recall loading this extension, or setting the display output to data grid. In any case returning no output for lists should not be a valid behavior.