steventango commited on
Commit
d883519
·
verified ·
1 Parent(s): d5062c8

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. run_batches.py +3 -0
run_batches.py CHANGED
@@ -84,6 +84,9 @@ def run_batch(input_files_batch, input_dir, output_dir, mode):
84
  subprocess.run([command], check=True, shell=True)
85
  except subprocess.CalledProcessError as e:
86
  logging.exception(f"Error running command: {command}")
 
 
 
87
  raise e
88
 
89
  output_paths = list(output_temp_dir.rglob("*"))
 
84
  subprocess.run([command], check=True, shell=True)
85
  except subprocess.CalledProcessError as e:
86
  logging.exception(f"Error running command: {command}")
87
+ if "returned non-zero exit status 137" in str(e):
88
+ logging.error("Process killed due to memory limit")
89
+ return
90
  raise e
91
 
92
  output_paths = list(output_temp_dir.rglob("*"))