You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to add a debug flag to Flair so that I can quickly go through the entire process when training the model to troubleshoot potential issues.
Solution
When debug is set to True, in the init method of JsonlDataset, only parse the first n lines of the jsonl file.
DEBUG_CORPUS_LENGTH_LIMIT = 200
class JsonlDataset(FlairDataset):
def __init__():
...
with path_to_json_file.open(encoding=encoding) as jsonl_fp:
...
if flair.debug and len(self.sentences) >= DEBUG_CORPUS_LENGTH_LIMIT:
break
Additional Context
No response
The text was updated successfully, but these errors were encountered:
Problem statement
I want to add a debug flag to Flair so that I can quickly go through the entire process when training the model to troubleshoot potential issues.
Solution
When debug is set to True, in the init method of JsonlDataset, only parse the first
n
lines of the jsonl file.Additional Context
No response
The text was updated successfully, but these errors were encountered: