MCPcopy Create free account
hub / github.com/AnswerDotAI/ModernBERT / get_values_from_path

Function get_values_from_path

eval.py:222–235  ·  view source on GitHub ↗

Parses out information from a path/string that looks like. ... key=value<separator...

(path: str, separator: str = "/")

Source from the content-addressed store, hash-verified

220
221
222def get_values_from_path(path: str, separator: str = "/") -> Dict[str, str]:
223 """Parses out information from a path/string that looks like.
224
225 ...<separator>key=value<separator...
226 """
227 dict_output = {}
228 underscore_split = path.split(separator)
229 for item in underscore_split:
230 if "=" not in item:
231 continue
232
233 key, value = item.split("=")
234 dict_output[key] = value
235 return dict_output
236
237
238def get_checkpoint_name_from_path(path: str) -> str:

Callers 2

format_job_nameFunction · 0.70
trainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected