MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / parser

Method parser

tensorflow/contrib/session_bundle/exporter.py:304–313  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

302 if exports_to_keep:
303 # create a simple parser that pulls the export_version from the directory.
304 def parser(path):
305 if os.name == "nt":
306 match = re.match(
307 r"^" + export_dir_base.replace("\\", "/") + r"/(\d{8})$",
308 path.path.replace("\\", "/"))
309 else:
310 match = re.match(r"^" + export_dir_base + r"/(\d{8})$", path.path)
311 if not match:
312 return None
313 return path._replace(export_version=int(match.group(1)))
314
315 paths_to_delete = gc.negation(exports_to_keep)
316 for p in paths_to_delete(gc.get_paths(export_dir_base, parser=parser)):

Callers

nothing calls this directly

Calls 3

replaceMethod · 0.80
matchMethod · 0.45
groupMethod · 0.45

Tested by

no test coverage detected