MCPcopy Create free account
hub / github.com/pytorch/pytorch / validModelName

Function validModelName

caffe2/python/models/download.py:132–138  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

130
131
132def validModelName(name):
133 invalid_names = ['__init__']
134 if name in invalid_names:
135 return False
136 if not re.match("^[/0-9a-zA-Z_-]+$", name):
137 return False
138 return True
139
140class ModelDownloader:
141

Callers 1

download.pyFile · 0.85

Calls 1

matchMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…