Project-MONAI / tutorials

MONAI Tutorials
https://monai.io/started.html
Apache License 2.0
1.85k stars 682 forks source link

Auto3DSeg BundleGen clobbers existing bundles #1630

Open pwrightkcl opened 9 months ago

pwrightkcl commented 9 months ago

Problem I just discovered the hard way that BundleGen completely clobbers existing bundles, not only overwriting files, but deleting files it does not write (like training output).

Desired solution It would be nice to have a clobber=True kind of option, where the default would be to give a warning that the bundle directory already exists.

Example code Here are the relevant parts of what I ran:

from monai.apps.auto3dseg import BundleGen

bundle_generator = BundleGen(
    algo_path=work_dir,
    data_stats_filename=datastats_file,
    data_src_cfg_name=input_yaml,
)

bundle_generator.generate(work_dir, num_fold=5)