-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
Description
Is your feature request related to a problem? Please describe.
the current usage looks tedious (https://github.com/Project-MONAI/research-contributions/blob/07da7ad36a0b218556a427f3bc5292a772c30f60/auto3dseg/algorithm_templates/segresnet2d/scripts/infer.py#L34-L50)
parser = ConfigParser()
parser.read_config(config_file_)
parser.update(pairs=_args)
data_file_base_dir = parser.get_parsed_content("data_file_base_dir")
data_list_file_path = parser.get_parsed_content("data_list_file_path")
self.fast = parser.get_parsed_content("infer")["fast"]
self.num_adjacent_slices = parser.get_parsed_content("num_adjacent_slices")
self.num_sw_batch_size = parser.get_parsed_content("num_sw_batch_size")
self.output_classes = parser.get_parsed_content("output_classes")
self.overlap_ratio = parser.get_parsed_content("overlap_ratio")
self.patch_size_valid = parser.get_parsed_content("patch_size_valid")
softmax = parser.get_parsed_content("softmax")
ckpt_name = parser.get_parsed_content("infer")["ckpt_name"]
data_list_key = parser.get_parsed_content("infer")["data_list_key"]
output_path = parser.get_parsed_content("infer")["ouptut_path"]this is a feature request of simplifying the APIs to support more user-friendly calls
to get the parsed config as attributes directly:
cfg = ConfigParser()
cfg.read_config(config_file_)
cfg.update(pairs=_args)
data_file_base_dir = cfg.data_file_base_dir
data_list_file_path = cfg.data_list_file_path
self.fast = cfg.infer.fast
...cc @Project-MONAI/core-reviewers
Nic-Ma