MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / read_meta

Method read_meta

monai/bundle/config_parser.py:500–512  ·  view source on GitHub ↗

Read the metadata from specified JSON or YAML file. The metadata as a dictionary will be stored at ``self.config["_meta_"]``. Args: f: filepath of the metadata file, the content must be a dictionary, if providing a list of files, will merge the c

(self, f: PathLike | Sequence[PathLike] | dict, **kwargs: Any)

Source from the content-addressed store, hash-verified

498 return self.ref_resolver.get_resolved_content(id=id, **kwargs)
499
500 def read_meta(self, f: PathLike | Sequence[PathLike] | dict, **kwargs: Any) -> None:
501 """
502 Read the metadata from specified JSON or YAML file.
503 The metadata as a dictionary will be stored at ``self.config["_meta_"]``.
504
505 Args:
506 f: filepath of the metadata file, the content must be a dictionary,
507 if providing a list of files, will merge the content of them.
508 if providing a dictionary directly, use it as metadata.
509 kwargs: other arguments for ``json.load`` or ``yaml.safe_load``, depends on the file format.
510
511 """
512 self.set(self.load_config_files(f, **kwargs), self.meta_key)
513
514 def read_config(self, f: PathLike | Sequence[PathLike] | dict, **kwargs: Any) -> None:
515 """

Callers 7

verify_net_in_outFunction · 0.95
onnx_exportFunction · 0.95
ckpt_exportFunction · 0.95
trt_exportFunction · 0.95
load_bundle_configFunction · 0.95
__init__Method · 0.80
__init__Method · 0.80

Calls 2

setMethod · 0.95
load_config_filesMethod · 0.95

Tested by

no test coverage detected