Skip to content

Checkpoint handler save files with wrong permissions #1862

@Nic-Ma

Description

@Nic-Ma

Describe the bug
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.
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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions