예제 #1
0
 def test_mode_null_c2(self):
     """test mode is null c2."""
     self.yaml_config_name = sys._getframe().f_code.co_name + '.yaml'
     self.yaml_content['mode'] = []
     self.run_yaml()
     built_in.equals(self.pro.returncode, 1, self.err_msg)
     built_in.contains(self.err, 'Traceback', self.err_msg)
예제 #2
0
 def test_mode_str_ps_local_cluster_1p_1t_async_c2(self):
     """test_mode_str_ps_local_cluster_1p_1t_c2."""
     self.yaml_config_name = sys._getframe().f_code.co_name + '.yaml'
     self.yaml_content["mode"] = "runner0"
     self.yaml_content["runner"][0]["class"] = "local_cluster_train"
     self.run_yaml()
     built_in.equals(self.pro.returncode, 0, self.err_msg)
     built_in.not_contains('logs/server.0', 'Traceback', self.err_msg)
     built_in.contains('logs/worker.0', 'AsyncCommunicator Initialized', self.err_msg)
예제 #3
0
 def test_mode_str_ps_local_cluster_1p_1t_geo_c2(self):
     """test_mode_str_ps_local_cluster_1p_1t_geo_c2."""
     self.yaml_config_name = sys._getframe().f_code.co_name + '.yaml'
     self.yaml_content["mode"] = "runner0"
     self.yaml_content["runner"][0]["class"] = "local_cluster_train"
     self.yaml_content["runner"][0]["distribute_strategy"] = "geo"
     self.run_yaml()
     built_in.equals(self.pro.returncode, 0, self.err_msg)
     built_in.regex_match_len('logs/worker.0', self.epoch_re, 2, self.err_msg)
     built_in.contains('logs/worker.0', 'GeoSgdCommunicator Initialized', self.err_msg)
예제 #4
0
 def test_user_define_all_normal(self):
     """test normal yaml construct by MultiTaskMMOE base."""
     self.yaml_config_name = sys._getframe().f_code.co_name + '.yaml'
     self.yaml_content["runner"][0]["instance_class_path"] = 'paddle_rec_user_define.py'
     self.yaml_content["runner"][0]["network_class_path"] = 'paddle_rec_user_define.py'
     self.yaml_content["runner"][0]["startup_class_path"] = 'paddle_rec_user_define.py'
     self.yaml_content["runner"][0]["runner_class_path"] = 'paddle_rec_user_define.py'
     self.yaml_content["runner"][0]["terminal_class_path"] = 'paddle_rec_user_define.py'
     self.run_yaml()
     built_in.equals(self.pro.returncode, 0, self.err_msg)
     built_in.not_contains(self.err, 'Traceback', self.err_msg)
     built_in.contains(self.out, 'User Define SingleInstance', self.err_msg)
     built_in.contains(self.out, 'User Define SingleNetwork', self.err_msg)
     built_in.contains(self.out, 'User Define SingleStartup', self.err_msg)
     built_in.contains(self.out, 'User Define SingleRunner', self.err_msg)
     built_in.contains(self.out, 'User Define SingleTerminal', self.err_msg)