Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions monai/bundle/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -864,8 +864,8 @@ def init_bundle(
ckpt_file: Optional[PathLike] = None,
network: Optional[torch.nn.Module] = None,
dataset_license: bool = False,
metadata_str: Union[Dict, str] = DEFAULT_METADATA,
inference_str: Union[Dict, str] = DEFAULT_INFERENCE,
metadata_str: Union[Dict, str] = None,
inference_str: Union[Dict, str] = None,
):
"""
Initialise a new bundle directory with some default configuration files and optionally network weights.
Expand All @@ -883,6 +883,10 @@ def init_bundle(
dataset_license: if `True`, a default license file called "data_license.txt" will be produced. This
file is required if there are any license conditions stated for data your bundle uses.
"""
if metadata_str is None:
metadata_str = DEFAULT_METADATA
if inference_str is None:
inference_str = DEFAULT_INFERENCE

bundle_dir = Path(bundle_dir).absolute()

Expand Down