-
Notifications
You must be signed in to change notification settings - Fork 105
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
Save checkpoints during unsupervised training and make it resumable #178
Conversation
medcat/cat.py
Outdated
""" | ||
if ckpt_max_to_keep < 1: |
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 not like this, I've rarely (or never) seen this feature
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.
Checks like this are now wrapped in the decorator.
medcat/cat.py
Outdated
N.B.: A larger number could result in the out-of-disk-space error. | ||
num_of_skipped (int): | ||
The number of sentences/documents to ignore at the beginning. | ||
is_resumed (bool): |
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.
Prefer to have it named: resume_from_checkpoint which can be bool/path (have a look at spacy or HF)
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.
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.
lgtm
…ogStack#178) * CAT-92 add the method for resuming training * CAT-92 deal with file list ordering in the test * CAT-92 refactor and improve based on review * CAT-92 save potentially large checkpoint asynchronously * CAT-92 add workaround for py36
This PR saves CDB as checkpoints after certain steps during the unsupervised training. How many checkpoints are kept on the disk is also configurable.