-
Notifications
You must be signed in to change notification settings - Fork 6
Implement suggestions for #163 #168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
dlqqq
wants to merge
21
commits into
jupyter-ai-contrib:outputs-on-disk
from
dlqqq:dlqqq-suggestions
Closed
Implement suggestions for #163 #168
dlqqq
wants to merge
21
commits into
jupyter-ai-contrib:outputs-on-disk
from
dlqqq:dlqqq-suggestions
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…yter-ai-contrib#161) * handle YChat document resets in the frontend * remove spurious console logs * use precise NPM version specifiers on jupyterlab-chat
* rename @jupyter/server-documents => @jupyter-ai-contrib/server-documents * rename disableSave plugin to align w/ convention
SHA256 hashes: jupyter-ai-contrib-server-documents-0.1.0-a7.tgz: b4f50524a9a462e2b9b070cd031a31d6b9e12d3f5151fc7e0417ad8fde8d1fb4 jupyter_server_documents-0.1.0a7-py3-none-any.whl: 69bd23f9eef6df8bd28ce9f2a7a6546dd969052da0cedc07f70e9cd8ecf51d0f jupyter_server_documents-0.1.0a7.tar.gz: cc3691b1891e15897cdee701f8ccaacd875684a006ac28eceb43d5e4e2e62b4e
The stream_limit logic is being moved in this PR to the writing of outputs, so get_outputs can just return all outputs.
This commit introduces a cleaner architecture for handling notebook outputs and adds an experimental optimized version that supports excluding outputs from saved notebook files. Core changes to OutputsManager: - Extract private utility functions (_create_output_url, _create_output_placeholder) - Add comprehensive docstrings to all methods - Simplify write() method by removing stream_limit logic - Improve error handling in get_outputs() to return empty list instead of raising - Consolidate output processing logic into _process_outputs_from_cell() - Add helper methods: _upgrade_notebook_format(), _ensure_cell_id() - Always write full outputs to notebook files on save (traditional Jupyter behavior) - Remove stream-specific handling and StreamAPIHandler route New OptimizedOutputsManager: - Extends base OutputsManager with exclude_outputs metadata flag support - When exclude_outputs=True: outputs stored only in runtime, not in saved files - When exclude_outputs=False/unset: full outputs included in saved files (default) - Implements stream_limit (500) for large stream outputs with link placeholders - Provides _append_to_stream_file() for efficient stream handling - Stream API handler for accessing accumulated stream outputs Other improvements: - Add __all__ to outputs/__init__.py for cleaner exports - Expand test coverage with comprehensive test suite - Rename private methods for clarity (_process_loaded_excluded_outputs, etc.) - Update yroom_file_api to use process_saving_notebook correctly The OptimizedOutputsManager is currently experimental and disabled by default. StreamAPIHandler route is commented out until the feature is ready for production.
9676535 to
95d9d6f
Compare
Collaborator
Author
|
Superseded by #169. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
_last_save_durationandpoll_intervalattributes.YRoomFileAPI.min_poll_intervalandYRoomFileAPI.poll_interval_multipliertraits.I verified that these changes does not break the current experience & correctly prevents users from configuring trait values <=0.