-
Notifications
You must be signed in to change notification settings - Fork 115
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
Fixed ignore_existing
flag not working as expected.
#224
base: main
Are you sure you want to change the base?
Conversation
python/dolma/core/runtime.py
Outdated
@@ -283,6 +298,27 @@ def process_single( | |||
# total number of documents processed | |||
total_docs_cnt = 0 | |||
|
|||
if not kwargs.get("ignore_existing", False): | |||
# we group taggers by their path (this is for cases when two taggers are going to same file) | |||
# and then remove all taggers if any of the paths exists and ignore_existing is True |
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.
As written, isn't this block only entered if ignore_existing isn't True? Also I'd consider using 'skip' existing instead of 'ignore' because to me 'ignore' feels a bit ambiguous - are you ignoring that taggers exist for the document, then overwriting them, or are you ignoring the documents that have existing taggers?
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! fixed both.
Ah actually I think I misunderstood 'ignore_existing' - instead of renaming it skip_existing and inverting the loop, you should probably change it to 'override_existing' and keep the loop the same as it was. Sorry for the back and forth! |
Two fixes:
ignore_existing
flag---files already processed by taggers would get run again if taggers were launched a 2nd time