MCPcopy
hub / github.com/XPixelGroup/DiffBIR / get_model_name_from_path

Function get_model_name_from_path

llava/mm_utils.py:207–213  ·  view source on GitHub ↗
(model_path)

Source from the content-addressed store, hash-verified

205
206
207def get_model_name_from_path(model_path):
208 model_path = model_path.strip("/")
209 model_paths = model_path.split("/")
210 if model_paths[-1].startswith('checkpoint-'):
211 return model_paths[-2] + "_" + model_paths[-1]
212 else:
213 return model_paths[-1]
214
215class KeywordsStoppingCriteria(StoppingCriteria):
216 def __init__(self, keywords, tokenizer, input_ids):

Callers 7

mainFunction · 0.90
eval_modelFunction · 0.90
eval_modelFunction · 0.90
eval_modelFunction · 0.90
eval_modelFunction · 0.90
eval_modelFunction · 0.90
__init__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected