MCPcopy Index your code
hub / github.com/Project-MONAI/MONAI / get

Method get

monai/bundle/config_parser.py:398–410  ·  view source on GitHub ↗

Get the config by id. Args: id: id to specify the expected position. See also :py:meth:`__getitem__`. default: default value to return if the specified ``id`` is invalid.

(self, id: str = "", default: Any | None = None)

Source from the content-addressed store, hash-verified

396 return
397
398 def get(self, id: str = "", default: Any | None = None) -> Any:
399 """
400 Get the config by id.
401
402 Args:
403 id: id to specify the expected position. See also :py:meth:`__getitem__`.
404 default: default value to return if the specified ``id`` is invalid.
405
406 """
407 try:
408 return self[id]
409 except (KeyError, IndexError, ValueError): # Index error for integer indexing
410 return default
411
412 def set(self, config: Any, id: str = "", recursive: bool = True) -> None:
413 """

Callers 15

get_config_from_rootFunction · 0.95
setMethod · 0.95
parseMethod · 0.95
read_configMethod · 0.95
_do_resolveMethod · 0.95
load_config_filesMethod · 0.95
download_large_filesFunction · 0.95
__init__Method · 0.95
update_opsMethod · 0.95
concat_val_to_npFunction · 0.95

Calls

no outgoing calls

Tested by 15

test_config_contentMethod · 0.76
test_parseMethod · 0.76
test_macro_replaceMethod · 0.76
test_is_quickFunction · 0.64
__init__Method · 0.64
_wrapperMethod · 0.64
_wrapperMethod · 0.64
command_line_testsFunction · 0.64
equal_state_dictFunction · 0.64
test_shapeMethod · 0.64
run_interactionMethod · 0.64
test_monai_env_varsMethod · 0.64