-
Notifications
You must be signed in to change notification settings - Fork 173
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
Initialize components with interfaces and stub implementations #5
Conversation
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.
Thanks @viswavi ! This is looking good.
I left some comments on only the dataset generators part, but many of them are general philosophical comments that should apply throughout the codebase. Please take a look. If you agree with the comments you can reflect them, and if you don't understand or disagree with anything please follow up and we can discuss!
|
||
""" | ||
_ = prompt_spec, num_examples, split # suppress unused variable warnings | ||
return datasets.Dataset.from_pandas(pd.DataFrame({})) |
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.
In general, it seems like a reasonable restriction that the datasets should be the same length as num_examples
. This example here breaks that restriction, so maybe we should make it a dataset of appropriate length full of empty dictionaries instead?
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.
Sure! 🆗
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.
Done. @zhaochenyang20 when we write unit tests for dataset_generator we should add a check that the dataset is of the same length as num_examples
. I've created an issue (#7 ) to add this.
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.
I will try to create our unit test for DatasetGenerator
this weekend following our new restriction. 🙂
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.
Looking great! I just have a few comments left, mostly on the new/changed parts.
Co-authored-by: Graham Neubig <neubig@gmail.com>
Co-authored-by: Graham Neubig <neubig@gmail.com>
Co-authored-by: Graham Neubig <neubig@gmail.com>
Co-authored-by: Graham Neubig <neubig@gmail.com>
Co-authored-by: Graham Neubig <neubig@gmail.com>
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.
Looks great now!
Description
Initialize all Prompt2Model components with separate interfaces and stub implementations. This PR also contains an integration test (using all the components' stub implementations) that verifies that the types of all the components fit together.
References
Blocked by