-
Notifications
You must be signed in to change notification settings - Fork 15.8k
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
Fix serialization issue with W&B #5693
Conversation
@parambharat how does this look to you? |
Hi @jjzhuo , can you share an example of where you are seeing this ? A colab perhaps ? |
langchain/callbacks/tracers/wandb.py
Outdated
@@ -79,7 +85,7 @@ def _convert_chain_run_to_wb_span(trace_tree: Any, run: Run) -> trace_tree.Span: | |||
|
|||
def _convert_tool_run_to_wb_span(trace_tree: Any, run: Run) -> trace_tree.Span: | |||
base_span = _convert_run_to_wb_span(trace_tree, run) | |||
base_span.results = [trace_tree.Result(inputs=run.inputs, outputs=run.outputs)] | |||
base_span.results = [trace_tree.Result(inputs=serialize_inputs(run.inputs), outputs=run.outputs)] |
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.
@jjzhuo this should be _serialized_inputs
@parambharat The screenshot is from the Weights and Biases website. You can reproduce it by adding a RetrievalQA in this notebook: |
@jjzhuo , Thanks you for the fix. I have verified that the new @hwchase17 , This LGTM. |
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.
LGTM
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.
thanks!
The chain input_documents are not displaying properly in W&B, due to serialization issue: <img width="1164" alt="Screenshot 2023-06-04 at 11 58 26 AM" src="https://github.com/hwchase17/langchain/assets/134809928/f31f14f6-0935-4cca-9913-6760cd40eadf"> --------- Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
The chain input_documents are not displaying properly in W&B, due to serialization issue: