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.
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
Refactor the dataset generator #335
Refactor the dataset generator #335
Changes from 5 commits
11926e2
db93f06
2f8065e
c7c29f7
e880426
659bd3d
9a23cf5
d35bbce
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This was intentionally
expected_num_examples
because we could not guarantee that this is the exact number generated (due to the way we did batching and retries)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.
Yeah, and I made sure the result actually matched the actual number of examples (unless we hit max_api_calls).
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.
Do we want to remove this? Saving the dataset to file allows this to be reused in the future without running dataset generation, which is key for iteration
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.
Yeah, I agree that there's a tradeoff here. But there's a major issue with the current implementation in that it (a) implicitly saves a cache, and (b) doesn't check if the cache was created with the same parameters as the current function call. If we're going to cache something, we should make sure that we check that the parameters are the same and invalidate the cache if the parameters are not the same.
I'd suggest that we just remove it for now, and if we want to add cacheing in the future we
save_cache
function), not implicitThere 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.
You are somehow right. I feel a sense of loss that I write careful tests to test the cache and load the cache.