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
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.
Important
Exclude
Nonevalues fromCreateDatasetRunItemRequestin_process_experiment_item()to prevent unnecessary data in requests._process_experiment_item()inclient.pyto excludeNonevalues fromCreateDatasetRunItemRequestby using.dict(exclude_none=True). This preventsdatasetVersionfrom being included if it isNone.This description was created by
for 826049b. You can customize this summary. It will automatically update as commits are pushed.
Disclaimer: Experimental PR review
Greptile Summary
This PR fixes an issue where
Nonevalues were being sent in dataset run item creation requests. The change adds.dict(exclude_none=True)when creatingCreateDatasetRunItemRequestobjects, ensuring that whendatasetVersionisNone, it is excluded from the API request payload.Key Changes:
_process_experiment_item()inclient.py:2934to call.dict(exclude_none=True)on theCreateDatasetRunItemRequestobjectdatasetVersion: Nonein the request when no dataset version is specifiedTechnical Context:
CreateDatasetRunItemRequestmodel already has a custom.dict()method that usesexclude_noneby default (seecreate_dataset_run_item_request.py:51-66)jsonable_encoderproperly handles both Pydantic models and dictionariesdataset_versionparameter isNone(which is the default), the field should not be included in the API requestConfidence Score: 5/5
Nonevalues. The implementation is correct - the HTTP client'sjsonable_encoderhandles dictionaries properly, and theCreateDatasetRunItemRequestmodel already has built-in support forexclude_none. No breaking changes or side effects expected.Important Files Changed
.dict(exclude_none=True)to prevent sendingNonevalues fordatasetVersionin dataset run item requests. Change is safe and follows best practices for API request serialization.Last reviewed commit: 826049b