-
Notifications
You must be signed in to change notification settings - Fork 7.8k
[Data] Print data context in JSON (Dictionary) Format #61428
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
Merged
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
adea3a9
Preliminary change to print data context
rayhhome 800a0ff
Merge remote-tracking branch 'origin/master' into print-data-context
rayhhome fbab811
Prettier printed message
rayhhome 6121e4c
Merge branch 'master' into print-data-context
rayhhome 5c4bc77
Change message level from info to debug
rayhhome 24d5479
Fix message level mistake
rayhhome 08da0ee
Clearer and more efficient log message
rayhhome 2b26e6e
Merge branch 'master' into print-data-context
rayhhome 9ef9cc1
Remove redundant ExecutionOptions message + use dataContext repr
rayhhome 9a0ceca
Merge remote-tracking branch 'refs/remotes/origin/print-data-context'…
rayhhome bb62e3b
Change log level
rayhhome c459741
Merge branch 'master' into print-data-context
rayhhome b17c1fc
Use log_once for Data Context
rayhhome dfc7202
Log once no longer trigger on each dataset
rayhhome a839653
Merge branch 'master' into print-data-context
rayhhome 1cbdc7a
Merge branch 'master' into print-data-context
rayhhome a574e5c
Merge branch 'master' into print-data-context
rayhhome 10ff713
Merge branch 'master' into print-data-context
rayhhome f12da12
Log once for each dataset based on id
rayhhome 677b5d3
Merge branch 'master' into print-data-context
rayhhome ca832e8
Merge branch 'master' into print-data-context
rayhhome efa06cf
Merge branch 'master' into print-data-context
rayhhome c1e4300
Merge remote-tracking branch 'origin' into print-data-context
rayhhome 3efde5f
Log DataContext in json format
rayhhome 0e8ce54
Merge branch 'master' into print-data-context
rayhhome 39bf7ca
Use sanitize_for_struct for formatting instead
rayhhome d861083
Merge branch 'master' into print-data-context
rayhhome 6fb4c51
Increase truncate length to avoid truncation
rayhhome 6566152
Merge branch 'print-data-context' of github.com:rayhhome/ray into pri…
rayhhome 0c4194e
Merge branch 'master' into print-data-context
rayhhome b6481ac
Merge branch 'master' into print-data-context
rayhhome 01c072c
Merge branch 'master' into print-data-context
rayhhome d08d1d5
Adding to the truncation length macro to ensure fully logged datacontext
rayhhome 4a9c381
Merge branch 'master' into print-data-context
rayhhome 3335991
Merge branch 'master' into print-data-context
rayhhome c794cd3
Merge branch 'master' into print-data-context
rayhhome File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will this truncate nesting inside the datacontext, or does it truncate the whole context? I believe we want to log the full context and not lose keys
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might truncate nesting inside the datacontext, e.g.
I tried to mitigate this issue by setting
truncate_lengthto DATA_CONTEXT_LOG_TRUNCATE_LENGTH. My testing shows that none of the fields would be truncated in the debug output with the current configuration (log.txt)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 @rayhhome I have the same question
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the current
truncate_lengthpassed into (which isDATA_CONTEXT_LOG_TRUNCATE_LENGTH, i.e. 10000), theDataContextwill not be truncated unless there's any string with more than 10000 characters or any list with more than 10000 elements, which I believe is unlikely.Currently, calling
json.dumpsdirectly onDataContextraises a exception because there are a few fields inDataContextthat are not JSON serializable (I've documented such fields in the PR description). I can use_json_defaultto get around this though, do we want to switch to usingjson.dumpsinstead ofsanitize_for_struct?