Skip to content
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

add a method to add sample ids to a dataset #332

Merged
merged 2 commits into from
Aug 31, 2023

Conversation

michalozeryflato
Copy link
Collaborator

supporting extending a dataset with new samples

Copy link
Collaborator

@SagiPolaczek SagiPolaczek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks!

Add a minor suggestion inline 😄

def add_sample_ids_and_recreate(
self, added_sample_ids: List[Any], **kwargs: Dict
) -> None:
self._orig_sample_ids = self._final_sample_ids + added_sample_ids
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to use self.get_all_sample_ids() instead of self._final_sample_ids :)

Copy link
Collaborator Author

@michalozeryflato michalozeryflato Aug 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is clearer to use _final_sample_ids, and it may be easier to track its use if the logic changes. Anyway, if you insist I will make your suggested change

@michalozeryflato michalozeryflato merged commit e94fa93 into master Aug 31, 2023
@michalozeryflato michalozeryflato deleted the add_samples_to_dataset branch August 31, 2023 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants