Search is not available for this dataset
identifier
stringlengths
1
155
parameters
stringlengths
2
6.09k
docstring
stringlengths
11
63.4k
docstring_summary
stringlengths
0
63.4k
function
stringlengths
29
99.8k
function_tokens
list
start_point
list
end_point
list
language
stringclasses
1 value
docstring_language
stringlengths
2
7
docstring_language_predictions
stringlengths
18
23
is_langid_reliable
stringclasses
2 values
SimpleTest.test_basic_addition
(self)
Tests that 1 + 1 always equals 2.
Tests that 1 + 1 always equals 2.
def test_basic_addition(self): """ Tests that 1 + 1 always equals 2. """ self.assertEqual(1 + 1, 2)
[ "def", "test_basic_addition", "(", "self", ")", ":", "self", ".", "assertEqual", "(", "1", "+", "1", ",", "2", ")" ]
[ 11, 4 ]
[ 15, 34 ]
python
en
['en', 'error', 'th']
False
mse
(synth_rep, ref_rep, **kwargs)
r"""return the MSE between synth_rep and ref_rep For two tensors, :math:`x` and :math:`y`, with :math:`n` values each: .. math:: MSE &= \frac{1}{n}\sum_i=1^n (x_i - y_i)^2 The two images must have a float dtype Parameters ---------- synth_rep : torch.Tensor The first ten...
r"""return the MSE between synth_rep and ref_rep
def mse(synth_rep, ref_rep, **kwargs): r"""return the MSE between synth_rep and ref_rep For two tensors, :math:`x` and :math:`y`, with :math:`n` values each: .. math:: MSE &= \frac{1}{n}\sum_i=1^n (x_i - y_i)^2 The two images must have a float dtype Parameters ---------- syn...
[ "def", "mse", "(", "synth_rep", ",", "ref_rep", ",", "*", "*", "kwargs", ")", ":", "return", "torch", ".", "pow", "(", "synth_rep", "-", "ref_rep", ",", "2", ")", ".", "mean", "(", ")" ]
[ 13, 0 ]
[ 42, 51 ]
python
en
['en', 'en', 'en']
True
l2_norm
(synth_rep, ref_rep, **kwargs)
r"""L2-norm of the difference between ref_rep and synth_rep good default objective function Parameters ---------- synth_rep : torch.Tensor The first tensor to compare, model representation of the synthesized image ref_rep : torch.Tensor The second tensor to compare, model r...
r"""L2-norm of the difference between ref_rep and synth_rep
def l2_norm(synth_rep, ref_rep, **kwargs): r"""L2-norm of the difference between ref_rep and synth_rep good default objective function Parameters ---------- synth_rep : torch.Tensor The first tensor to compare, model representation of the synthesized image ref_rep : torch.Tenso...
[ "def", "l2_norm", "(", "synth_rep", ",", "ref_rep", ",", "*", "*", "kwargs", ")", ":", "return", "torch", ".", "norm", "(", "ref_rep", "-", "synth_rep", ",", "p", "=", "2", ")" ]
[ 45, 0 ]
[ 67, 47 ]
python
en
['en', 'en', 'en']
True
penalize_range
(synth_img, allowed_range=(0, 1), **kwargs)
r"""penalize values outside of allowed_range instead of clamping values to exactly fall in a range, this provides a 'softer' way of doing it, by imposing a quadratic penalty on any values outside the allowed_range. All values within the allowed_range have a penalty of 0 Parameters ---------- ...
r"""penalize values outside of allowed_range
def penalize_range(synth_img, allowed_range=(0, 1), **kwargs): r"""penalize values outside of allowed_range instead of clamping values to exactly fall in a range, this provides a 'softer' way of doing it, by imposing a quadratic penalty on any values outside the allowed_range. All values within the ...
[ "def", "penalize_range", "(", "synth_img", ",", "allowed_range", "=", "(", "0", ",", "1", ")", ",", "*", "*", "kwargs", ")", ":", "# the indexing should flatten it", "below_min", "=", "synth_img", "[", "synth_img", "<", "allowed_range", "[", "0", "]", "]", ...
[ 70, 0 ]
[ 98, 55 ]
python
en
['en', 'en', 'en']
True
l2_and_penalize_range
(synth_rep, ref_rep, synth_img, allowed_range=(0, 1), beta=.5, **kwargs)
Loss the combines L2-norm of the difference and range penalty. this function returns a weighted average of the L2-norm of the difference between ``ref_rep`` and ``synth_rep`` (as calculated by ``l2_norm()``) and the range penalty of ``synth_img`` (as calculated by ``penalize_range()``). The loss is: `...
Loss the combines L2-norm of the difference and range penalty.
def l2_and_penalize_range(synth_rep, ref_rep, synth_img, allowed_range=(0, 1), beta=.5, **kwargs): """Loss the combines L2-norm of the difference and range penalty. this function returns a weighted average of the L2-norm of the difference between ``ref_rep`` and ``synth_rep`` (as ...
[ "def", "l2_and_penalize_range", "(", "synth_rep", ",", "ref_rep", ",", "synth_img", ",", "allowed_range", "=", "(", "0", ",", "1", ")", ",", "beta", "=", ".5", ",", "*", "*", "kwargs", ")", ":", "l2_loss", "=", "l2_norm", "(", "synth_rep", ",", "ref_re...
[ 101, 0 ]
[ 138, 52 ]
python
en
['en', 'en', 'en']
True
mse_and_penalize_range
(synth_rep, ref_rep, synth_img, allowed_range=(0, 1), beta=.5, **kwargs)
Loss that combines MSE of the difference and range penalty. this function returns a weighted average of the MSE of the difference between ``ref_rep`` and ``synth_rep`` (as calculated by ``mse()``) and the range penalty of ``synth_img`` (as calculated by ``penalize_range()``). The loss is: ``beta *...
Loss that combines MSE of the difference and range penalty.
def mse_and_penalize_range(synth_rep, ref_rep, synth_img, allowed_range=(0, 1), beta=.5, **kwargs): """Loss that combines MSE of the difference and range penalty. this function returns a weighted average of the MSE of the difference between ``ref_rep`` and ``synth_rep`` (as calcu...
[ "def", "mse_and_penalize_range", "(", "synth_rep", ",", "ref_rep", ",", "synth_img", ",", "allowed_range", "=", "(", "0", ",", "1", ")", ",", "beta", "=", ".5", ",", "*", "*", "kwargs", ")", ":", "mse_loss", "=", "mse", "(", "ref_rep", ",", "synth_rep"...
[ 141, 0 ]
[ 179, 53 ]
python
en
['en', 'en', 'en']
True
generate_norm_stats
(model, input_dir, save_path=None, img_shape=None, as_gray=True, index=None)
r"""Generate the statistics we want to use for normalization in models We sometimes want to normalize our models by whitening their internal representation (i.e., setting their mean to 0 and their covariance to the identity matrix). In practice, you need many samples to do this, but at the very least y...
r"""Generate the statistics we want to use for normalization in models
def generate_norm_stats(model, input_dir, save_path=None, img_shape=None, as_gray=True, index=None): r"""Generate the statistics we want to use for normalization in models We sometimes want to normalize our models by whitening their internal representation (i.e., setting their mean ...
[ "def", "generate_norm_stats", "(", "model", ",", "input_dir", ",", "save_path", "=", "None", ",", "img_shape", "=", "None", ",", "as_gray", "=", "True", ",", "index", "=", "None", ")", ":", "images", "=", "[", "]", "paths", "=", "glob", "(", "op", "....
[ 182, 0 ]
[ 306, 16 ]
python
en
['en', 'en', 'en']
True
zscore_stats
(stats_dict, model=None, **to_normalize)
r"""zscore the model's statistics based on stats_dict We'd like to use the dictionary of statistics generated by ``generate_norm_stats`` to actually normalize some of the statistics in our model. This will take a model and the ``stats_dict`` dictionary and z-score the appropriate attribute of the model...
r"""zscore the model's statistics based on stats_dict
def zscore_stats(stats_dict, model=None, **to_normalize): r"""zscore the model's statistics based on stats_dict We'd like to use the dictionary of statistics generated by ``generate_norm_stats`` to actually normalize some of the statistics in our model. This will take a model and the ``stats_dict`` ...
[ "def", "zscore_stats", "(", "stats_dict", ",", "model", "=", "None", ",", "*", "*", "to_normalize", ")", ":", "if", "to_normalize", ":", "if", "model", "is", "not", "None", ":", "raise", "Exception", "(", "\"keywords were passed to normalize, so model must be None...
[ 309, 0 ]
[ 388, 16 ]
python
en
['en', 'en', 'en']
True
KptCreator.strip_comments
(path)
Strip the existing comments from YAML files
Strip the existing comments from YAML files
def strip_comments(path): """Strip the existing comments from YAML files""" for root, _, files in os.walk(path): for f in files: ext = os.path.splitext(f)[-1] logging.info(f"{ext}") if ext != ".yaml": continue p = os.path.join(root, f) logging.info(f"Pro...
[ "def", "strip_comments", "(", "path", ")", ":", "for", "root", ",", "_", ",", "files", "in", "os", ".", "walk", "(", "path", ")", ":", "for", "f", "in", "files", ":", "ext", "=", "os", ".", "path", ".", "splitext", "(", "f", ")", "[", "-", "1...
[ 30, 2 ]
[ 56, 34 ]
python
en
['en', 'en', 'en']
True
feature
(self, node="clickhouse1")
Check alter role query syntax. ```sql ALTER ROLE [IF EXISTS] name [ON CLUSTER cluster_name] [RENAME TO new_name] [SETTINGS variable [= value] [MIN [=] min_value] [MAX [=] max_value] [READONLY|WRITABLE] | PROFILE 'profile_name'] [,...] ```
Check alter role query syntax.
def feature(self, node="clickhouse1"): """Check alter role query syntax. ```sql ALTER ROLE [IF EXISTS] name [ON CLUSTER cluster_name] [RENAME TO new_name] [SETTINGS variable [= value] [MIN [=] min_value] [MAX [=] max_value] [READONLY|WRITABLE] | PROFILE 'profile_name'] [,...] ``` """ no...
[ "def", "feature", "(", "self", ",", "node", "=", "\"clickhouse1\"", ")", ":", "node", "=", "self", ".", "context", ".", "cluster", ".", "node", "(", "node", ")", "@", "contextmanager", "def", "setup", "(", "role", ",", "profile", "=", "None", ")", ":...
[ 9, 0 ]
[ 195, 83 ]
python
en
['fr', 'en', 'en']
True
wideresnet16
( num_classes: int = 1000, widening_factor: int = 8, droprate: float = 0.3 )
factory class of Wide ResNet-16. Parameters ---------- num_classes : int Number of output class. widening_factor : int This number decide width of model which is represented by k in original paper. droprate : float Probability of dropout.
factory class of Wide ResNet-16. Parameters ---------- num_classes : int Number of output class. widening_factor : int This number decide width of model which is represented by k in original paper. droprate : float Probability of dropout.
def wideresnet16( num_classes: int = 1000, widening_factor: int = 8, droprate: float = 0.3 ) -> nn.Module: """factory class of Wide ResNet-16. Parameters ---------- num_classes : int Number of output class. widening_factor : int This number decide width of model which is represen...
[ "def", "wideresnet16", "(", "num_classes", ":", "int", "=", "1000", ",", "widening_factor", ":", "int", "=", "8", ",", "droprate", ":", "float", "=", "0.3", ")", "->", "nn", ".", "Module", ":", "return", "WideResNet", "(", "num_classes", ",", "16", ","...
[ 134, 0 ]
[ 147, 65 ]
python
en
['en', 'lb', 'en']
True
wideresnet28
( num_classes: int = 1000, widening_factor: int = 10, droprate: float = 0.3 )
factory class of Wide ResNet-28. Parameters ---------- num_classes : int Number of output class. widening_factor : int This number decide width of model which is represented by k in original paper. droprate : float Probability of dropout.
factory class of Wide ResNet-28. Parameters ---------- num_classes : int Number of output class. widening_factor : int This number decide width of model which is represented by k in original paper. droprate : float Probability of dropout.
def wideresnet28( num_classes: int = 1000, widening_factor: int = 10, droprate: float = 0.3 ) -> nn.Module: """factory class of Wide ResNet-28. Parameters ---------- num_classes : int Number of output class. widening_factor : int This number decide width of model which is represe...
[ "def", "wideresnet28", "(", "num_classes", ":", "int", "=", "1000", ",", "widening_factor", ":", "int", "=", "10", ",", "droprate", ":", "float", "=", "0.3", ")", "->", "nn", ".", "Module", ":", "return", "WideResNet", "(", "num_classes", ",", "28", ",...
[ 150, 0 ]
[ 163, 65 ]
python
en
['en', 'lb', 'en']
True
wideresnet40
( num_classes: int = 1000, widening_factor: int = 2, droprate: float = 0.3 )
factory class of Wide ResNet-40. Parameters ---------- num_classes : int Number of output class. widening_factor : int This number decide width of model which is represented by k in original paper. droprate : float Probability of dropout.
factory class of Wide ResNet-40. Parameters ---------- num_classes : int Number of output class. widening_factor : int This number decide width of model which is represented by k in original paper. droprate : float Probability of dropout.
def wideresnet40( num_classes: int = 1000, widening_factor: int = 2, droprate: float = 0.3 ) -> nn.Module: """factory class of Wide ResNet-40. Parameters ---------- num_classes : int Number of output class. widening_factor : int This number decide width of model which is represen...
[ "def", "wideresnet40", "(", "num_classes", ":", "int", "=", "1000", ",", "widening_factor", ":", "int", "=", "2", ",", "droprate", ":", "float", "=", "0.3", ")", "->", "nn", ".", "Module", ":", "return", "WideResNet", "(", "num_classes", ",", "40", ","...
[ 166, 0 ]
[ 179, 65 ]
python
en
['en', 'lb', 'en']
True
TestCacheConfig.reset_configs
(self, connect)
reset configs so the tests are stable
reset configs so the tests are stable
def reset_configs(self, connect): ''' reset configs so the tests are stable ''' status, reply = connect.set_config("cache", "cache_size", '4GB') assert status.OK() status, config_value = connect.get_config("cache", "cache_size") assert config_value == '4GB' ...
[ "def", "reset_configs", "(", "self", ",", "connect", ")", ":", "status", ",", "reply", "=", "connect", ".", "set_config", "(", "\"cache\"", ",", "\"cache_size\"", ",", "'4GB'", ")", "assert", "status", ".", "OK", "(", ")", "status", ",", "config_value", ...
[ 33, 4 ]
[ 44, 36 ]
python
en
['en', 'error', 'th']
False
TestCacheConfig.test_get_cache_size_invalid_parent_key
(self, connect, collection)
target: get invalid parent key method: call get_config without parent_key: cache expected: status not ok
target: get invalid parent key method: call get_config without parent_key: cache expected: status not ok
def test_get_cache_size_invalid_parent_key(self, connect, collection): ''' target: get invalid parent key method: call get_config without parent_key: cache expected: status not ok ''' invalid_configs = gen_invalid_cache_config() invalid_configs.extend(["Cache_conf...
[ "def", "test_get_cache_size_invalid_parent_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "invalid_configs", "=", "gen_invalid_cache_config", "(", ")", "invalid_configs", ".", "extend", "(", "[", "\"Cache_config\"", ",", "\"cache config\"", ",", "\"ca...
[ 47, 4 ]
[ 57, 34 ]
python
en
['en', 'error', 'th']
False
TestCacheConfig.test_get_cache_size_invalid_child_key
(self, connect, collection)
target: get invalid child key method: call get_config without child_key: cache_size expected: status not ok
target: get invalid child key method: call get_config without child_key: cache_size expected: status not ok
def test_get_cache_size_invalid_child_key(self, connect, collection): ''' target: get invalid child key method: call get_config without child_key: cache_size expected: status not ok ''' invalid_configs = gen_invalid_cache_config() invalid_configs.extend(["Cpu_cach...
[ "def", "test_get_cache_size_invalid_child_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "invalid_configs", "=", "gen_invalid_cache_config", "(", ")", "invalid_configs", ".", "extend", "(", "[", "\"Cpu_cache_size\"", ",", "\"cpu cache_size\"", ",", "\...
[ 60, 4 ]
[ 70, 34 ]
python
en
['en', 'error', 'th']
False
TestCacheConfig.test_get_cache_size_valid
(self, connect, collection)
target: get cache_size method: call get_config correctly expected: status ok
target: get cache_size method: call get_config correctly expected: status ok
def test_get_cache_size_valid(self, connect, collection): ''' target: get cache_size method: call get_config correctly expected: status ok ''' status, config_value = connect.get_config("cache", "cache_size") assert status.OK()
[ "def", "test_get_cache_size_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "status", ",", "config_value", "=", "connect", ".", "get_config", "(", "\"cache\"", ",", "\"cache_size\"", ")", "assert", "status", ".", "OK", "(", ")" ]
[ 73, 4 ]
[ 80, 26 ]
python
en
['en', 'error', 'th']
False
TestCacheConfig.test_get_insert_buffer_size_invalid_parent_key
(self, connect, collection)
target: get invalid parent key method: call get_config without parent_key: cache expected: status not ok
target: get invalid parent key method: call get_config without parent_key: cache expected: status not ok
def test_get_insert_buffer_size_invalid_parent_key(self, connect, collection): ''' target: get invalid parent key method: call get_config without parent_key: cache expected: status not ok ''' invalid_configs = gen_invalid_cache_config() invalid_configs.extend(["Ca...
[ "def", "test_get_insert_buffer_size_invalid_parent_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "invalid_configs", "=", "gen_invalid_cache_config", "(", ")", "invalid_configs", ".", "extend", "(", "[", "\"Cache_config\"", ",", "\"cache config\"", ",",...
[ 83, 4 ]
[ 93, 34 ]
python
en
['en', 'error', 'th']
False
TestCacheConfig.test_get_insert_buffer_size_invalid_child_key
(self, connect, collection)
target: get invalid child key method: call get_config without child_key: insert_buffer_size expected: status not ok
target: get invalid child key method: call get_config without child_key: insert_buffer_size expected: status not ok
def test_get_insert_buffer_size_invalid_child_key(self, connect, collection): ''' target: get invalid child key method: call get_config without child_key: insert_buffer_size expected: status not ok ''' invalid_configs = gen_invalid_cache_config() invalid_configs.e...
[ "def", "test_get_insert_buffer_size_invalid_child_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "invalid_configs", "=", "gen_invalid_cache_config", "(", ")", "invalid_configs", ".", "extend", "(", "[", "\"Insert_buffer_size\"", ",", "\"insert buffer_size...
[ 96, 4 ]
[ 106, 34 ]
python
en
['en', 'error', 'th']
False
TestCacheConfig.test_get_insert_buffer_size_valid
(self, connect, collection)
target: get insert_buffer_size method: call get_config correctly expected: status ok
target: get insert_buffer_size method: call get_config correctly expected: status ok
def test_get_insert_buffer_size_valid(self, connect, collection): ''' target: get insert_buffer_size method: call get_config correctly expected: status ok ''' status, config_value = connect.get_config("cache", "insert_buffer_size") assert status.OK()
[ "def", "test_get_insert_buffer_size_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "status", ",", "config_value", "=", "connect", ".", "get_config", "(", "\"cache\"", ",", "\"insert_buffer_size\"", ")", "assert", "status", ".", "OK", "(", ")" ...
[ 109, 4 ]
[ 116, 26 ]
python
en
['en', 'error', 'th']
False
TestCacheConfig.test_get_preload_collection_invalid_child_key
(self, connect, collection)
target: get invalid child key method: call get_config without child_key: preload_collection expected: status not ok
target: get invalid child key method: call get_config without child_key: preload_collection expected: status not ok
def test_get_preload_collection_invalid_child_key(self, connect, collection): ''' target: get invalid child key method: call get_config without child_key: preload_collection expected: status not ok ''' invalid_configs = ["preloadtable", "preload_collection "] for ...
[ "def", "test_get_preload_collection_invalid_child_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "invalid_configs", "=", "[", "\"preloadtable\"", ",", "\"preload_collection \"", "]", "for", "config", "in", "invalid_configs", ":", "status", ",", "confi...
[ 119, 4 ]
[ 128, 34 ]
python
en
['en', 'error', 'th']
False
TestCacheConfig.test_get_preload_collection_valid
(self, connect, collection)
target: get preload_collection method: call get_config correctly expected: status ok
target: get preload_collection method: call get_config correctly expected: status ok
def test_get_preload_collection_valid(self, connect, collection): ''' target: get preload_collection method: call get_config correctly expected: status ok ''' status, config_value = connect.get_config("cache", "preload_collection") assert status.OK()
[ "def", "test_get_preload_collection_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "status", ",", "config_value", "=", "connect", ".", "get_config", "(", "\"cache\"", ",", "\"preload_collection\"", ")", "assert", "status", ".", "OK", "(", ")" ...
[ 131, 4 ]
[ 138, 26 ]
python
en
['en', 'error', 'th']
False
TestCacheConfig.test_set_cache_size_invalid_parent_key
(self, connect, collection)
target: set invalid parent key method: call set_config without parent_key: cache expected: status not ok
target: set invalid parent key method: call set_config without parent_key: cache expected: status not ok
def test_set_cache_size_invalid_parent_key(self, connect, collection): ''' target: set invalid parent key method: call set_config without parent_key: cache expected: status not ok ''' self.reset_configs(connect) invalid_configs = gen_invalid_cache_config() ...
[ "def", "test_set_cache_size_invalid_parent_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "self", ".", "reset_configs", "(", "connect", ")", "invalid_configs", "=", "gen_invalid_cache_config", "(", ")", "invalid_configs", ".", "extend", "(", "[", ...
[ 162, 4 ]
[ 173, 34 ]
python
en
['en', 'error', 'th']
False
TestCacheConfig.test_set_cache_invalid_child_key
(self, connect, collection)
target: set invalid child key method: call set_config with invalid child_key expected: status not ok
target: set invalid child key method: call set_config with invalid child_key expected: status not ok
def test_set_cache_invalid_child_key(self, connect, collection): ''' target: set invalid child key method: call set_config with invalid child_key expected: status not ok ''' self.reset_configs(connect) invalid_configs = gen_invalid_cache_config() for confi...
[ "def", "test_set_cache_invalid_child_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "self", ".", "reset_configs", "(", "connect", ")", "invalid_configs", "=", "gen_invalid_cache_config", "(", ")", "for", "config", "in", "invalid_configs", ":", "st...
[ 176, 4 ]
[ 186, 34 ]
python
en
['en', 'error', 'th']
False
TestCacheConfig.test_set_cache_size_valid
(self, connect, collection)
target: set cache_size method: call set_config correctly expected: status ok, set successfully
target: set cache_size method: call set_config correctly expected: status ok, set successfully
def test_set_cache_size_valid(self, connect, collection): ''' target: set cache_size method: call set_config correctly expected: status ok, set successfully ''' self.reset_configs(connect) status, reply = connect.set_config("cache", "cache_size", '8GB') as...
[ "def", "test_set_cache_size_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "self", ".", "reset_configs", "(", "connect", ")", "status", ",", "reply", "=", "connect", ".", "set_config", "(", "\"cache\"", ",", "\"cache_size\"", ",", "'8GB'", ...
[ 189, 4 ]
[ 200, 36 ]
python
en
['en', 'error', 'th']
False
TestCacheConfig.test_set_cache_size_valid_multiple_times
(self, connect, collection)
target: set cache_size method: call set_config correctly and repeatedly expected: status ok
target: set cache_size method: call set_config correctly and repeatedly expected: status ok
def test_set_cache_size_valid_multiple_times(self, connect, collection): ''' target: set cache_size method: call set_config correctly and repeatedly expected: status ok ''' self.reset_configs(connect) for i in range(20): status, reply = connect.set_con...
[ "def", "test_set_cache_size_valid_multiple_times", "(", "self", ",", "connect", ",", "collection", ")", ":", "self", ".", "reset_configs", "(", "connect", ")", "for", "i", "in", "range", "(", "20", ")", ":", "status", ",", "reply", "=", "connect", ".", "se...
[ 203, 4 ]
[ 221, 40 ]
python
en
['en', 'error', 'th']
False
TestCacheConfig.test_set_insert_buffer_size_invalid_parent_key
(self, connect, collection)
target: set invalid parent key method: call set_config without parent_key: cache expected: status not ok
target: set invalid parent key method: call set_config without parent_key: cache expected: status not ok
def test_set_insert_buffer_size_invalid_parent_key(self, connect, collection): ''' target: set invalid parent key method: call set_config without parent_key: cache expected: status not ok ''' self.reset_configs(connect) invalid_configs = gen_invalid_cache_config()...
[ "def", "test_set_insert_buffer_size_invalid_parent_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "self", ".", "reset_configs", "(", "connect", ")", "invalid_configs", "=", "gen_invalid_cache_config", "(", ")", "invalid_configs", ".", "extend", "(", ...
[ 224, 4 ]
[ 235, 34 ]
python
en
['en', 'error', 'th']
False
TestCacheConfig.test_set_insert_buffer_size_valid
(self, connect, collection)
target: set insert_buffer_size method: call get_config correctly expected: status ok, set successfully
target: set insert_buffer_size method: call get_config correctly expected: status ok, set successfully
def test_set_insert_buffer_size_valid(self, connect, collection): ''' target: set insert_buffer_size method: call get_config correctly expected: status ok, set successfully ''' self.reset_configs(connect) status, reply = connect.set_config("cache", "insert_buffer_...
[ "def", "test_set_insert_buffer_size_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "self", ".", "reset_configs", "(", "connect", ")", "status", ",", "reply", "=", "connect", ".", "set_config", "(", "\"cache\"", ",", "\"insert_buffer_size\"", "...
[ 238, 4 ]
[ 249, 36 ]
python
en
['en', 'error', 'th']
False
TestCacheConfig.test_set_insert_buffer_size_valid_multiple_times
(self, connect, collection)
target: set insert_buffer_size method: call get_config correctly and repeatedly expected: status ok
target: set insert_buffer_size method: call get_config correctly and repeatedly expected: status ok
def test_set_insert_buffer_size_valid_multiple_times(self, connect, collection): ''' target: set insert_buffer_size method: call get_config correctly and repeatedly expected: status ok ''' self.reset_configs(connect) for i in range(20): status, reply =...
[ "def", "test_set_insert_buffer_size_valid_multiple_times", "(", "self", ",", "connect", ",", "collection", ")", ":", "self", ".", "reset_configs", "(", "connect", ")", "for", "i", "in", "range", "(", "20", ")", ":", "status", ",", "reply", "=", "connect", "....
[ 252, 4 ]
[ 270, 40 ]
python
en
['en', 'error', 'th']
False
TestCacheConfig.test_set_cache_out_of_memory_value_A
(self, connect, collection)
target: set cache_size / insert_buffer_size to be out-of-memory method: call set_config with child values bigger than current system memory expected: status not ok (cache_size + insert_buffer_size < system memory)
target: set cache_size / insert_buffer_size to be out-of-memory method: call set_config with child values bigger than current system memory expected: status not ok (cache_size + insert_buffer_size < system memory)
def test_set_cache_out_of_memory_value_A(self, connect, collection): ''' target: set cache_size / insert_buffer_size to be out-of-memory method: call set_config with child values bigger than current system memory expected: status not ok (cache_size + insert_buffer_size < system memory) ...
[ "def", "test_set_cache_out_of_memory_value_A", "(", "self", ",", "connect", ",", "collection", ")", ":", "self", ".", "reset_configs", "(", "connect", ")", "mem_total", "=", "self", ".", "get_memory_total", "(", "connect", ")", "logging", ".", "getLogger", "(", ...
[ 273, 4 ]
[ 285, 30 ]
python
en
['en', 'error', 'th']
False
TestCacheConfig.test_set_preload_collection_valid
(self, connect, collection)
target: set preload_collection method: call set_config correctly expected: status ok, set successfully
target: set preload_collection method: call set_config correctly expected: status ok, set successfully
def test_set_preload_collection_valid(self, connect, collection): ''' target: set preload_collection method: call set_config correctly expected: status ok, set successfully ''' status, reply = connect.set_config("cache", "preload_collection", "") assert status.OK(...
[ "def", "test_set_preload_collection_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "status", ",", "reply", "=", "connect", ".", "set_config", "(", "\"cache\"", ",", "\"preload_collection\"", ",", "\"\"", ")", "assert", "status", ".", "OK", "...
[ 287, 4 ]
[ 297, 33 ]
python
en
['en', 'error', 'th']
False
TestGPUConfig.test_get_gpu_search_threshold_invalid_parent_key
(self, connect, collection)
target: get invalid parent key method: call get_config without parent_key: gpu expected: status not ok
target: get invalid parent key method: call get_config without parent_key: gpu expected: status not ok
def test_get_gpu_search_threshold_invalid_parent_key(self, connect, collection): ''' target: get invalid parent key method: call get_config without parent_key: gpu expected: status not ok ''' if str(connect._cmd("mode")[1]) == "CPU": pytest.skip("Only support ...
[ "def", "test_get_gpu_search_threshold_invalid_parent_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "if", "str", "(", "connect", ".", "_cmd", "(", "\"mode\"", ")", "[", "1", "]", ")", "==", "\"CPU\"", ":", "pytest", ".", "skip", "(", "\"On...
[ 312, 4 ]
[ 323, 34 ]
python
en
['en', 'error', 'th']
False
TestGPUConfig.test_get_gpu_search_threshold_invalid_child_key
(self, connect, collection)
target: get invalid child key method: call get_config without child_key: gpu_search_threshold expected: status not ok
target: get invalid child key method: call get_config without child_key: gpu_search_threshold expected: status not ok
def test_get_gpu_search_threshold_invalid_child_key(self, connect, collection): ''' target: get invalid child key method: call get_config without child_key: gpu_search_threshold expected: status not ok ''' if str(connect._cmd("mode")[1]) == "CPU": pytest.skip(...
[ "def", "test_get_gpu_search_threshold_invalid_child_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "if", "str", "(", "connect", ".", "_cmd", "(", "\"mode\"", ")", "[", "1", "]", ")", "==", "\"CPU\"", ":", "pytest", ".", "skip", "(", "\"Onl...
[ 326, 4 ]
[ 337, 34 ]
python
en
['en', 'error', 'th']
False
TestGPUConfig.test_get_gpu_search_threshold_valid
(self, connect, collection)
target: get gpu_search_threshold method: call get_config correctly expected: status ok
target: get gpu_search_threshold method: call get_config correctly expected: status ok
def test_get_gpu_search_threshold_valid(self, connect, collection): ''' target: get gpu_search_threshold method: call get_config correctly expected: status ok ''' if str(connect._cmd("mode")[1]) == "CPU": pytest.skip("Only support GPU mode") status, co...
[ "def", "test_get_gpu_search_threshold_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "if", "str", "(", "connect", ".", "_cmd", "(", "\"mode\"", ")", "[", "1", "]", ")", "==", "\"CPU\"", ":", "pytest", ".", "skip", "(", "\"Only support GP...
[ 340, 4 ]
[ 349, 26 ]
python
en
['en', 'error', 'th']
False
TestGPUConfig.test_set_gpu_invalid_child_key
(self, connect, collection)
target: set invalid child key method: call set_config with invalid child_key expected: status not ok
target: set invalid child key method: call set_config with invalid child_key expected: status not ok
def test_set_gpu_invalid_child_key(self, connect, collection): ''' target: set invalid child key method: call set_config with invalid child_key expected: status not ok ''' invalid_configs = gen_invalid_gpu_config() for config in invalid_configs: status...
[ "def", "test_set_gpu_invalid_child_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "invalid_configs", "=", "gen_invalid_gpu_config", "(", ")", "for", "config", "in", "invalid_configs", ":", "status", ",", "reply", "=", "connect", ".", "set_config",...
[ 357, 4 ]
[ 366, 34 ]
python
en
['en', 'error', 'th']
False
TestGPUConfig.test_set_gpu_search_threshold_invalid_parent_key
(self, connect, collection)
target: set invalid parent key method: call set_config without parent_key: gpu expected: status not ok
target: set invalid parent key method: call set_config without parent_key: gpu expected: status not ok
def test_set_gpu_search_threshold_invalid_parent_key(self, connect, collection): ''' target: set invalid parent key method: call set_config without parent_key: gpu expected: status not ok ''' if str(connect._cmd("mode")[1]) == "CPU": pytest.skip("Only support ...
[ "def", "test_set_gpu_search_threshold_invalid_parent_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "if", "str", "(", "connect", ".", "_cmd", "(", "\"mode\"", ")", "[", "1", "]", ")", "==", "\"CPU\"", ":", "pytest", ".", "skip", "(", "\"On...
[ 369, 4 ]
[ 381, 34 ]
python
en
['en', 'error', 'th']
False
TestGPUConfig.test_set_gpu_search_threshold_valid
(self, connect, collection)
target: set gpu_search_threshold method: call set_config correctly expected: status ok
target: set gpu_search_threshold method: call set_config correctly expected: status ok
def test_set_gpu_search_threshold_valid(self, connect, collection): ''' target: set gpu_search_threshold method: call set_config correctly expected: status ok ''' if str(connect._cmd("mode")[1]) == "CPU": pytest.skip("Only support GPU mode") status, re...
[ "def", "test_set_gpu_search_threshold_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "if", "str", "(", "connect", ".", "_cmd", "(", "\"mode\"", ")", "[", "1", "]", ")", "==", "\"CPU\"", ":", "pytest", ".", "skip", "(", "\"Only support GP...
[ 384, 4 ]
[ 396, 37 ]
python
en
['en', 'error', 'th']
False
TestGPUConfig.test_set_gpu_invalid_values
(self, connect, collection)
target: set gpu method: call set_config with invalid child values expected: status not ok
target: set gpu method: call set_config with invalid child values expected: status not ok
def test_set_gpu_invalid_values(self, connect, collection): ''' target: set gpu method: call set_config with invalid child values expected: status not ok ''' for i in [-1, "1000\n", "1000\t", "1000.0", 1000.35]: status, reply = connect.set_config("gpu", "use_b...
[ "def", "test_set_gpu_invalid_values", "(", "self", ",", "connect", ",", "collection", ")", ":", "for", "i", "in", "[", "-", "1", ",", "\"1000\\n\"", ",", "\"1000\\t\"", ",", "\"1000.0\"", ",", "1000.35", "]", ":", "status", ",", "reply", "=", "connect", ...
[ 399, 4 ]
[ 410, 38 ]
python
en
['en', 'error', 'th']
False
TestGPUConfig.reset_configs
(self, connect)
reset configs so the tests are stable
reset configs so the tests are stable
def reset_configs(self, connect): ''' reset configs so the tests are stable ''' status, reply = connect.set_config("gpu", "enable", "true") assert status.OK() status, config_value = connect.get_config("gpu", "enable") assert config_value == "true" status, ...
[ "def", "reset_configs", "(", "self", ",", "connect", ")", ":", "status", ",", "reply", "=", "connect", ".", "set_config", "(", "\"gpu\"", ",", "\"enable\"", ",", "\"true\"", ")", "assert", "status", ".", "OK", "(", ")", "status", ",", "config_value", "="...
[ 413, 4 ]
[ 432, 37 ]
python
en
['en', 'error', 'th']
False
TestGPUConfig.test_get_gpu_enable_invalid_parent_key
(self, connect, collection)
target: get invalid parent key method: call get_config without parent_key: gpu expected: status not ok
target: get invalid parent key method: call get_config without parent_key: gpu expected: status not ok
def test_get_gpu_enable_invalid_parent_key(self, connect, collection): ''' target: get invalid parent key method: call get_config without parent_key: gpu expected: status not ok ''' if str(connect._cmd("mode")[1]) == "CPU": pytest.skip("Only support GPU mode")...
[ "def", "test_get_gpu_enable_invalid_parent_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "if", "str", "(", "connect", ".", "_cmd", "(", "\"mode\"", ")", "[", "1", "]", ")", "==", "\"CPU\"", ":", "pytest", ".", "skip", "(", "\"Only support...
[ 435, 4 ]
[ 447, 34 ]
python
en
['en', 'error', 'th']
False
TestGPUConfig.test_get_gpu_enable_invalid_child_key
(self, connect, collection)
target: get invalid child key method: call get_config without child_key: enable expected: status not ok
target: get invalid child key method: call get_config without child_key: enable expected: status not ok
def test_get_gpu_enable_invalid_child_key(self, connect, collection): ''' target: get invalid child key method: call get_config without child_key: enable expected: status not ok ''' if str(connect._cmd("mode")[1]) == "CPU": pytest.skip("Only support GPU mode")...
[ "def", "test_get_gpu_enable_invalid_child_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "if", "str", "(", "connect", ".", "_cmd", "(", "\"mode\"", ")", "[", "1", "]", ")", "==", "\"CPU\"", ":", "pytest", ".", "skip", "(", "\"Only support ...
[ 450, 4 ]
[ 461, 34 ]
python
en
['en', 'error', 'th']
False
TestGPUConfig.test_get_gpu_enable_valid
(self, connect, collection)
target: get enable status method: call get_config correctly expected: status ok
target: get enable status method: call get_config correctly expected: status ok
def test_get_gpu_enable_valid(self, connect, collection): ''' target: get enable status method: call get_config correctly expected: status ok ''' if str(connect._cmd("mode")[1]) == "CPU": pytest.skip("Only support GPU mode") status, config_value = conn...
[ "def", "test_get_gpu_enable_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "if", "str", "(", "connect", ".", "_cmd", "(", "\"mode\"", ")", "[", "1", "]", ")", "==", "\"CPU\"", ":", "pytest", ".", "skip", "(", "\"Only support GPU mode\"",...
[ 464, 4 ]
[ 474, 64 ]
python
en
['en', 'error', 'th']
False
TestGPUConfig.test_get_cache_size_invalid_parent_key
(self, connect, collection)
target: get invalid parent key method: call get_config without parent_key: gpu expected: status not ok
target: get invalid parent key method: call get_config without parent_key: gpu expected: status not ok
def test_get_cache_size_invalid_parent_key(self, connect, collection): ''' target: get invalid parent key method: call get_config without parent_key: gpu expected: status not ok ''' if str(connect._cmd("mode")[1]) == "CPU": pytest.skip("Only support GPU mode")...
[ "def", "test_get_cache_size_invalid_parent_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "if", "str", "(", "connect", ".", "_cmd", "(", "\"mode\"", ")", "[", "1", "]", ")", "==", "\"CPU\"", ":", "pytest", ".", "skip", "(", "\"Only support...
[ 477, 4 ]
[ 489, 34 ]
python
en
['en', 'error', 'th']
False
TestGPUConfig.test_get_cache_size_invalid_child_key
(self, connect, collection)
target: get invalid child key method: call get_config without child_key: cache_size expected: status not ok
target: get invalid child key method: call get_config without child_key: cache_size expected: status not ok
def test_get_cache_size_invalid_child_key(self, connect, collection): ''' target: get invalid child key method: call get_config without child_key: cache_size expected: status not ok ''' if str(connect._cmd("mode")[1]) == "CPU": pytest.skip("Only support GPU mo...
[ "def", "test_get_cache_size_invalid_child_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "if", "str", "(", "connect", ".", "_cmd", "(", "\"mode\"", ")", "[", "1", "]", ")", "==", "\"CPU\"", ":", "pytest", ".", "skip", "(", "\"Only support ...
[ 492, 4 ]
[ 503, 34 ]
python
en
['en', 'error', 'th']
False
TestGPUConfig.test_get_cache_size_valid
(self, connect, collection)
target: get cache_size method: call get_config correctly expected: status ok
target: get cache_size method: call get_config correctly expected: status ok
def test_get_cache_size_valid(self, connect, collection): ''' target: get cache_size method: call get_config correctly expected: status ok ''' if str(connect._cmd("mode")[1]) == "CPU": pytest.skip("Only support GPU mode") status, config_value = connect...
[ "def", "test_get_cache_size_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "if", "str", "(", "connect", ".", "_cmd", "(", "\"mode\"", ")", "[", "1", "]", ")", "==", "\"CPU\"", ":", "pytest", ".", "skip", "(", "\"Only support GPU mode\"",...
[ 506, 4 ]
[ 515, 26 ]
python
en
['en', 'error', 'th']
False
TestGPUConfig.test_get_search_devices_invalid_parent_key
(self, connect, collection)
target: get invalid parent key method: call get_config without parent_key: gpu expected: status not ok
target: get invalid parent key method: call get_config without parent_key: gpu expected: status not ok
def test_get_search_devices_invalid_parent_key(self, connect, collection): ''' target: get invalid parent key method: call get_config without parent_key: gpu expected: status not ok ''' if str(connect._cmd("mode")[1]) == "CPU": pytest.skip("Only support GPU mo...
[ "def", "test_get_search_devices_invalid_parent_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "if", "str", "(", "connect", ".", "_cmd", "(", "\"mode\"", ")", "[", "1", "]", ")", "==", "\"CPU\"", ":", "pytest", ".", "skip", "(", "\"Only sup...
[ 518, 4 ]
[ 530, 34 ]
python
en
['en', 'error', 'th']
False
TestGPUConfig.test_get_search_devices_invalid_child_key
(self, connect, collection)
target: get invalid child key method: call get_config without child_key: search_devices expected: status not ok
target: get invalid child key method: call get_config without child_key: search_devices expected: status not ok
def test_get_search_devices_invalid_child_key(self, connect, collection): ''' target: get invalid child key method: call get_config without child_key: search_devices expected: status not ok ''' if str(connect._cmd("mode")[1]) == "CPU": pytest.skip("Only suppor...
[ "def", "test_get_search_devices_invalid_child_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "if", "str", "(", "connect", ".", "_cmd", "(", "\"mode\"", ")", "[", "1", "]", ")", "==", "\"CPU\"", ":", "pytest", ".", "skip", "(", "\"Only supp...
[ 533, 4 ]
[ 544, 34 ]
python
en
['en', 'error', 'th']
False
TestGPUConfig.test_get_search_devices_valid
(self, connect, collection)
target: get search_devices method: call get_config correctly expected: status ok
target: get search_devices method: call get_config correctly expected: status ok
def test_get_search_devices_valid(self, connect, collection): ''' target: get search_devices method: call get_config correctly expected: status ok ''' if str(connect._cmd("mode")[1]) == "CPU": pytest.skip("Only support GPU mode") status, config_value =...
[ "def", "test_get_search_devices_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "if", "str", "(", "connect", ".", "_cmd", "(", "\"mode\"", ")", "[", "1", "]", ")", "==", "\"CPU\"", ":", "pytest", ".", "skip", "(", "\"Only support GPU mode...
[ 547, 4 ]
[ 557, 26 ]
python
en
['en', 'error', 'th']
False
TestGPUConfig.test_get_build_index_devices_invalid_parent_key
(self, connect, collection)
target: get invalid parent key method: call get_config without parent_key: gpu expected: status not ok
target: get invalid parent key method: call get_config without parent_key: gpu expected: status not ok
def test_get_build_index_devices_invalid_parent_key(self, connect, collection): ''' target: get invalid parent key method: call get_config without parent_key: gpu expected: status not ok ''' if str(connect._cmd("mode")[1]) == "CPU": pytest.skip("Only support G...
[ "def", "test_get_build_index_devices_invalid_parent_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "if", "str", "(", "connect", ".", "_cmd", "(", "\"mode\"", ")", "[", "1", "]", ")", "==", "\"CPU\"", ":", "pytest", ".", "skip", "(", "\"Onl...
[ 560, 4 ]
[ 572, 34 ]
python
en
['en', 'error', 'th']
False
TestGPUConfig.test_get_build_index_devices_invalid_child_key
(self, connect, collection)
target: get invalid child key method: call get_config without child_key: build_index_devices expected: status not ok
target: get invalid child key method: call get_config without child_key: build_index_devices expected: status not ok
def test_get_build_index_devices_invalid_child_key(self, connect, collection): ''' target: get invalid child key method: call get_config without child_key: build_index_devices expected: status not ok ''' if str(connect._cmd("mode")[1]) == "CPU": pytest.skip("O...
[ "def", "test_get_build_index_devices_invalid_child_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "if", "str", "(", "connect", ".", "_cmd", "(", "\"mode\"", ")", "[", "1", "]", ")", "==", "\"CPU\"", ":", "pytest", ".", "skip", "(", "\"Only...
[ 575, 4 ]
[ 586, 34 ]
python
en
['en', 'error', 'th']
False
TestGPUConfig.test_get_build_index_devices_valid
(self, connect, collection)
target: get build_index_devices method: call get_config correctly expected: status ok
target: get build_index_devices method: call get_config correctly expected: status ok
def test_get_build_index_devices_valid(self, connect, collection): ''' target: get build_index_devices method: call get_config correctly expected: status ok ''' if str(connect._cmd("mode")[1]) == "CPU": pytest.skip("Only support GPU mode") status, conf...
[ "def", "test_get_build_index_devices_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "if", "str", "(", "connect", ".", "_cmd", "(", "\"mode\"", ")", "[", "1", "]", ")", "==", "\"CPU\"", ":", "pytest", ".", "skip", "(", "\"Only support GPU...
[ 589, 4 ]
[ 599, 26 ]
python
en
['en', 'error', 'th']
False
TestGPUConfig.test_set_gpu_enable_invalid_parent_key
(self, connect, collection)
target: set invalid parent key method: call set_config without parent_key: gpu expected: status not ok
target: set invalid parent key method: call set_config without parent_key: gpu expected: status not ok
def test_set_gpu_enable_invalid_parent_key(self, connect, collection): ''' target: set invalid parent key method: call set_config without parent_key: gpu expected: status not ok ''' if str(connect._cmd("mode")[1]) == "CPU": pytest.skip("Only support GPU mode")...
[ "def", "test_set_gpu_enable_invalid_parent_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "if", "str", "(", "connect", ".", "_cmd", "(", "\"mode\"", ")", "[", "1", "]", ")", "==", "\"CPU\"", ":", "pytest", ".", "skip", "(", "\"Only support...
[ 608, 4 ]
[ 620, 34 ]
python
en
['en', 'error', 'th']
False
TestGPUConfig.test_set_gpu_invalid_child_key
(self, connect, collection)
target: set invalid child key method: call set_config with invalid child_key expected: status not ok
target: set invalid child key method: call set_config with invalid child_key expected: status not ok
def test_set_gpu_invalid_child_key(self, connect, collection): ''' target: set invalid child key method: call set_config with invalid child_key expected: status not ok ''' if str(connect._cmd("mode")[1]) == "CPU": pytest.skip("Only support GPU mode") i...
[ "def", "test_set_gpu_invalid_child_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "if", "str", "(", "connect", ".", "_cmd", "(", "\"mode\"", ")", "[", "1", "]", ")", "==", "\"CPU\"", ":", "pytest", ".", "skip", "(", "\"Only support GPU mod...
[ 623, 4 ]
[ 635, 34 ]
python
en
['en', 'error', 'th']
False
TestGPUConfig.test_set_gpu_enable_invalid_values
(self, connect, collection)
target: set "enable" param method: call set_config with invalid child values expected: status not ok
target: set "enable" param method: call set_config with invalid child values expected: status not ok
def test_set_gpu_enable_invalid_values(self, connect, collection): ''' target: set "enable" param method: call set_config with invalid child values expected: status not ok ''' if str(connect._cmd("mode")[1]) == "CPU": pytest.skip("Only support GPU mode") ...
[ "def", "test_set_gpu_enable_invalid_values", "(", "self", ",", "connect", ",", "collection", ")", ":", "if", "str", "(", "connect", ".", "_cmd", "(", "\"mode\"", ")", "[", "1", "]", ")", "==", "\"CPU\"", ":", "pytest", ".", "skip", "(", "\"Only support GPU...
[ 638, 4 ]
[ 648, 34 ]
python
en
['en', 'error', 'th']
False
TestGPUConfig.test_set_gpu_enable_valid
(self, connect, collection)
target: set "enable" param method: call set_config correctly expected: status ok
target: set "enable" param method: call set_config correctly expected: status ok
def test_set_gpu_enable_valid(self, connect, collection): ''' target: set "enable" param method: call set_config correctly expected: status ok ''' if str(connect._cmd("mode")[1]) == "CPU": pytest.skip("Only support GPU mode") valid_configs = ["off", "F...
[ "def", "test_set_gpu_enable_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "if", "str", "(", "connect", ".", "_cmd", "(", "\"mode\"", ")", "[", "1", "]", ")", "==", "\"CPU\"", ":", "pytest", ".", "skip", "(", "\"Only support GPU mode\"",...
[ 651, 4 ]
[ 665, 46 ]
python
en
['en', 'error', 'th']
False
TestGPUConfig.test_set_cache_size_invalid_parent_key
(self, connect, collection)
target: set invalid parent key method: call set_config without parent_key: gpu expected: status not ok
target: set invalid parent key method: call set_config without parent_key: gpu expected: status not ok
def test_set_cache_size_invalid_parent_key(self, connect, collection): ''' target: set invalid parent key method: call set_config without parent_key: gpu expected: status not ok ''' if str(connect._cmd("mode")[1]) == "CPU": pytest.skip("Only support GPU mode")...
[ "def", "test_set_cache_size_invalid_parent_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "if", "str", "(", "connect", ".", "_cmd", "(", "\"mode\"", ")", "[", "1", "]", ")", "==", "\"CPU\"", ":", "pytest", ".", "skip", "(", "\"Only support...
[ 668, 4 ]
[ 680, 34 ]
python
en
['en', 'error', 'th']
False
TestGPUConfig.test_set_cache_size_valid
(self, connect, collection)
target: set cache_size method: call set_config correctly expected: status ok
target: set cache_size method: call set_config correctly expected: status ok
def test_set_cache_size_valid(self, connect, collection): ''' target: set cache_size method: call set_config correctly expected: status ok ''' if str(connect._cmd("mode")[1]) == "CPU": pytest.skip("Only support GPU mode") status, reply = connect.set_co...
[ "def", "test_set_cache_size_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "if", "str", "(", "connect", ".", "_cmd", "(", "\"mode\"", ")", "[", "1", "]", ")", "==", "\"CPU\"", ":", "pytest", ".", "skip", "(", "\"Only support GPU mode\"",...
[ 683, 4 ]
[ 692, 26 ]
python
en
['en', 'error', 'th']
False
TestGPUConfig.test_set_cache_size_invalid_values
(self, connect, collection)
target: set cache_size method: call set_config with invalid child values expected: status not ok
target: set cache_size method: call set_config with invalid child values expected: status not ok
def test_set_cache_size_invalid_values(self, connect, collection): ''' target: set cache_size method: call set_config with invalid child values expected: status not ok ''' if str(connect._cmd("mode")[1]) == "CPU": pytest.skip("Only support GPU mode") s...
[ "def", "test_set_cache_size_invalid_values", "(", "self", ",", "connect", ",", "collection", ")", ":", "if", "str", "(", "connect", ".", "_cmd", "(", "\"mode\"", ")", "[", "1", "]", ")", "==", "\"CPU\"", ":", "pytest", ".", "skip", "(", "\"Only support GPU...
[ 695, 4 ]
[ 707, 34 ]
python
en
['en', 'error', 'th']
False
TestGPUConfig.test_set_search_devices_invalid_parent_key
(self, connect, collection)
target: set invalid parent key method: call set_config without parent_key: gpu expected: status not ok
target: set invalid parent key method: call set_config without parent_key: gpu expected: status not ok
def test_set_search_devices_invalid_parent_key(self, connect, collection): ''' target: set invalid parent key method: call set_config without parent_key: gpu expected: status not ok ''' if str(connect._cmd("mode")[1]) == "CPU": pytest.skip("Only support GPU mo...
[ "def", "test_set_search_devices_invalid_parent_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "if", "str", "(", "connect", ".", "_cmd", "(", "\"mode\"", ")", "[", "1", "]", ")", "==", "\"CPU\"", ":", "pytest", ".", "skip", "(", "\"Only sup...
[ 710, 4 ]
[ 722, 34 ]
python
en
['en', 'error', 'th']
False
TestGPUConfig.test_set_search_devices_valid
(self, connect, collection)
target: set search_devices method: call set_config correctly expected: status ok
target: set search_devices method: call set_config correctly expected: status ok
def test_set_search_devices_valid(self, connect, collection): ''' target: set search_devices method: call set_config correctly expected: status ok ''' if str(connect._cmd("mode")[1]) == "CPU": pytest.skip("Only support GPU mode") status, reply = connec...
[ "def", "test_set_search_devices_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "if", "str", "(", "connect", ".", "_cmd", "(", "\"mode\"", ")", "[", "1", "]", ")", "==", "\"CPU\"", ":", "pytest", ".", "skip", "(", "\"Only support GPU mode...
[ 725, 4 ]
[ 736, 37 ]
python
en
['en', 'error', 'th']
False
TestGPUConfig.test_set_search_devices_invalid_values
(self, connect, collection)
target: set search_devices method: call set_config with invalid child values expected: status not ok
target: set search_devices method: call set_config with invalid child values expected: status not ok
def test_set_search_devices_invalid_values(self, connect, collection): ''' target: set search_devices method: call set_config with invalid child values expected: status not ok ''' if str(connect._cmd("mode")[1]) == "CPU": pytest.skip("Only support GPU mode") ...
[ "def", "test_set_search_devices_invalid_values", "(", "self", ",", "connect", ",", "collection", ")", ":", "if", "str", "(", "connect", ".", "_cmd", "(", "\"mode\"", ")", "[", "1", "]", ")", "==", "\"CPU\"", ":", "pytest", ".", "skip", "(", "\"Only support...
[ 739, 4 ]
[ 749, 34 ]
python
en
['en', 'error', 'th']
False
TestGPUConfig.test_set_build_index_devices_invalid_parent_key
(self, connect, collection)
target: set invalid parent key method: call set_config without parent_key: gpu expected: status not ok
target: set invalid parent key method: call set_config without parent_key: gpu expected: status not ok
def test_set_build_index_devices_invalid_parent_key(self, connect, collection): ''' target: set invalid parent key method: call set_config without parent_key: gpu expected: status not ok ''' if str(connect._cmd("mode")[1]) == "CPU": pytest.skip("Only support G...
[ "def", "test_set_build_index_devices_invalid_parent_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "if", "str", "(", "connect", ".", "_cmd", "(", "\"mode\"", ")", "[", "1", "]", ")", "==", "\"CPU\"", ":", "pytest", ".", "skip", "(", "\"Onl...
[ 752, 4 ]
[ 764, 34 ]
python
en
['en', 'error', 'th']
False
TestGPUConfig.test_set_build_index_devices_valid
(self, connect, collection)
target: set build_index_devices method: call set_config correctly expected: status ok
target: set build_index_devices method: call set_config correctly expected: status ok
def test_set_build_index_devices_valid(self, connect, collection): ''' target: set build_index_devices method: call set_config correctly expected: status ok ''' if str(connect._cmd("mode")[1]) == "CPU": pytest.skip("Only support GPU mode") status, repl...
[ "def", "test_set_build_index_devices_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "if", "str", "(", "connect", ".", "_cmd", "(", "\"mode\"", ")", "[", "1", "]", ")", "==", "\"CPU\"", ":", "pytest", ".", "skip", "(", "\"Only support GPU...
[ 767, 4 ]
[ 778, 37 ]
python
en
['en', 'error', 'th']
False
TestGPUConfig.test_set_build_index_devices_invalid_values
(self, connect, collection)
target: set build_index_devices method: call set_config with invalid child values expected: status not ok
target: set build_index_devices method: call set_config with invalid child values expected: status not ok
def test_set_build_index_devices_invalid_values(self, connect, collection): ''' target: set build_index_devices method: call set_config with invalid child values expected: status not ok ''' if str(connect._cmd("mode")[1]) == "CPU": pytest.skip("Only support GP...
[ "def", "test_set_build_index_devices_invalid_values", "(", "self", ",", "connect", ",", "collection", ")", ":", "if", "str", "(", "connect", ".", "_cmd", "(", "\"mode\"", ")", "[", "1", "]", ")", "==", "\"CPU\"", ":", "pytest", ".", "skip", "(", "\"Only su...
[ 781, 4 ]
[ 792, 35 ]
python
en
['en', 'error', 'th']
False
TestNetworkConfig.test_get_address_invalid_child_key
(self, connect, collection)
target: get invalid child key method: call get_config without child_key: address expected: status not ok
target: get invalid child key method: call get_config without child_key: address expected: status not ok
def test_get_address_invalid_child_key(self, connect, collection): ''' target: get invalid child key method: call get_config without child_key: address expected: status not ok ''' invalid_configs = ["Address", "addresses", "address "] for config in invalid_configs...
[ "def", "test_get_address_invalid_child_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "invalid_configs", "=", "[", "\"Address\"", ",", "\"addresses\"", ",", "\"address \"", "]", "for", "config", "in", "invalid_configs", ":", "status", ",", "config...
[ 807, 4 ]
[ 816, 34 ]
python
en
['en', 'error', 'th']
False
TestNetworkConfig.test_get_address_valid
(self, connect, collection)
target: get address method: call get_config correctly expected: status ok
target: get address method: call get_config correctly expected: status ok
def test_get_address_valid(self, connect, collection): ''' target: get address method: call get_config correctly expected: status ok ''' status, config_value = connect.get_config("network", "bind.address") assert status.OK()
[ "def", "test_get_address_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "status", ",", "config_value", "=", "connect", ".", "get_config", "(", "\"network\"", ",", "\"bind.address\"", ")", "assert", "status", ".", "OK", "(", ")" ]
[ 819, 4 ]
[ 826, 26 ]
python
en
['en', 'error', 'th']
False
TestNetworkConfig.test_get_port_invalid_child_key
(self, connect, collection)
target: get invalid child key method: call get_config without child_key: port expected: status not ok
target: get invalid child key method: call get_config without child_key: port expected: status not ok
def test_get_port_invalid_child_key(self, connect, collection): ''' target: get invalid child key method: call get_config without child_key: port expected: status not ok ''' invalid_configs = ["Port", "PORT", "port "] for config in invalid_configs: sta...
[ "def", "test_get_port_invalid_child_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "invalid_configs", "=", "[", "\"Port\"", ",", "\"PORT\"", ",", "\"port \"", "]", "for", "config", "in", "invalid_configs", ":", "status", ",", "config_value", "="...
[ 829, 4 ]
[ 838, 34 ]
python
en
['en', 'error', 'th']
False
TestNetworkConfig.test_get_port_valid
(self, connect, collection)
target: get port method: call get_config correctly expected: status ok
target: get port method: call get_config correctly expected: status ok
def test_get_port_valid(self, connect, collection): ''' target: get port method: call get_config correctly expected: status ok ''' status, config_value = connect.get_config("network", "http.port") assert status.OK()
[ "def", "test_get_port_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "status", ",", "config_value", "=", "connect", ".", "get_config", "(", "\"network\"", ",", "\"http.port\"", ")", "assert", "status", ".", "OK", "(", ")" ]
[ 841, 4 ]
[ 848, 26 ]
python
en
['en', 'error', 'th']
False
TestNetworkConfig.test_get_http_port_invalid_child_key
(self, connect, collection)
target: get invalid child key method: call get_config without child_key: http.port expected: status not ok
target: get invalid child key method: call get_config without child_key: http.port expected: status not ok
def test_get_http_port_invalid_child_key(self, connect, collection): ''' target: get invalid child key method: call get_config without child_key: http.port expected: status not ok ''' invalid_configs = ["webport", "Web_port", "http.port "] for config in invalid_co...
[ "def", "test_get_http_port_invalid_child_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "invalid_configs", "=", "[", "\"webport\"", ",", "\"Web_port\"", ",", "\"http.port \"", "]", "for", "config", "in", "invalid_configs", ":", "status", ",", "con...
[ 851, 4 ]
[ 860, 34 ]
python
en
['en', 'error', 'th']
False
TestNetworkConfig.test_get_http_port_valid
(self, connect, collection)
target: get http.port method: call get_config correctly expected: status ok
target: get http.port method: call get_config correctly expected: status ok
def test_get_http_port_valid(self, connect, collection): ''' target: get http.port method: call get_config correctly expected: status ok ''' status, config_value = connect.get_config("network", "http.port") assert status.OK()
[ "def", "test_get_http_port_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "status", ",", "config_value", "=", "connect", ".", "get_config", "(", "\"network\"", ",", "\"http.port\"", ")", "assert", "status", ".", "OK", "(", ")" ]
[ 863, 4 ]
[ 870, 26 ]
python
en
['en', 'error', 'th']
False
TestNetworkConfig.test_set_network_invalid_child_key
(self, connect, collection)
target: set invalid child key method: call set_config with invalid child_key expected: status not ok
target: set invalid child key method: call set_config with invalid child_key expected: status not ok
def test_set_network_invalid_child_key(self, connect, collection): ''' target: set invalid child key method: call set_config with invalid child_key expected: status not ok ''' status, reply = connect.set_config("network", "child_key", 19530) assert not status.OK()
[ "def", "test_set_network_invalid_child_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "status", ",", "reply", "=", "connect", ".", "set_config", "(", "\"network\"", ",", "\"child_key\"", ",", "19530", ")", "assert", "not", "status", ".", "OK",...
[ 887, 4 ]
[ 894, 30 ]
python
en
['en', 'error', 'th']
False
TestNetworkConfig.test_set_address_valid
(self, connect, collection)
target: set address method: call set_config correctly expected: status ok, set successfully
target: set address method: call set_config correctly expected: status ok, set successfully
def test_set_address_valid(self, connect, collection): ''' target: set address method: call set_config correctly expected: status ok, set successfully ''' status, reply = connect.set_config("network", "bind.address", '0.0.0.0') assert status.OK() status, c...
[ "def", "test_set_address_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "status", ",", "reply", "=", "connect", ".", "set_config", "(", "\"network\"", ",", "\"bind.address\"", ",", "'0.0.0.0'", ")", "assert", "status", ".", "OK", "(", ")",...
[ 897, 4 ]
[ 907, 40 ]
python
en
['en', 'error', 'th']
False
TestNetworkConfig.test_set_port_valid
(self, connect, collection)
target: set port method: call set_config correctly expected: status ok, set successfully
target: set port method: call set_config correctly expected: status ok, set successfully
def test_set_port_valid(self, connect, collection): ''' target: set port method: call set_config correctly expected: status ok, set successfully ''' for valid_port in [1025, 65534, 12345, "19530"]: status, reply = connect.set_config("network", "http.port", val...
[ "def", "test_set_port_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "for", "valid_port", "in", "[", "1025", ",", "65534", ",", "12345", ",", "\"19530\"", "]", ":", "status", ",", "reply", "=", "connect", ".", "set_config", "(", "\"net...
[ 909, 4 ]
[ 920, 50 ]
python
en
['en', 'error', 'th']
False
TestNetworkConfig.test_set_port_invalid
(self, connect, collection)
target: set port method: call set_config with port number out of range(1024, 65535) expected: status not ok
target: set port method: call set_config with port number out of range(1024, 65535) expected: status not ok
def test_set_port_invalid(self, connect, collection): ''' target: set port method: call set_config with port number out of range(1024, 65535) expected: status not ok ''' for invalid_port in [1024, 65535, "0", "True", "19530 ", "100000"]: logging.getLogger().in...
[ "def", "test_set_port_invalid", "(", "self", ",", "connect", ",", "collection", ")", ":", "for", "invalid_port", "in", "[", "1024", ",", "65535", ",", "\"0\"", ",", "\"True\"", ",", "\"19530 \"", ",", "\"100000\"", "]", ":", "logging", ".", "getLogger", "(...
[ 922, 4 ]
[ 931, 34 ]
python
en
['en', 'error', 'th']
False
TestNetworkConfig.test_set_http_port_valid
(self, connect, collection)
target: set http.port method: call set_config correctly expected: status ok, set successfully
target: set http.port method: call set_config correctly expected: status ok, set successfully
def test_set_http_port_valid(self, connect, collection): ''' target: set http.port method: call set_config correctly expected: status ok, set successfully ''' for valid_http_port in [1025, 65534, "12345", 19121]: status, reply = connect.set_config("network", "...
[ "def", "test_set_http_port_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "for", "valid_http_port", "in", "[", "1025", ",", "65534", ",", "\"12345\"", ",", "19121", "]", ":", "status", ",", "reply", "=", "connect", ".", "set_config", "("...
[ 933, 4 ]
[ 944, 55 ]
python
en
['en', 'error', 'th']
False
TestNetworkConfig.test_set_http_port_invalid
(self, connect, collection)
target: set http.port method: call set_config with http.port number out of range(1024, 65535) expected: status not ok
target: set http.port method: call set_config with http.port number out of range(1024, 65535) expected: status not ok
def test_set_http_port_invalid(self, connect, collection): ''' target: set http.port method: call set_config with http.port number out of range(1024, 65535) expected: status not ok ''' for invalid_http_port in [1024, 65535, "0", "True", "19530 ", "1000000"]: s...
[ "def", "test_set_http_port_invalid", "(", "self", ",", "connect", ",", "collection", ")", ":", "for", "invalid_http_port", "in", "[", "1024", ",", "65535", ",", "\"0\"", ",", "\"True\"", ",", "\"19530 \"", ",", "\"1000000\"", "]", ":", "status", ",", "reply"...
[ 946, 4 ]
[ 954, 34 ]
python
en
['en', 'error', 'th']
False
TestGeneralConfig.test_get_meta_uri_invalid_child_key
(self, connect, collection)
target: get invalid child key method: call get_config without child_key: meta_uri expected: status not ok
target: get invalid child key method: call get_config without child_key: meta_uri expected: status not ok
def test_get_meta_uri_invalid_child_key(self, connect, collection): ''' target: get invalid child key method: call get_config without child_key: meta_uri expected: status not ok ''' invalid_configs = ["backend_Url", "backend-url", "meta_uri "] for config in invali...
[ "def", "test_get_meta_uri_invalid_child_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "invalid_configs", "=", "[", "\"backend_Url\"", ",", "\"backend-url\"", ",", "\"meta_uri \"", "]", "for", "config", "in", "invalid_configs", ":", "status", ",", ...
[ 969, 4 ]
[ 978, 34 ]
python
en
['en', 'error', 'th']
False
TestGeneralConfig.test_get_meta_uri_valid
(self, connect, collection)
target: get meta_uri method: call get_config correctly expected: status ok
target: get meta_uri method: call get_config correctly expected: status ok
def test_get_meta_uri_valid(self, connect, collection): ''' target: get meta_uri method: call get_config correctly expected: status ok ''' status, config_value = connect.get_config("general", "meta_uri") assert status.OK()
[ "def", "test_get_meta_uri_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "status", ",", "config_value", "=", "connect", ".", "get_config", "(", "\"general\"", ",", "\"meta_uri\"", ")", "assert", "status", ".", "OK", "(", ")" ]
[ 981, 4 ]
[ 988, 26 ]
python
en
['en', 'error', 'th']
False
TestGeneralConfig.test_get_timezone_invalid_child_key
(self, connect, collection)
target: get invalid child key method: call get_config without child_key: timezone expected: status not ok
target: get invalid child key method: call get_config without child_key: timezone expected: status not ok
def test_get_timezone_invalid_child_key(self, connect, collection): ''' target: get invalid child key method: call get_config without child_key: timezone expected: status not ok ''' invalid_configs = ["time", "timezone "] for config in invalid_configs: ...
[ "def", "test_get_timezone_invalid_child_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "invalid_configs", "=", "[", "\"time\"", ",", "\"timezone \"", "]", "for", "config", "in", "invalid_configs", ":", "status", ",", "config_value", "=", "connect"...
[ 991, 4 ]
[ 1000, 34 ]
python
en
['en', 'error', 'th']
False
TestGeneralConfig.test_get_timezone_valid
(self, connect, collection)
target: get timezone method: call get_config correctly expected: status ok
target: get timezone method: call get_config correctly expected: status ok
def test_get_timezone_valid(self, connect, collection): ''' target: get timezone method: call get_config correctly expected: status ok ''' status, config_value = connect.get_config("general", "timezone") assert status.OK() assert "UTC" in config_value
[ "def", "test_get_timezone_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "status", ",", "config_value", "=", "connect", ".", "get_config", "(", "\"general\"", ",", "\"timezone\"", ")", "assert", "status", ".", "OK", "(", ")", "assert", "\"...
[ 1003, 4 ]
[ 1011, 36 ]
python
en
['en', 'error', 'th']
False
TestGeneralConfig.test_set_timezone_invalid
(self, connect, collection)
target: set timezone method: call set_config with invalid timezone expected: status not ok
target: set timezone method: call set_config with invalid timezone expected: status not ok
def test_set_timezone_invalid(self, connect, collection): ''' target: set timezone method: call set_config with invalid timezone expected: status not ok ''' for invalid_timezone in ["utc+8", "UTC++8", "GMT+8"]: logging.getLogger().info(invalid_timezone) ...
[ "def", "test_set_timezone_invalid", "(", "self", ",", "connect", ",", "collection", ")", ":", "for", "invalid_timezone", "in", "[", "\"utc+8\"", ",", "\"UTC++8\"", ",", "\"GMT+8\"", "]", ":", "logging", ".", "getLogger", "(", ")", ".", "info", "(", "invalid_...
[ 1018, 4 ]
[ 1027, 34 ]
python
en
['en', 'error', 'th']
False
TestGeneralConfig.test_set_general_invalid_child_key
(self, connect, collection)
target: set invalid child key method: call set_config with invalid child_key expected: status not ok
target: set invalid child key method: call set_config with invalid child_key expected: status not ok
def test_set_general_invalid_child_key(self, connect, collection): ''' target: set invalid child key method: call set_config with invalid child_key expected: status not ok ''' status, reply = connect.set_config("general", "child_key", 1) assert not status.OK()
[ "def", "test_set_general_invalid_child_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "status", ",", "reply", "=", "connect", ".", "set_config", "(", "\"general\"", ",", "\"child_key\"", ",", "1", ")", "assert", "not", "status", ".", "OK", "...
[ 1030, 4 ]
[ 1037, 30 ]
python
en
['en', 'error', 'th']
False
TestGeneralConfig.test_set_meta_uri_valid
(self, connect, collection)
target: set meta_uri method: call set_config correctly expected: status ok, set successfully
target: set meta_uri method: call set_config correctly expected: status ok, set successfully
def test_set_meta_uri_valid(self, connect, collection): ''' target: set meta_uri method: call set_config correctly expected: status ok, set successfully ''' status, reply = connect.set_config("general", "meta_uri", 'sqlite://:@:/') assert status.OK() statu...
[ "def", "test_set_meta_uri_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "status", ",", "reply", "=", "connect", ".", "set_config", "(", "\"general\"", ",", "\"meta_uri\"", ",", "'sqlite://:@:/'", ")", "assert", "status", ".", "OK", "(", "...
[ 1040, 4 ]
[ 1050, 46 ]
python
en
['en', 'error', 'th']
False
TestStorageConfig.test_get_path_invalid_child_key
(self, connect, collection)
target: get invalid child key method: call get_config without child_key: path expected: status not ok
target: get invalid child key method: call get_config without child_key: path expected: status not ok
def test_get_path_invalid_child_key(self, connect, collection): ''' target: get invalid child key method: call get_config without child_key: path expected: status not ok ''' invalid_configs = ["Primary_path", "primarypath", "path "] for config in invalid_configs: ...
[ "def", "test_get_path_invalid_child_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "invalid_configs", "=", "[", "\"Primary_path\"", ",", "\"primarypath\"", ",", "\"path \"", "]", "for", "config", "in", "invalid_configs", ":", "status", ",", "confi...
[ 1065, 4 ]
[ 1074, 34 ]
python
en
['en', 'error', 'th']
False
TestStorageConfig.test_get_path_valid
(self, connect, collection)
target: get path method: call get_config correctly expected: status ok
target: get path method: call get_config correctly expected: status ok
def test_get_path_valid(self, connect, collection): ''' target: get path method: call get_config correctly expected: status ok ''' status, config_value = connect.get_config("storage", "path") assert status.OK()
[ "def", "test_get_path_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "status", ",", "config_value", "=", "connect", ".", "get_config", "(", "\"storage\"", ",", "\"path\"", ")", "assert", "status", ".", "OK", "(", ")" ]
[ 1077, 4 ]
[ 1084, 26 ]
python
en
['en', 'error', 'th']
False
TestStorageConfig.test_get_auto_flush_interval_invalid_child_key
(self, connect, collection)
target: get invalid child key method: call get_config without child_key: auto_flush_interval expected: status not ok
target: get invalid child key method: call get_config without child_key: auto_flush_interval expected: status not ok
def test_get_auto_flush_interval_invalid_child_key(self, connect, collection): ''' target: get invalid child key method: call get_config without child_key: auto_flush_interval expected: status not ok ''' invalid_configs = ["autoFlushInterval", "auto_flush", "auto_flush_in...
[ "def", "test_get_auto_flush_interval_invalid_child_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "invalid_configs", "=", "[", "\"autoFlushInterval\"", ",", "\"auto_flush\"", ",", "\"auto_flush_interval \"", "]", "for", "config", "in", "invalid_configs", ...
[ 1087, 4 ]
[ 1096, 34 ]
python
en
['en', 'error', 'th']
False
TestStorageConfig.test_get_auto_flush_interval_valid
(self, connect, collection)
target: get auto_flush_interval method: call get_config correctly expected: status ok
target: get auto_flush_interval method: call get_config correctly expected: status ok
def test_get_auto_flush_interval_valid(self, connect, collection): ''' target: get auto_flush_interval method: call get_config correctly expected: status ok ''' status, config_value = connect.get_config("storage", "auto_flush_interval") assert status.OK()
[ "def", "test_get_auto_flush_interval_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "status", ",", "config_value", "=", "connect", ".", "get_config", "(", "\"storage\"", ",", "\"auto_flush_interval\"", ")", "assert", "status", ".", "OK", "(", ...
[ 1099, 4 ]
[ 1106, 26 ]
python
en
['en', 'error', 'th']
False
TestStorageConfig.test_set_storage_invalid_child_key
(self, connect, collection)
target: set invalid child key method: call set_config with invalid child_key expected: status not ok
target: set invalid child key method: call set_config with invalid child_key expected: status not ok
def test_set_storage_invalid_child_key(self, connect, collection): ''' target: set invalid child key method: call set_config with invalid child_key expected: status not ok ''' status, reply = connect.set_config("storage", "child_key", "") assert not status.OK()
[ "def", "test_set_storage_invalid_child_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "status", ",", "reply", "=", "connect", ".", "set_config", "(", "\"storage\"", ",", "\"child_key\"", ",", "\"\"", ")", "assert", "not", "status", ".", "OK", ...
[ 1114, 4 ]
[ 1121, 30 ]
python
en
['en', 'error', 'th']
False
TestStorageConfig.test_set_path_valid
(self, connect, collection)
target: set path method: call set_config correctly expected: status ok, set successfully
target: set path method: call set_config correctly expected: status ok, set successfully
def test_set_path_valid(self, connect, collection): ''' target: set path method: call set_config correctly expected: status ok, set successfully ''' status, reply = connect.set_config("storage", "path", '/var/lib/milvus') assert status.OK() status, config_...
[ "def", "test_set_path_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "status", ",", "reply", "=", "connect", ".", "set_config", "(", "\"storage\"", ",", "\"path\"", ",", "'/var/lib/milvus'", ")", "assert", "status", ".", "OK", "(", ")", ...
[ 1124, 4 ]
[ 1134, 48 ]
python
en
['en', 'error', 'th']
False
TestStorageConfig.test_set_auto_flush_interval_valid
(self, connect, collection)
target: set auto_flush_interval method: call set_config correctly expected: status ok, set successfully
target: set auto_flush_interval method: call set_config correctly expected: status ok, set successfully
def test_set_auto_flush_interval_valid(self, connect, collection): ''' target: set auto_flush_interval method: call set_config correctly expected: status ok, set successfully ''' for valid_auto_flush_interval in [2, 1]: logging.getLogger().info(valid_auto_flus...
[ "def", "test_set_auto_flush_interval_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "for", "valid_auto_flush_interval", "in", "[", "2", ",", "1", "]", ":", "logging", ".", "getLogger", "(", ")", ".", "info", "(", "valid_auto_flush_interval", ...
[ 1136, 4 ]
[ 1148, 65 ]
python
en
['en', 'error', 'th']
False
TestStorageConfig.test_set_auto_flush_interval_invalid
(self, connect, collection)
target: set auto_flush_interval method: call set_config with invalid auto_flush_interval expected: status not ok
target: set auto_flush_interval method: call set_config with invalid auto_flush_interval expected: status not ok
def test_set_auto_flush_interval_invalid(self, connect, collection): ''' target: set auto_flush_interval method: call set_config with invalid auto_flush_interval expected: status not ok ''' for invalid_auto_flush_interval in [-1, "1.5", "invalid", "1+2"]: stat...
[ "def", "test_set_auto_flush_interval_invalid", "(", "self", ",", "connect", ",", "collection", ")", ":", "for", "invalid_auto_flush_interval", "in", "[", "-", "1", ",", "\"1.5\"", ",", "\"invalid\"", ",", "\"1+2\"", "]", ":", "status", ",", "reply", "=", "conn...
[ 1150, 4 ]
[ 1158, 34 ]
python
en
['en', 'error', 'th']
False
TestMetricConfig.test_get_enable_invalid_child_key
(self, connect, collection)
target: get invalid child key method: call get_config without child_key: enable expected: status not ok
target: get invalid child key method: call get_config without child_key: enable expected: status not ok
def test_get_enable_invalid_child_key(self, connect, collection): ''' target: get invalid child key method: call get_config without child_key: enable expected: status not ok ''' invalid_configs = ["enablemonitor", "Enable_monitor", "enable "] for config in invalid...
[ "def", "test_get_enable_invalid_child_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "invalid_configs", "=", "[", "\"enablemonitor\"", ",", "\"Enable_monitor\"", ",", "\"enable \"", "]", "for", "config", "in", "invalid_configs", ":", "status", ",", ...
[ 1173, 4 ]
[ 1182, 34 ]
python
en
['en', 'error', 'th']
False
TestMetricConfig.test_get_enable_valid
(self, connect, collection)
target: get enable method: call get_config correctly expected: status ok
target: get enable method: call get_config correctly expected: status ok
def test_get_enable_valid(self, connect, collection): ''' target: get enable method: call get_config correctly expected: status ok ''' status, config_value = connect.get_config("metric", "enable") assert status.OK()
[ "def", "test_get_enable_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "status", ",", "config_value", "=", "connect", ".", "get_config", "(", "\"metric\"", ",", "\"enable\"", ")", "assert", "status", ".", "OK", "(", ")" ]
[ 1185, 4 ]
[ 1192, 26 ]
python
en
['en', 'error', 'th']
False
TestMetricConfig.test_get_address_invalid_child_key
(self, connect, collection)
target: get invalid child key method: call get_config without child_key: address expected: status not ok
target: get invalid child key method: call get_config without child_key: address expected: status not ok
def test_get_address_invalid_child_key(self, connect, collection): ''' target: get invalid child key method: call get_config without child_key: address expected: status not ok ''' invalid_configs = ["Address", "addresses", "address "] for config in invalid_configs...
[ "def", "test_get_address_invalid_child_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "invalid_configs", "=", "[", "\"Address\"", ",", "\"addresses\"", ",", "\"address \"", "]", "for", "config", "in", "invalid_configs", ":", "status", ",", "config...
[ 1195, 4 ]
[ 1204, 34 ]
python
en
['en', 'error', 'th']
False
TestMetricConfig.test_get_address_valid
(self, connect, collection)
target: get address method: call get_config correctly expected: status ok
target: get address method: call get_config correctly expected: status ok
def test_get_address_valid(self, connect, collection): ''' target: get address method: call get_config correctly expected: status ok ''' status, config_value = connect.get_config("metric", "address") assert status.OK()
[ "def", "test_get_address_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "status", ",", "config_value", "=", "connect", ".", "get_config", "(", "\"metric\"", ",", "\"address\"", ")", "assert", "status", ".", "OK", "(", ")" ]
[ 1207, 4 ]
[ 1214, 26 ]
python
en
['en', 'error', 'th']
False
TestMetricConfig.test_get_port_invalid_child_key
(self, connect, collection)
target: get invalid child key method: call get_config without child_key: port expected: status not ok
target: get invalid child key method: call get_config without child_key: port expected: status not ok
def test_get_port_invalid_child_key(self, connect, collection): ''' target: get invalid child key method: call get_config without child_key: port expected: status not ok ''' invalid_configs = ["Port", "PORT", "port "] for config in invalid_configs: sta...
[ "def", "test_get_port_invalid_child_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "invalid_configs", "=", "[", "\"Port\"", ",", "\"PORT\"", ",", "\"port \"", "]", "for", "config", "in", "invalid_configs", ":", "status", ",", "config_value", "="...
[ 1217, 4 ]
[ 1226, 34 ]
python
en
['en', 'error', 'th']
False
TestMetricConfig.test_get_port_valid
(self, connect, collection)
target: get port method: call get_config correctly expected: status ok
target: get port method: call get_config correctly expected: status ok
def test_get_port_valid(self, connect, collection): ''' target: get port method: call get_config correctly expected: status ok ''' status, config_value = connect.get_config("metric", "port") assert status.OK()
[ "def", "test_get_port_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "status", ",", "config_value", "=", "connect", ".", "get_config", "(", "\"metric\"", ",", "\"port\"", ")", "assert", "status", ".", "OK", "(", ")" ]
[ 1229, 4 ]
[ 1236, 26 ]
python
en
['en', 'error', 'th']
False
TestMetricConfig.test_set_metric_invalid_child_key
(self, connect, collection)
target: set invalid child key method: call set_config with invalid child_key expected: status not ok
target: set invalid child key method: call set_config with invalid child_key expected: status not ok
def test_set_metric_invalid_child_key(self, connect, collection): ''' target: set invalid child key method: call set_config with invalid child_key expected: status not ok ''' status, reply = connect.set_config("metric", "child_key", 19530) assert not status.OK()
[ "def", "test_set_metric_invalid_child_key", "(", "self", ",", "connect", ",", "collection", ")", ":", "status", ",", "reply", "=", "connect", ".", "set_config", "(", "\"metric\"", ",", "\"child_key\"", ",", "19530", ")", "assert", "not", "status", ".", "OK", ...
[ 1245, 4 ]
[ 1252, 30 ]
python
en
['en', 'error', 'th']
False
TestMetricConfig.test_set_enable_valid
(self, connect, collection)
target: set enable method: call set_config correctly expected: status ok, set successfully
target: set enable method: call set_config correctly expected: status ok, set successfully
def test_set_enable_valid(self, connect, collection): ''' target: set enable method: call set_config correctly expected: status ok, set successfully ''' for valid_enable in ["Off", "false", 0, "yes", "On", "true", "1", "NO"]: status, reply = connect.set_config...
[ "def", "test_set_enable_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "for", "valid_enable", "in", "[", "\"Off\"", ",", "\"false\"", ",", "0", ",", "\"yes\"", ",", "\"On\"", ",", "\"true\"", ",", "\"1\"", ",", "\"NO\"", "]", ":", "sta...
[ 1254, 4 ]
[ 1265, 52 ]
python
en
['en', 'error', 'th']
False
TestMetricConfig.test_set_address_valid
(self, connect, collection)
target: set address method: call set_config correctly expected: status ok, set successfully
target: set address method: call set_config correctly expected: status ok, set successfully
def test_set_address_valid(self, connect, collection): ''' target: set address method: call set_config correctly expected: status ok, set successfully ''' status, reply = connect.set_config("metric", "address", '127.0.0.1') assert status.OK() status, confi...
[ "def", "test_set_address_valid", "(", "self", ",", "connect", ",", "collection", ")", ":", "status", ",", "reply", "=", "connect", ".", "set_config", "(", "\"metric\"", ",", "\"address\"", ",", "'127.0.0.1'", ")", "assert", "status", ".", "OK", "(", ")", "...
[ 1268, 4 ]
[ 1278, 42 ]
python
en
['en', 'error', 'th']
False