diff --git a/examples/caffe/train/mnist/data/mnist_test_lmdb/mnist_test_lmdb/data.mdb b/examples/caffe/train/mnist/data/mnist_test_lmdb/mnist_test_lmdb/data.mdb new file mode 100644 index 0000000..8859f50 Binary files /dev/null and b/examples/caffe/train/mnist/data/mnist_test_lmdb/mnist_test_lmdb/data.mdb differ diff --git a/examples/caffe/train/mnist/data/mnist_test_lmdb/mnist_test_lmdb/lock.mdb b/examples/caffe/train/mnist/data/mnist_test_lmdb/mnist_test_lmdb/lock.mdb new file mode 100644 index 0000000..41ac0b0 Binary files /dev/null and b/examples/caffe/train/mnist/data/mnist_test_lmdb/mnist_test_lmdb/lock.mdb differ diff --git a/examples/caffe/train/mnist/data/mnist_train_lmdb/data.mdb b/examples/caffe/train/mnist/data/mnist_train_lmdb/data.mdb new file mode 100644 index 0000000..5c11ba4 Binary files /dev/null and b/examples/caffe/train/mnist/data/mnist_train_lmdb/data.mdb differ diff --git a/examples/caffe/train/mnist/data/mnist_train_lmdb/lock.mdb b/examples/caffe/train/mnist/data/mnist_train_lmdb/lock.mdb new file mode 100644 index 0000000..72a8c7e Binary files /dev/null and b/examples/caffe/train/mnist/data/mnist_train_lmdb/lock.mdb differ diff --git a/uai/arch_conf/base_conf.py b/uai/arch_conf/base_conf.py index bf87ad3..6b9e32f 100644 --- a/uai/arch_conf/base_conf.py +++ b/uai/arch_conf/base_conf.py @@ -102,13 +102,13 @@ def _add_args(self): def load_params(self): self.params = vars(self.parser.parse_args()) - if self.params.has_key('cpu'): + if 'cpu' in self.params: if self.params['cpu'] < 1 or self.params["cpu"] > 8: raise RuntimeError('cpu should be int between 1 to 8, but now:{0}'.format(self.params['cpu'])) - if self.params.has_key('memory'): + if 'memory' in self.params: if self.params['memory'] < 1 or self.params["memory"] > 8: raise RuntimeError('memory should be int between 1 to 8, but now:{0}'.format(self.params['memory'])) - if self.params.has_key('deploy_weight'): + if 'deploy_weight' in self.params: if int(self.params['deploy_weight']) < 1 or int(self.params["deploy_weight"]) > 100: raise RuntimeError('deploy_weight should be int between 1 to 100, but now:{0}'.format(self.params['deploy_weight'])) diff --git a/uai/cmd/base_cmd.py b/uai/cmd/base_cmd.py index 4eaed9b..657b2ab 100644 --- a/uai/cmd/base_cmd.py +++ b/uai/cmd/base_cmd.py @@ -290,7 +290,7 @@ def _cmd_request(self): self._cmd_common_request() def _cmd_common_request(self): - if self.cmd_params.has_key('Signature'): + if 'Signature' in self.cmd_params: self.cmd_params.pop('Signature') self.cmd_params['Signature'] = _verfy_ac(self.conf_params['private_key'], self.cmd_params) diff --git a/uai/pack/base_pack_tool.py b/uai/pack/base_pack_tool.py index 1862d06..856735a 100644 --- a/uai/pack/base_pack_tool.py +++ b/uai/pack/base_pack_tool.py @@ -53,7 +53,7 @@ def _load_args(self): def _analysis_args(self): self.config.load_params() - if self.config.params.has_key("ai_arch_v"): + if "ai_arch_v" in self.config.params: if self.platform != self.config.params["ai_arch_v"].lower().split('-')[0]: raise RuntimeError("ai_arch_v should be one version of " + self.platform) diff --git a/uaitrain/operation/pack_docker_image/base_pack_op.py b/uaitrain/operation/pack_docker_image/base_pack_op.py index f800d1a..c2d7632 100644 --- a/uaitrain/operation/pack_docker_image/base_pack_op.py +++ b/uaitrain/operation/pack_docker_image/base_pack_op.py @@ -380,4 +380,4 @@ def cmd_run(self, args): self.cpu_image = cpu_image_name self._build_userimage() - + \ No newline at end of file