MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / remove_prefix_string

Function remove_prefix_string

PATH/core/utils.py:127–129  ·  view source on GitHub ↗
(string, prefix)

Source from the content-addressed store, hash-verified

125
126
127def remove_prefix_string(string, prefix):
128 assert string.startswith(prefix), "can not remove prefix."
129 return string[len(prefix):]
130
131
132def remove_prefix_from_state_dict(state_dict, prefix):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected