Skip to content
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

Avoid unnecessary copy saving checkpoint to fsspec files #17590

Closed
wants to merge 4 commits into from

Commits on May 8, 2023

  1. Avoid unnecessary copy saving checkpoint to fsspec files

    In particular, saving large checkpoints >2GB will hit "Requested array size exceeds VM limit" error when writing to HDFS through pyarrow:
    
    ```
      File "/usr/local/lib/python3.9/dist-packages/pytorch_lightning/strategies/strategy.py", line 466, in save_checkpoint
        self.checkpoint_io.save_checkpoint(checkpoint, filepath, storage_options=storage_options)
      File "/usr/local/lib/python3.9/dist-packages/lightning_fabric/plugins/io/torch_io.py", line 54, in save_checkpoint
        _atomic_save(checkpoint, path)
      File "/usr/local/lib/python3.9/dist-packages/lightning_fabric/utilities/cloud_io.py", line 72, in _atomic_save
        f.write(bytesbuffer.getvalue())
      File "pyarrow/io.pxi", line 359, in pyarrow.lib.NativeFile.write
      File "pyarrow/error.pxi", line 113, in pyarrow.lib.check_status
    OSError: [Errno 12] HDFS Write failed. Detail: [errno 12] Cannot allocate memory
    ```
    byronyi committed May 8, 2023
    Configuration menu
    Copy the full SHA
    07e1ded View commit details
    Browse the repository at this point in the history

Commits on May 9, 2023

  1. Configuration menu
    Copy the full SHA
    9e96b4e View commit details
    Browse the repository at this point in the history

Commits on May 11, 2023

  1. Configuration menu
    Copy the full SHA
    74510a3 View commit details
    Browse the repository at this point in the history

Commits on May 23, 2023

  1. Configuration menu
    Copy the full SHA
    10b0ad1 View commit details
    Browse the repository at this point in the history