Skip to content

Checkpoint handler save files with wrong permissions #1876

@Nic-Ma

Description

@Nic-Ma

🐛 Bug description

Hi @vfdev-5 ,

We always run programs in dockers, usually it's root user, and found an issue that: pure PyTorch program saves model(torch.save) and has the read permission for non-root users, but ignite Checkpoint handler saves model and only has read permission for root users.
You can reproduce this issue by below 2 MONAI examples:

  1. https://github.com/Project-MONAI/tutorials/blob/master/3d_segmentation/torch/unet_training_dict.py
    The saved model will be:
-rw-r--r-- 1 root root 19253862 Mar 26 02:08 best_metric_model_segmentation3d_dict.pth
  1. https://github.com/Project-MONAI/tutorials/blob/master/3d_segmentation/ignite/unet_training_dict.py
    The saved model will be:
-rw------- 1 root root 57738580 Mar 26 01:54 net_checkpoint_50.pt

ignite version is 0.4.4, could you please help take a look at this issue?
As we are close to MONAI and Clara next release, it's an urgent bug for us.

Thanks in advance.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions