-
-
Notifications
You must be signed in to change notification settings - Fork 543
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 default cache dataloader raise key error on non-existing key #3569
base: main
Are you sure you want to change the base?
Changes from 2 commits
724ebe3
7a2a88a
5fe7f6f
92a4ff0
eab45a5
4ac166d
c189236
5b87885
f3b225a
708013f
6b0a704
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,12 @@ | ||||||||||||||
Release type: patch | ||||||||||||||
|
||||||||||||||
Calling `.clean(key)` on default dataloader with non-existing `key` will not throw `KeyError` error anymore. Example: | ||||||||||||||
```python | ||||||||||||||
async def load_data(keys): | ||||||||||||||
return [str(key) for key in keys] | ||||||||||||||
|
||||||||||||||
dataloader = DataLoader(load_fn=load_data) | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion (documentation): Mention import statement for DataLoader Consider adding a comment or a line to indicate that
Suggested change
|
||||||||||||||
dataloader.clean(42) # does not throw KeyError anymore | ||||||||||||||
``` | ||||||||||||||
|
||||||||||||||
This is a patch release, so no breaking changes. | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion (documentation): Improve sentence flow Consider rephrasing to 'This is a patch release with no breaking changes.'
Suggested change
|
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.
issue (documentation): Redundant phrase 'KeyError error'
Consider changing 'KeyError error' to just 'KeyError' to avoid redundancy.