Closed colombod closed 1 year ago
@colombod probably because your C# code cell produces 3 cell outputs when that code runs, instead of one with:
line 0
line 1
line 2
Not sure how we can help you there. Perhaps, review your console logging and outputs produced by the .net code cells.
stdout is supposed to be concatenated to previous cell otherwise doing write
instead of writeline
will produce outputs on two lines instead, also that will cause the the output cell to have more than one output block. I am not sure about the requirement of intercepting stream output types for the fata-table renderers.
@colombod probably because your C# code cell produces 3 cell outputs when that code runs, instead of one with:
line 0 line 1 line 2
Not sure how we can help you there. Perhaps, review your console logging and outputs produced by the .net code cells.
@RandomFractals the quoted statement is not correct as the code produces exactly a since cell output element in the vscode extension. This is the line stream outputs are appended to the existing one, you can review this part : https://github.com/dotnet/interactive/blob/2ca13bab0c1a4fba095802d6e5d9409112ce305d/src/polyglot-notebooks-vscode-common/src/notebookControllers.ts#L269
The code of polyglot notebook is not producing 3 outputs but appending stream types to the latest one.
Is it possible to reopen this issue?
Thank you.
@colombod do you have a link to the standard "streamed" output in VS Code notebooks examples or documentation to resolve it, without the special and custom .net interactive, now "polyglot" notebooks internals?
No but that code is what the developers of jupyter extension advices to do. Can see if I can find more info for you but how to handle outputs is the responsibility of the notebook controller and it depends on requirements . For us was to be compliant with expectations from jupyter lab and python users
Referencing an issue I asked about in an extension that required data tables: https://github.com/paiqo/Databricks-VSCode/issues/163
short story, installing this extension prevents cells that have print statements to behave as expected.
has there been any update to this @RandomFractals? As this is affecting all users that installed our Databricks Extension due to the dependency we have currently added to this extension
I will look into patching it this week, but as you noted in your ticket there is a workaround to simply use the built-in renderer for such outputs.
@gbrueckl & @colombod after looking more into this, I am tempted to remove my renderers from supporting application/vnd.code.notebook.stdout
mime type, and let vscode handle it. The long text cell output rendering is much better in vscode now with the built-in output renderer. That was the only reason I added it to view scrollable text when renderers api came out and built-in renderer did not handle long outputs well.
Related config: https://github.com/RandomFractals/vscode-data-table/blob/main/package.json#L96
@gbrueckl does your extension and databricks users use stdout
or other text and json data mime types to view tabular data with my data table renderers?
no, we are not using stdout
at all, we mainly use JSON and sometimes plain text
we use text/html
, text/plain
, text/x-json
, application/json
, application/databricks-table
and text/markdown
@gbrueckl & @colombod after looking more into this, I am tempted to remove my renderers from supporting
application/vnd.code.notebook.stdout
mime type, and let vscode handle it. The long text cell output rendering is much better in vscode now with the built-in output renderer. That was the only reason I added it to view scrollable text when renderers api came out and built-in renderer did not handle long outputs well.Related config: https://github.com/RandomFractals/vscode-data-table/blob/main/package.json#L96
@gbrueckl does your extension and databricks users use
stdout
or other text and json data mime types to view tabular data with my data table renderers?
I think this will avoid the issue where stream are printed multiple times.
Great! @gbrueckl & @colombod thanks for the quick follow up.
I'll remove stdout mime types from the 3 data table renderers, and hopefully that will make a much better experience for both new polyglot and databricks notebook users.
Will try to push that update this week. Thanks for your patience on this!
so, a few things that would help us reproduce scenarios like this next time:
.ipynb
next time.Created this Jupyter notebook to test it out:
Output rendering with built-in renderer:
Users are reporting this issue when the extension is installed. https://github.com/dotnet/interactive/issues/3053.
The presence of the extension causes this output: