-
Notifications
You must be signed in to change notification settings - Fork 78
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 of pydantic.BaseModel
fields with pathlib.Path
dict keys
#1157
Open
brendanator
wants to merge
7
commits into
langchain-ai:main
Choose a base branch
from
brendanator:patch-1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Commits on Oct 31, 2024
-
Fix orjson serialization of dict keys
Apply `_simple_default` serialization on dict keys to resolve this exception ```python Traceback (most recent call last): File "/Users/brendan/.local/share/virtualenvs/core-bRkH1-KB/lib/python3.11/site-packages/langsmith/client.py", line 281, in _dumps_json_single return orjson.dumps( ^^^^^^^^^^^^^ TypeError: Dict key must a type serializable with OPT_NON_STR_KEYS During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/brendan/.local/share/virtualenvs/core-bRkH1-KB/lib/python3.11/site-packages/langsmith/client.py", line 5802, in _tracing_thread_handle_batch client.multipart_ingest_runs(create=create, update=update, pre_sampled=True) File "/Users/brendan/.local/share/virtualenvs/core-bRkH1-KB/lib/python3.11/site-packages/langsmith/client.py", line 1675, in multipart_ingest_runs valb = _dumps_json(value) ^^^^^^^^^^^^^^^^^^ File "/Users/brendan/.local/share/virtualenvs/core-bRkH1-KB/lib/python3.11/site-packages/langsmith/client.py", line 321, in _dumps_json return _dumps_json_single(obj, _serialize_json) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/brendan/.local/share/virtualenvs/core-bRkH1-KB/lib/python3.11/site-packages/langsmith/client.py", line 292, in _dumps_json_single result = json.dumps( ^^^^^^^^^^^ File "/usr/local/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/__init__.py", line 238, in dumps **kw).encode(obj) ^^^^^^^^^^^ File "/usr/local/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/encoder.py", line 200, in encode chunks = self.iterencode(o, _one_shot=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/encoder.py", line 258, in iterencode return _iterencode(o, 0) ^^^^^^^^^^^^^^^^^ TypeError: keys must be str, int, float, bool or None, not PosixPath ```
Configuration menu - View commit details
-
Copy full SHA for ce68109 - Browse repository at this point
Copy the full SHA ce68109View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5e37fe0 - Browse repository at this point
Copy the full SHA 5e37fe0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 97b098d - Browse repository at this point
Copy the full SHA 97b098dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 586eb4f - Browse repository at this point
Copy the full SHA 586eb4fView commit details
Commits on Nov 1, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 4c6545e - Browse repository at this point
Copy the full SHA 4c6545eView commit details
Commits on Nov 5, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 604affc - Browse repository at this point
Copy the full SHA 604affcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8432823 - Browse repository at this point
Copy the full SHA 8432823View commit details
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.