本文整理汇总了Python中jubatus_test.test_util.TestUtil.kill_process方法的典型用法代码示例。如果您正苦于以下问题:Python TestUtil.kill_process方法的具体用法?Python TestUtil.kill_process怎么用?Python TestUtil.kill_process使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jubatus_test.test_util.TestUtil
的用法示例。
在下文中一共展示了TestUtil.kill_process方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
# 需要导入模块: from jubatus_test.test_util import TestUtil [as 别名]
# 或者: from jubatus_test.test_util.TestUtil import kill_process [as 别名]
def setUp(self):
self.config = {
"method": "lsh",
"converter": {
"string_filter_types": {},
"string_filter_rules": [],
"num_filter_types": {},
"num_filter_rules": [],
"string_types": {},
"string_rules": [{"key": "*", "type": "str", "sample_weight": "bin", "global_weight": "bin"}],
"num_types": {},
"num_rules": [{"key": "*", "type": "num"}]
},
"parameter": {
"hash_num": 64
}
}
TestUtil.write_file('config_nearest_neighbor.json', json.dumps(self.config))
self.srv = TestUtil.fork_process('nearest_neighbor', port, 'config_nearest_neighbor.json')
try:
self.cli = NearestNeighbor(host, port, "name")
except:
TestUtil.kill_process(self.srv)
raise
示例2: setUp
# 需要导入模块: from jubatus_test.test_util import TestUtil [as 别名]
# 或者: from jubatus_test.test_util.TestUtil import kill_process [as 别名]
def setUp(self):
self.config = {
"method": "PA",
"converter": {
"string_filter_types": {},
"string_filter_rules": [],
"num_filter_types": {},
"num_filter_rules": [],
"string_types": {},
"string_rules": [{"key": "*", "type": "str", "sample_weight": "bin", "global_weight": "bin"}],
"num_types": {},
"num_rules": [{"key": "*", "type": "num"}]
},
"parameter": {
"sensitivity" : 0.1,
"regularization_weight" : 3.402823e+38
}
}
TestUtil.write_file('config_regression.json', json.dumps(self.config))
self.srv = TestUtil.fork_process('regression', port, 'config_regression.json')
try:
self.cli = Regression(host, port, "name")
except:
TestUtil.kill_process(self.srv)
raise
示例3: setUp
# 需要导入模块: from jubatus_test.test_util import TestUtil [as 别名]
# 或者: from jubatus_test.test_util.TestUtil import kill_process [as 别名]
def setUp(self):
self.config = {
"method" : "kmeans",
"converter" : {
"string_filter_types" : {},
"string_filter_rules" : [],
"num_filter_types" : {},
"num_filter_rules" : [],
"string_types" : {},
"string_rules" : [
{ "key" : "*", "type" : "str", "sample_weight" : "bin", "global_weight" : "bin" }
],
"num_types" : {},
"num_rules" : [
{ "key" : "*", "type" : "num" }
]
},
"parameter" : {
"k" : 10,
"compressor_method" : "simple",
"bucket_size" : 3,
"compressed_bucket_size" : 2,
"bicriteria_base_size" : 1,
"bucket_length" : 2,
"forgetting_factor" : 0,
"forgetting_threshold" : 0.5,
"seed": 0,
}
}
TestUtil.write_file('config_clustering.json', json.dumps(self.config))
self.srv = TestUtil.fork_process('clustering', port, 'config_clustering.json')
try:
self.cli = Clustering(host, port, "name")
except:
TestUtil.kill_process(self.srv)
raise
示例4: tearDown
# 需要导入模块: from jubatus_test.test_util import TestUtil [as 别名]
# 或者: from jubatus_test.test_util.TestUtil import kill_process [as 别名]
def tearDown(self):
TestUtil.kill_process(self.srv)
示例5: tearDown
# 需要导入模块: from jubatus_test.test_util import TestUtil [as 别名]
# 或者: from jubatus_test.test_util.TestUtil import kill_process [as 别名]
def tearDown(self):
if self.cli:
self.cli.get_client().close()
TestUtil.kill_process(self.srv)