thomasw21 commited on
Commit
e4b750b
·
1 Parent(s): 44f5a1f

Victor suggestion to send the last batch

Browse files
Files changed (1) hide show
  1. pmd.py +3 -0
pmd.py CHANGED
@@ -246,6 +246,9 @@ class COCOloader(BaseLoaderWithDLManager):
246
  if len(buffer) == chunk_size:
247
  yield buffer
248
  buffer = []
 
 
 
249
 
250
  def _generate_examples(self, examples: List[Any], annotation_file: str, base_image_path: Path) -> Dict[str, List[Any]]:
251
  return {
 
246
  if len(buffer) == chunk_size:
247
  yield buffer
248
  buffer = []
249
+ # Getting the last batch
250
+ if len(buffer) > 0:
251
+ yield buffer
252
 
253
  def _generate_examples(self, examples: List[Any], annotation_file: str, base_image_path: Path) -> Dict[str, List[Any]]:
254
  return {