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

Function build_name_from_slices

tensorflow/tools/dockerfiles/assembler.py:289–299  ·  view source on GitHub ↗

Build the tag name (cpu-devel...) from a list of slices.

(format_string, slices, args, is_dockerfile=False)

Source from the content-addressed store, hash-verified

287
288
289def build_name_from_slices(format_string, slices, args, is_dockerfile=False):
290 """Build the tag name (cpu-devel...) from a list of slices."""
291 name_formatter = copy.deepcopy(args)
292 name_formatter.update({s['set_name']: s['add_to_name'] for s in slices})
293 name_formatter.update({
294 s['set_name']: s['dockerfile_exclusive_name']
295 for s in slices
296 if is_dockerfile and 'dockerfile_exclusive_name' in s
297 })
298 name = format_string.format(**name_formatter)
299 return name
300
301
302def update_args_dict(args_dict, updater):

Callers 1

assemble_tagsFunction · 0.85

Calls 2

updateMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected