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

.populate(reserve_jobs=True) to exclude error and ignore keys #1062

Merged

Conversation

ttngu207
Copy link
Contributor

@ttngu207 ttngu207 commented Nov 2, 2022

Currently, DataJoint's .populate() call with specified max_calls argument does not achieve the expected behavior.

For example, if there are 10 keys remaining to be populated and of those 10, 3 are "error" and 2 are "ignore", and if those 5 error/ignore keys are top of the list, calling Table.populate(reserve_jobs=True, max_calls=3) will do nothing. The expected behavior should be that, with the same call, DataJoint should know to fetch back keys to be worked on but excluding those that are error/ignore. In the example above, this should be just the 5 remaining, not all 10, and from those keys, call make() on 3 of them.

This PR fixes the described issue.

@dimitri-yatsenko
Copy link
Member

Looks good. I was hoping this could be done without that initial query by simply keeping track how many calls have already been made. But the multiprocessing makes it difficult.

@dimitri-yatsenko
Copy link
Member

Please update the CHANGELOG and I will merge.

@ttngu207
Copy link
Contributor Author

ttngu207 commented Dec 1, 2022

Please update the CHANGELOG and I will merge.

Thanks, CHANGELOG updated

@dimitri-yatsenko dimitri-yatsenko merged commit e339d46 into datajoint:master Dec 1, 2022
@ttngu207 ttngu207 deleted the populate_exclude_error_ignore branch January 31, 2023 17:41
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.

None yet

2 participants