Torch.save shows out of memory

I am using torch.save to store some tensors as .pt files. I am storing a lot of such .pt files for offline computation. After a while it throws the following error:

Traceback (most recent call last):
  File "save_optical_flow.py", line 249, in <module>
    save_flow(image_path, n_frames)
  File "save_optical_flow.py", line 149, in save_flow
    torch.save(flow, out_path)
  File "/usr/local/lib/python3.6/dist-packages/torch/serialization.py", line 381, in save
    _legacy_save(obj, opened_file, pickle_module, pickle_protocol)
  File "/usr/local/lib/python3.6/dist-packages/torch/serialization.py", line 214, in __exit__
    self.file_like.close()
OSError: [Errno 28] No space left on device

I checked that it has still lot of storage left. Not sure why its happening. Can anybody help ?