82 def build(self, commands):
83 cmd_book = dict.fromkeys(
84 ['one-import-bcq', 'one-import-tflite', 'one-pack', 'one-partition'],
85 self._build_default)
86 cmd_book['one-codegen'] = self._build_with_unknown_command
87 cmd_book['one-import-onnx'] = self._build_import
88 cmd_book['one-import-pytorch'] = self._build_import
89 cmd_book['one-import-tf'] = self._build_import
90 cmd_book['one-infer'] = self._build_with_unknown_command
91 cmd_book['one-optimize'] = self._build_optimize
92 cmd_book['one-profile'] = self._build_with_unknown_command
93 cmd_book['one-quantize'] = self._build_quantize
94
95 return cmd_book[self.type](commands)