Comments (6)
Hi @MarkAWard . Thanks for raising this issue. I was able to reproduce this issue and am working on a fix. I will update here soon.
from wandb.
Hey, @MarkAWard: This PR should fix the serialization issue with the new RunV2 API. Can you please let me know if your use-case works as expected when run from the branch? I'll tag one of the LangChain maintainers once you confirm. - All unittests pass as of now in LangChain
from wandb.
Thanks @parambharat my use-case did work using your branch. With the change we did lose the model_dict
that was previously passed to the WandbTraceTree
, it's not as important to me as having the traces/spans working properly but did want to note that.
Would you be open to injecting the serializer as an optional dependency to the WandbTracer
? Currently it just uses _serialize_io
, but it would be nice to be able to extend or replace the serializer. For example in my branch I had added a condition to serialize pydantic objects:
def _serialize_io(run_inputs: Optional[dict]) -> dict:
...
elif isinstance(value, (BaseModel, PydanticBaseModel)):
serialized_inputs[key] = (
value.model_dump_json()
if hasattr(value, "model_dump_json")
else value.json()
)
...
from wandb.
Thank you so much for reporting this, @MarkAWard, and thank you so much for looking into it so fast, @parambharat! Tracking this thread from the wandb support's side as well.
from wandb.
Hi @MarkAWard,
With the change we did lose the
model_dict
that was previously passed to theWandbTraceTree
, it's not as important to me as having the traces/spans working properly but did want to note that.
Thanks for pointing out the missing model_dict
. I have pushed new changes to re-add the model architecture to the trace logging. You should now also see the Model Architecture tab in the logged traces.
Would you be open to injecting the serializer as an optional dependency to the WandbTracer?
I've added a new argument io_serializer
to the WandTracer that allows you to pass a custom serializer. I've also included PydanticBaseModels
in the serializer's defaults alongside the exisiting protobufs.
from wandb.
Related Issues (20)
- [Q] How to rename the specific logged metrics in the whole projects. HOT 4
- [Q] Fetch all projects and reports of a user HOT 4
- [Q] How to directly obtain a figure with grey grid background and manually set label name HOT 2
- [CLI]: TypeError: ModelCheckpoint.__init__() got an unexpected keyword argument 'options' HOT 1
- [App]: Overlapping Sweep Name Column and Status Column on Sweep List Page HOT 1
- [Feature]: Don't capture KeyboardInterrupt on sweeps HOT 1
- [Q] How to sweep parameters that is defined in config.yaml file HOT 5
- Cannot create datamodule HOT 3
- Feedback HOT 1
- [App]: Duplicate Runs in the Sweep with Parallel Agents HOT 2
- TypeError: __name__ must be set to a string object when using wandb.integration.openai.autolog HOT 1
- [Q] Transfer wandb-local data between servers HOT 3
- [Q] UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf8 in position 0: invalid start byte HOT 6
- [App]: Please replace OS-specific _reflink_linux using FICLONE = 0x40049409 with Python-supported os.copy_file_range HOT 3
- [Q] How to download a lot of histories? HOT 3
- [App]: Line plots not rendered correctly HOT 3
- [App]: I cannot see the query charts HOT 2
- [Q] Cant login, not authorized despite using the correct API key HOT 3
- [CLI]: ERROR Internal wandb error: file data was not synced When using sync_tensorboard with Jupyter notebook HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wandb.