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

Method _backing_id

monai/bundle/config_parser.py:116–131  ·  view source on GitHub ↗

Return the real config id this proxy writes to, resolving all ``$@ref`` hops transitively.

(self)

Source from the content-addressed store, hash-verified

114 return f"{self._id}{ID_SEP_KEY}{key}"
115
116 def _backing_id(self) -> str:
117 """Return the real config id this proxy writes to, resolving all ``$@ref`` hops transitively."""
118 current = self._id
119 seen: set[str] = set()
120 while True:
121 if current in seen:
122 break
123 seen.add(current)
124 raw = self._parser[current]
125 if not isinstance(raw, str):
126 break
127 refs = ReferenceResolver.match_refs_pattern(raw)
128 if not refs:
129 break
130 current = next(iter(refs))
131 return current
132
133 def _chain(self, key: str) -> Any:
134 """

Callers 2

__setitem__Method · 0.95
__delitem__Method · 0.95

Calls 2

addMethod · 0.80
match_refs_patternMethod · 0.80

Tested by

no test coverage detected