repo_id
string
cross_repo_split
string
commit_index
int32
commit_sha
string
in_repo_split
string
test_file
string
file_split
string
split_group
string
lineno
int32
col_offset
int32
assertion_type
string
test_function
string
prefix
large_string
target
string
assertion_event_type
string
assertion_event_id
string
assertion_anchor
large_string
old_target
string
old_lineno
int32
old_col_offset
int32
webis-de/small-text
train
96
1b87c6785c341c34403aabf2a418bffd00feb229
train
tests/unit/small_text/query_strategies/test_strategies.py
train
webis-de/small-text:tests/unit/small_text/query_strategies/test_strategies.py
710
8
self.assertEqual
test_sample
import unittest import numpy as np from numpy.testing import assert_array_equal, assert_array_almost_equal from scipy.sparse import csr_matrix from sklearn.preprocessing import normalize from unittest.mock import patch, Mock from small_text.classifiers import ConfidenceEnhancedLinearSVC, SklearnClassifier from small...
indices.shape[0])
modified
26bf856ddbcfd65fd78e3b0d70ff7bbb49dcf206b2dcd450baea529dc5952f8f
self.assertEqual|test_sample|import unittest import numpy as np from numpy.testing import assert_array_equal, assert_array_almost_equal from scipy.sparse import csr_matrix from sklearn.preprocessing import normalize from unittest.mock import patch, Mock from small_text.classifiers import ConfidenceEnhancedLinearSVC, Sk...
indices.shape[0])
711
8
webis-de/small-text
train
96
1b87c6785c341c34403aabf2a418bffd00feb229
train
tests/unit/small_text/query_strategies/test_strategies.py
train
webis-de/small-text:tests/unit/small_text/query_strategies/test_strategies.py
755
13
self.assertRaisesRegex
test_sample_with_clf_that_does_not_return_proba
import unittest import numpy as np from numpy.testing import assert_array_equal, assert_array_almost_equal from scipy.sparse import csr_matrix from sklearn.preprocessing import normalize from unittest.mock import patch, Mock from small_text.classifiers import ConfidenceEnhancedLinearSVC, SklearnClassifier from small...
ValueError, 'Error: embeddings_proba is None. This strategy')
modified
ecd5c7fdaa802969419aabff8aa80a8da437397c0ce768c6e0d04fce145dfb68
self.assertRaisesRegex|test_sample_with_clf_that_does_not_return_proba|import unittest import numpy as np from numpy.testing import assert_array_equal, assert_array_almost_equal from scipy.sparse import csr_matrix from sklearn.preprocessing import normalize from unittest.mock import patch, Mock from small_text.classifi...
ValueError, 'Error: embeddings_proba is None. This strategy')
756
13
webis-de/small-text
train
96
1b87c6785c341c34403aabf2a418bffd00feb229
train
tests/unit/small_text/query_strategies/test_strategies.py
train
webis-de/small-text:tests/unit/small_text/query_strategies/test_strategies.py
853
8
self.assertEqual
test_discriminative_active_learning_str
import unittest import numpy as np from numpy.testing import assert_array_equal, assert_array_almost_equal from scipy.sparse import csr_matrix from sklearn.preprocessing import normalize from unittest.mock import patch, Mock from small_text.classifiers import ConfidenceEnhancedLinearSVC, SklearnClassifier from small...
str(strategy))
modified
168b195da7fdf2cbe0f697c5c5ae2062e9c4e98785f92ff04a6247fc44b83c20
self.assertEqual|test_discriminative_active_learning_str|import unittest import numpy as np from numpy.testing import assert_array_equal, assert_array_almost_equal from scipy.sparse import csr_matrix from sklearn.preprocessing import normalize from unittest.mock import patch, Mock from small_text.classifiers import Con...
str(strategy))
854
8
webis-de/small-text
train
97
23382d21732cc439fbb537fa30639acab8b64333
train
tests/unit/small_text/utils/test_annotations.py
train
webis-de/small-text:tests/unit/small_text/utils/test_annotations.py
40
13
self.assertRaisesRegex
test_func_failure_of_removal
import unittest from packaging import version from unittest.mock import patch from small_text.utils.annotations import ( deprecated, experimental, DeprecationError, ExperimentalWarning ) class DeprecationUtilsTest(unittest.TestCase): def test_deprecate_invalid_target(self): with self.as...
DeprecationError, r'The function myfunc should have been removed ' r'before version 10\.0\.0\.')
added
ce78e91f3907e94fa1d456735639d5b63d7b81efceb274de775c13a854c7bf88
self.assertRaisesRegex|test_func_failure_of_removal|import unittest from packaging import version from unittest.mock import patch from small_text.utils.annotations import ( deprecated, experimental, DeprecationError, ExperimentalWarning ) class DeprecationUtilsTest(unittest.TestCase): def test_deprecate_invalid_target(...
null
null
null
webis-de/small-text
train
97
23382d21732cc439fbb537fa30639acab8b64333
train
tests/unit/small_text/utils/test_annotations.py
train
webis-de/small-text:tests/unit/small_text/utils/test_annotations.py
79
12
self.assertTrue
test_deprecate_function_with_removed_in
import unittest from packaging import version from unittest.mock import patch from small_text.utils.annotations import ( deprecated, experimental, DeprecationError, ExperimentalWarning ) class DeprecationUtilsTest(unittest.TestCase): def test_deprecate_invalid_target(self): with self.as...
myfunc('foo'))
added
6d18a67c4942346fd932e61a2e9733b224385fe65d87cf9cb5a431b1afd35798
self.assertTrue|test_deprecate_function_with_removed_in|import unittest from packaging import version from unittest.mock import patch from small_text.utils.annotations import ( deprecated, experimental, DeprecationError, ExperimentalWarning ) class DeprecationUtilsTest(unittest.TestCase): def test_deprecate_invalid_tar...
null
null
null
webis-de/small-text
train
97
23382d21732cc439fbb537fa30639acab8b64333
train
tests/unit/small_text/utils/test_annotations.py
train
webis-de/small-text:tests/unit/small_text/utils/test_annotations.py
91
12
self.assertTrue
test_deprecate_function_with_replacement
import unittest from packaging import version from unittest.mock import patch from small_text.utils.annotations import ( deprecated, experimental, DeprecationError, ExperimentalWarning ) class DeprecationUtilsTest(unittest.TestCase): def test_deprecate_invalid_target(self): with self.as...
myfunc('foo'))
added
56ebe8f2f38c088612457d208beddec56dd643fe0c6cf12c294d4839a5d5d014
self.assertTrue|test_deprecate_function_with_replacement|import unittest from packaging import version from unittest.mock import patch from small_text.utils.annotations import ( deprecated, experimental, DeprecationError, ExperimentalWarning ) class DeprecationUtilsTest(unittest.TestCase): def test_deprecate_invalid_ta...
null
null
null
webis-de/small-text
train
97
23382d21732cc439fbb537fa30639acab8b64333
train
tests/unit/small_text/utils/test_annotations.py
train
webis-de/small-text:tests/unit/small_text/utils/test_annotations.py
105
12
self.assertTrue
test_deprecate_function_with_removed_in_and_replacement
import unittest from packaging import version from unittest.mock import patch from small_text.utils.annotations import ( deprecated, experimental, DeprecationError, ExperimentalWarning ) class DeprecationUtilsTest(unittest.TestCase): def test_deprecate_invalid_target(self): with self.as...
myfunc('foo'))
added
9b6c67012c95e009fb8e2636eb5f384f1a227c3374e8a8f44906b3595060d92a
self.assertTrue|test_deprecate_function_with_removed_in_and_replacement|import unittest from packaging import version from unittest.mock import patch from small_text.utils.annotations import ( deprecated, experimental, DeprecationError, ExperimentalWarning ) class DeprecationUtilsTest(unittest.TestCase): def test_depre...
null
null
null
webis-de/small-text
train
98
2616e04218056c2450095c749ea2a7a6c3b85488
train
tests/unit/small_text/data/test_dataset_construction.py
train
webis-de/small-text:tests/unit/small_text/data/test_dataset_construction.py
46
12
assert_*
test_from_arrays_with_ndarray
import unittest import numpy as np from numpy.testing import assert_array_equal from sklearn.feature_extraction.text import TfidfVectorizer from unittest.mock import patch from small_text.data import SklearnDataset from tests.utils.datasets import random_labeling, random_labels from tests.utils.testing import assert_...
dataset.y)
added
51f3295d94e42af04f41f996e6010af2cbe1bf37c1f18a20092e5b3fad5d1484
assert_*|test_from_arrays_with_ndarray|import unittest import numpy as np from numpy.testing import assert_array_equal from sklearn.feature_extraction.text import TfidfVectorizer from unittest.mock import patch from small_text.data import SklearnDataset from tests.utils.datasets import random_labeling, random_labels fr...
null
null
null
webis-de/small-text
train
98
2616e04218056c2450095c749ea2a7a6c3b85488
train
tests/unit/small_text/data/test_dataset_construction.py
train
webis-de/small-text:tests/unit/small_text/data/test_dataset_construction.py
92
12
self.assertTrue
test_from_arrays_with_lists
import unittest import numpy as np from numpy.testing import assert_array_equal from sklearn.feature_extraction.text import TfidfVectorizer from unittest.mock import patch from small_text.data import SklearnDataset from tests.utils.datasets import random_labeling, random_labels from tests.utils.testing import assert_...
is_fitted)
added
944c596acd84e12d1a46efe30655d1f799be581b8279381c90d1eb5f82185d87
self.assertTrue|test_from_arrays_with_lists|import unittest import numpy as np from numpy.testing import assert_array_equal from sklearn.feature_extraction.text import TfidfVectorizer from unittest.mock import patch from small_text.data import SklearnDataset from tests.utils.datasets import random_labeling, random_labe...
null
null
null
webis-de/small-text
train
98
2616e04218056c2450095c749ea2a7a6c3b85488
train
tests/unit/small_text/integrations/pytorch/test_dataset_construction.py
train
webis-de/small-text:tests/unit/small_text/integrations/pytorch/test_dataset_construction.py
103
8
self.assertTrue
test_from_arrays_with_ndarray
import unittest import numpy as np from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import random_labeling, random_labels try: from small_text.integrations.pytorch.datasets import PytorchTextClassificationDataset except (PytorchNotFoundError, ModuleNotFoundErr...
dataset.is_multi_label)
added
81fa11f0aec5c26993a0101f02370f2ca3bce014a5d0cb8c2c14008b6e007d9d
self.assertTrue|test_from_arrays_with_ndarray|import unittest import numpy as np from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import random_labeling, random_labels try: from small_text.integrations.pytorch.datasets import PytorchTextClassificationDataset except (...
null
null
null
webis-de/small-text
train
98
2616e04218056c2450095c749ea2a7a6c3b85488
train
tests/unit/small_text/integrations/pytorch/test_dataset_construction.py
train
webis-de/small-text:tests/unit/small_text/integrations/pytorch/test_dataset_construction.py
136
13
self.assertRaisesRegex
test_from_arrays_with_test_data_and_no_vocab
import unittest import numpy as np from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import random_labeling, random_labels try: from small_text.integrations.pytorch.datasets import PytorchTextClassificationDataset except (PytorchNotFoundError, ModuleNotFoundErr...
ValueError, 'Vocab must have been built')
added
5a367ff6883ef431dddc09665baa4363e8e958293ed2b43bad17b8d111b246f7
self.assertRaisesRegex|test_from_arrays_with_test_data_and_no_vocab|import unittest import numpy as np from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import random_labeling, random_labels try: from small_text.integrations.pytorch.datasets import PytorchTextClassifi...
null
null
null
webis-de/small-text
train
98
2616e04218056c2450095c749ea2a7a6c3b85488
train
tests/unit/small_text/integrations/transformers/test_dataset_construction.py
train
webis-de/small-text:tests/unit/small_text/integrations/transformers/test_dataset_construction.py
23
8
self.assertEqual
test_from_arrays_with_lists
import unittest import numpy as np from transformers import AutoTokenizer from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import random_labeling, random_labels try: from small_text.integrations.transformers.datasets import TransformersDataset except (PytorchN...
len(dataset))
added
3f5a9ff94dd8f94d0e7b6c10ebec4e2f2de0ef524078f4e46ce85bae409740a0
self.assertEqual|test_from_arrays_with_lists|import unittest import numpy as np from transformers import AutoTokenizer from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import random_labeling, random_labels try: from small_text.integrations.transformers.datasets impor...
null
null
null
webis-de/small-text
train
98
2616e04218056c2450095c749ea2a7a6c3b85488
train
tests/utils/datasets.py
train
webis-de/small-text:tests/utils/datasets.py
105
4
assert
import numpy as np from collections import Counter from scipy import sparse from sklearn.datasets import fetch_20newsgroups from small_text.data.datasets import SklearnDataset from small_text.data.sampling import _get_class_histogram try: import torch from torchtext.vocab import Vocab from small_text.in...
'<unk>'
added
339c4a1a33c9880622b69217bd329062cccf96cc75b25909c1ee6d666c5da967
assert||import numpy as np from collections import Counter from scipy import sparse from sklearn.datasets import fetch_20newsgroups from small_text.data.datasets import SklearnDataset from small_text.data.sampling import _get_class_histogram try: import torch from torchtext.vocab import Vocab from small_text.integratio...
null
null
null
webis-de/small-text
train
98
2616e04218056c2450095c749ea2a7a6c3b85488
train
tests/utils/datasets.py
train
webis-de/small-text:tests/utils/datasets.py
106
4
assert
import numpy as np from collections import Counter from scipy import sparse from sklearn.datasets import fetch_20newsgroups from small_text.data.datasets import SklearnDataset from small_text.data.sampling import _get_class_histogram try: import torch from torchtext.vocab import Vocab from small_text.in...
'<pad>'
added
3ec53cefa5cdb06f8f01f0dc5cff4b08da201c6bf48a23e40a54c45b80ab2024
assert||import numpy as np from collections import Counter from scipy import sparse from sklearn.datasets import fetch_20newsgroups from small_text.data.datasets import SklearnDataset from small_text.data.sampling import _get_class_histogram try: import torch from torchtext.vocab import Vocab from small_text.integratio...
null
null
null
webis-de/small-text
train
98
2616e04218056c2450095c749ea2a7a6c3b85488
train
tests/utils/object_factory.py
train
webis-de/small-text:tests/utils/object_factory.py
11
4
assert
import numpy as np from small_text.active_learner import PoolBasedActiveLearner from small_text.utils.labels import list_to_csr from tests.utils.datasets import random_labeling def get_initialized_active_learner(clf_factory, query_strategy, dataset, initial_indices=10, num_classes...
num_classes
modified
ad32a5d4f8d8c2b85e6a95368d7ab8e340e2c2b9dad21bff958818133cd0b5fc
assert||import numpy as np from small_text.active_learner import PoolBasedActiveLearner from small_text.utils.labels import list_to_csr from tests.utils.datasets import random_labeling def get_initialized_active_learner(clf_factory, query_strategy, dataset, initial_indices=10, num_classes=2, multi_label=False): assert ...
num_classes
11
4
webis-de/small-text
train
99
da83d754510c53e096c40dc6bd9e8787c9ad5666
train
tests/unit/small_text/data/test_dataset_construction.py
train
webis-de/small-text:tests/unit/small_text/data/test_dataset_construction.py
89
12
self.assertEqual
test_from_arrays_with_lists
import unittest import numpy as np from numpy.testing import assert_array_equal from sklearn.feature_extraction.text import TfidfVectorizer from unittest.mock import patch from small_text.data import SklearnDataset from tests.utils.datasets import random_labeling, random_labels from tests.utils.testing import assert_...
len(dataset))
modified
49a539b9a0355a5a21737e42d4624c2db88dc3370c79494a6b0614651c32fcc1
self.assertEqual|test_from_arrays_with_lists|import unittest import numpy as np from numpy.testing import assert_array_equal from sklearn.feature_extraction.text import TfidfVectorizer from unittest.mock import patch from small_text.data import SklearnDataset from tests.utils.datasets import random_labeling, random_lab...
len(dataset))
88
12
webis-de/small-text
train
99
da83d754510c53e096c40dc6bd9e8787c9ad5666
train
tests/unit/small_text/data/test_dataset_construction.py
train
webis-de/small-text:tests/unit/small_text/data/test_dataset_construction.py
108
12
self.assertEqual
test_from_arrays_with_ndarray
import unittest import numpy as np from numpy.testing import assert_array_equal from sklearn.feature_extraction.text import TfidfVectorizer from unittest.mock import patch from small_text.data import SklearnDataset from tests.utils.datasets import random_labeling, random_labels from tests.utils.testing import assert_...
len(dataset))
modified
dadcec90c16919314b82bd30a7cecc99e3efa6dfa92f4fc2e89698a94bffeb4d
self.assertEqual|test_from_arrays_with_ndarray|import unittest import numpy as np from numpy.testing import assert_array_equal from sklearn.feature_extraction.text import TfidfVectorizer from unittest.mock import patch from small_text.data import SklearnDataset from tests.utils.datasets import random_labeling, random_l...
len(dataset))
107
12
webis-de/small-text
train
99
da83d754510c53e096c40dc6bd9e8787c9ad5666
train
tests/unit/small_text/data/test_dataset_construction.py
train
webis-de/small-text:tests/unit/small_text/data/test_dataset_construction.py
112
12
self.assertTrue
test_from_arrays_with_ndarray
import unittest import numpy as np from numpy.testing import assert_array_equal from sklearn.feature_extraction.text import TfidfVectorizer from unittest.mock import patch from small_text.data import SklearnDataset from tests.utils.datasets import random_labeling, random_labels from tests.utils.testing import assert_...
is_fitted)
modified
7fc11c9c80748a4135ee57dd231d9045f85a03b89680c39990044a08ca52a68f
self.assertTrue|test_from_arrays_with_ndarray|import unittest import numpy as np from numpy.testing import assert_array_equal from sklearn.feature_extraction.text import TfidfVectorizer from unittest.mock import patch from small_text.data import SklearnDataset from tests.utils.datasets import random_labeling, random_la...
is_fitted)
111
12
webis-de/small-text
train
99
da83d754510c53e096c40dc6bd9e8787c9ad5666
train
tests/unit/small_text/data/test_dataset_construction.py
train
webis-de/small-text:tests/unit/small_text/data/test_dataset_construction.py
131
12
assert_*
test_from_arrays_test_data
import unittest import numpy as np from numpy.testing import assert_array_equal from sklearn.feature_extraction.text import TfidfVectorizer from unittest.mock import patch from small_text.data import SklearnDataset from tests.utils.datasets import random_labeling, random_labels from tests.utils.testing import assert_...
dataset.y)
modified
e3fead5f95d7f087da185c89dde9a43ef64d886259c51f19cfad89ab29674e90
assert_*|test_from_arrays_test_data|import unittest import numpy as np from numpy.testing import assert_array_equal from sklearn.feature_extraction.text import TfidfVectorizer from unittest.mock import patch from small_text.data import SklearnDataset from tests.utils.datasets import random_labeling, random_labels from ...
dataset.y)
129
12
webis-de/small-text
train
99
da83d754510c53e096c40dc6bd9e8787c9ad5666
train
tests/utils/datasets.py
train
webis-de/small-text:tests/utils/datasets.py
105
4
assert
import numpy as np from collections import Counter from scipy import sparse from sklearn.datasets import fetch_20newsgroups from small_text.data.datasets import SklearnDataset from small_text.data.sampling import _get_class_histogram try: import torch from torchtext.vocab import Vocab from small_text.in...
'<unk>'
modified
74b19d9e0a10202166aeabf036167e6ff41eb3d1ebd90ec3365aeb6a8e6a93a4
assert||import numpy as np from collections import Counter from scipy import sparse from sklearn.datasets import fetch_20newsgroups from small_text.data.datasets import SklearnDataset from small_text.data.sampling import _get_class_histogram try: import torch from torchtext.vocab import Vocab from small_text.integratio...
'<unk>'
105
4
webis-de/small-text
train
99
da83d754510c53e096c40dc6bd9e8787c9ad5666
train
tests/utils/datasets.py
train
webis-de/small-text:tests/utils/datasets.py
106
4
assert
import numpy as np from collections import Counter from scipy import sparse from sklearn.datasets import fetch_20newsgroups from small_text.data.datasets import SklearnDataset from small_text.data.sampling import _get_class_histogram try: import torch from torchtext.vocab import Vocab from small_text.in...
'<pad>'
modified
d57eb677dec041ef4518f62c79fd89634561cd01849c54d6f4c5d8ecedafdbe9
assert||import numpy as np from collections import Counter from scipy import sparse from sklearn.datasets import fetch_20newsgroups from small_text.data.datasets import SklearnDataset from small_text.data.sampling import _get_class_histogram try: import torch from torchtext.vocab import Vocab from small_text.integratio...
'<pad>'
106
4
webis-de/small-text
train
100
83e45a5a4aad071fb0676ea3908afa976f3c0559
train
tests/unit/small_text/integrations/pytorch/test_dataset_construction.py
train
webis-de/small-text:tests/unit/small_text/integrations/pytorch/test_dataset_construction.py
68
8
self.assertEqual
test_from_arrays_with_test_data
import unittest import pytest import numpy as np from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import random_labeling, random_labels try: from small_text.integrations.pytorch.datasets import PytorchTextClassificationDataset except (PytorchNotFoundError, Mo...
len(dataset))
modified
1a78b436ec5e9694b82ba90a0e5a0a2d4cc17b63051ef392eb27da3dff65a05a
self.assertEqual|test_from_arrays_with_test_data|import unittest import pytest import numpy as np from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import random_labeling, random_labels try: from small_text.integrations.pytorch.datasets import PytorchTextClassificatio...
len(dataset))
65
8
webis-de/small-text
train
100
83e45a5a4aad071fb0676ea3908afa976f3c0559
train
tests/unit/small_text/integrations/pytorch/test_dataset_construction.py
train
webis-de/small-text:tests/unit/small_text/integrations/pytorch/test_dataset_construction.py
96
8
self.assertEqual
test_from_arrays_with_lists
import unittest import pytest import numpy as np from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import random_labeling, random_labels try: from small_text.integrations.pytorch.datasets import PytorchTextClassificationDataset except (PytorchNotFoundError, Mo...
len(dataset))
added
c204194c62741fc934d279f349c9d810cf858a0d810ce61369cf4c35259490d7
self.assertEqual|test_from_arrays_with_lists|import unittest import pytest import numpy as np from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import random_labeling, random_labels try: from small_text.integrations.pytorch.datasets import PytorchTextClassificationDat...
null
null
null
webis-de/small-text
train
100
83e45a5a4aad071fb0676ea3908afa976f3c0559
train
tests/unit/small_text/integrations/pytorch/test_dataset_construction.py
train
webis-de/small-text:tests/unit/small_text/integrations/pytorch/test_dataset_construction.py
109
8
self.assertTrue
test_from_arrays_with_ndarray
import unittest import pytest import numpy as np from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import random_labeling, random_labels try: from small_text.integrations.pytorch.datasets import PytorchTextClassificationDataset except (PytorchNotFoundError, Mo...
'data' in dataset.vocab.stoi)
added
add052bc3b6ce12d7974d1953c996a1d702fe19afd9242374e59c671607b3808
self.assertTrue|test_from_arrays_with_ndarray|import unittest import pytest import numpy as np from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import random_labeling, random_labels try: from small_text.integrations.pytorch.datasets import PytorchTextClassificationDa...
null
null
null
webis-de/small-text
train
100
83e45a5a4aad071fb0676ea3908afa976f3c0559
train
tests/unit/small_text/integrations/pytorch/test_dataset_construction.py
train
webis-de/small-text:tests/unit/small_text/integrations/pytorch/test_dataset_construction.py
140
13
self.assertRaisesRegex
test_from_arrays_with_test_data_and_no_vocab
import unittest import pytest import numpy as np from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import random_labeling, random_labels try: from small_text.integrations.pytorch.datasets import PytorchTextClassificationDataset except (PytorchNotFoundError, Mo...
ValueError, 'Vocab must have been built')
added
86698aa891381469ad349f1cd8171170ee8d11740db5842ffd4879f55b2eb402
self.assertRaisesRegex|test_from_arrays_with_test_data_and_no_vocab|import unittest import pytest import numpy as np from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import random_labeling, random_labels try: from small_text.integrations.pytorch.datasets import Pytor...
null
null
null
webis-de/small-text
train
100
83e45a5a4aad071fb0676ea3908afa976f3c0559
train
tests/unit/small_text/integrations/transformers/test_dataset_construction.py
train
webis-de/small-text:tests/unit/small_text/integrations/transformers/test_dataset_construction.py
26
8
self.assertEqual
test_from_arrays_with_lists
import unittest import pytest import numpy as np from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import random_labeling, random_labels try: from transformers import AutoTokenizer from small_text.integrations.transformers.datasets import TransformersDatas...
len(dataset))
modified
05621122ce4cd2b15ccd52e603bcfb8af21ff3afbd2a589998ca91873fe7677b
self.assertEqual|test_from_arrays_with_lists|import unittest import pytest import numpy as np from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import random_labeling, random_labels try: from transformers import AutoTokenizer from small_text.integrations.transformers....
len(dataset))
23
8
webis-de/small-text
train
100
83e45a5a4aad071fb0676ea3908afa976f3c0559
train
tests/unit/small_text/integrations/transformers/test_dataset_construction.py
train
webis-de/small-text:tests/unit/small_text/integrations/transformers/test_dataset_construction.py
34
8
self.assertEqual
test_from_arrays_with_ndarray
import unittest import pytest import numpy as np from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import random_labeling, random_labels try: from transformers import AutoTokenizer from small_text.integrations.transformers.datasets import TransformersDatas...
len(dataset))
modified
76c5ae1cdda4cb8a771c7700666b4b7dbf06fb1ae4911050e38538380a412b74
self.assertEqual|test_from_arrays_with_ndarray|import unittest import pytest import numpy as np from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import random_labeling, random_labels try: from transformers import AutoTokenizer from small_text.integrations.transformer...
len(dataset))
31
8
webis-de/small-text
train
100
83e45a5a4aad071fb0676ea3908afa976f3c0559
train
tests/unit/small_text/integrations/transformers/test_dataset_construction.py
train
webis-de/small-text:tests/unit/small_text/integrations/transformers/test_dataset_construction.py
42
8
self.assertEqual
test_from_arrays_with_test_data
import unittest import pytest import numpy as np from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import random_labeling, random_labels try: from transformers import AutoTokenizer from small_text.integrations.transformers.datasets import TransformersDatas...
len(dataset))
modified
36e2dc5681c613d4117e9b1138e0dca817805f91b717a5cdd5eaf16bde589f7b
self.assertEqual|test_from_arrays_with_test_data|import unittest import pytest import numpy as np from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import random_labeling, random_labels try: from transformers import AutoTokenizer from small_text.integrations.transform...
len(dataset))
39
8
webis-de/small-text
train
100
83e45a5a4aad071fb0676ea3908afa976f3c0559
train
tests/unit/small_text/integrations/transformers/test_dataset_construction.py
train
webis-de/small-text:tests/unit/small_text/integrations/transformers/test_dataset_construction.py
68
8
self.assertEqual
test_from_arrays_with_ndarray
import unittest import pytest import numpy as np from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import random_labeling, random_labels try: from transformers import AutoTokenizer from small_text.integrations.transformers.datasets import TransformersDatas...
len(dataset))
added
c6342841dd59fc7d60064537f86e9f5ec5dc162b58a6b640107bafb0ad3f6656
self.assertEqual|test_from_arrays_with_ndarray|import unittest import pytest import numpy as np from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import random_labeling, random_labels try: from transformers import AutoTokenizer from small_text.integrations.transformer...
null
null
null
webis-de/small-text
train
101
cb7854869068dccd97960158fde2a2b00a862f0b
train
tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn.py
val
webis-de/small-text:tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn.py
126
12
self.assertTrue
test_fit_and_validate
import unittest import pytest import numpy as np from unittest.mock import patch from unittest import mock from unittest.mock import Mock from scipy.sparse import issparse from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from small_text.training.early_stopping import EarlyStopping, NoopEarl...
0 <= acc <= 1)
modified
d8348ab759caa47ec01de309aeeb88a59afafb9210f37eb9610f4047aa7bb2b6
self.assertTrue|test_fit_and_validate|import unittest import pytest import numpy as np from unittest.mock import patch from unittest import mock from unittest.mock import Mock from scipy.sparse import issparse from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from small_text.training.early_sto...
0 <= acc <= 1)
126
12
webis-de/small-text
train
101
cb7854869068dccd97960158fde2a2b00a862f0b
train
tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn.py
val
webis-de/small-text:tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn.py
199
12
self.assertTrue
test_fit_with_early_stopping_disabled
import unittest import pytest import numpy as np from unittest.mock import patch from unittest import mock from unittest.mock import Mock from scipy.sparse import issparse from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from small_text.training.early_stopping import EarlyStopping, NoopEarl...
isinstance(fit_main_spy.call_args_list[0].args[3], NoopEarlyStopping))
modified
faae2bfc47cc5aac6570bafefc49c2a20d8dab1bbe45b4227905ba2f3be1c49c
self.assertTrue|test_fit_with_early_stopping_disabled|import unittest import pytest import numpy as np from unittest.mock import patch from unittest import mock from unittest.mock import Mock from scipy.sparse import issparse from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from small_text.tr...
isinstance(fit_main_spy.call_args_list[0].args[3], NoopEarlyStopping))
199
12
webis-de/small-text
train
101
cb7854869068dccd97960158fde2a2b00a862f0b
train
tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn.py
val
webis-de/small-text:tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn.py
219
12
self.assertEqual
test_fit_with_model_selection_default
import unittest import pytest import numpy as np from unittest.mock import patch from unittest import mock from unittest.mock import Mock from scipy.sparse import issparse from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from small_text.training.early_stopping import EarlyStopping, NoopEarl...
fit_main_spy.call_count)
modified
5c082366ac533c7923fe517003668ce23e1c192159f39c69cd2f73e8b20247e1
self.assertEqual|test_fit_with_model_selection_default|import unittest import pytest import numpy as np from unittest.mock import patch from unittest import mock from unittest.mock import Mock from scipy.sparse import issparse from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from small_text.t...
fit_main_spy.call_count)
219
12
webis-de/small-text
train
101
cb7854869068dccd97960158fde2a2b00a862f0b
train
tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn.py
val
webis-de/small-text:tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn.py
266
12
self.assertEqual
test_fit_with_optimizer_and_scheduler
import unittest import pytest import numpy as np from unittest.mock import patch from unittest import mock from unittest.mock import Mock from scipy.sparse import issparse from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from small_text.training.early_stopping import EarlyStopping, NoopEarl...
train_mock.call_count)
modified
12ea114305cb36d52f010071f13c18aacf2139f4a82cc8500023f435391ef971
self.assertEqual|test_fit_with_optimizer_and_scheduler|import unittest import pytest import numpy as np from unittest.mock import patch from unittest import mock from unittest.mock import Mock from scipy.sparse import issparse from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from small_text.t...
train_mock.call_count)
269
12
webis-de/small-text
train
102
a3659cae2ec4c4b2eb12c72eafb40b052eef320c
train
tests/unit/small_text/query_strategies/test_strategies.py
train
webis-de/small-text:tests/unit/small_text/query_strategies/test_strategies.py
304
8
self.assertEqual
test_prediction_entropy_str
import unittest import numpy as np from numpy.testing import assert_array_equal, assert_array_almost_equal from scipy.sparse import csr_matrix from sklearn.preprocessing import normalize from unittest.mock import patch, Mock from small_text.classifiers import ConfidenceEnhancedLinearSVC, SklearnClassifier from small...
str(strategy))
added
ce0d471d65c927c0b034621818456b762d7907c9ce9a4f4f8a85e3ee889c905a
self.assertEqual|test_prediction_entropy_str|import unittest import numpy as np from numpy.testing import assert_array_equal, assert_array_almost_equal from scipy.sparse import csr_matrix from sklearn.preprocessing import normalize from unittest.mock import patch, Mock from small_text.classifiers import ConfidenceEnhan...
null
null
null
webis-de/small-text
train
102
a3659cae2ec4c4b2eb12c72eafb40b052eef320c
train
tests/unit/small_text/query_strategies/test_strategies.py
train
webis-de/small-text:tests/unit/small_text/query_strategies/test_strategies.py
329
8
self.assertIsNotNone
test_prediction_entropy_binary
import unittest import numpy as np from numpy.testing import assert_array_equal, assert_array_almost_equal from scipy.sparse import csr_matrix from sklearn.preprocessing import normalize from unittest.mock import patch, Mock from small_text.classifiers import ConfidenceEnhancedLinearSVC, SklearnClassifier from small...
strategy.scores_)
added
7d5d120783c8e5ef4b70456258569a7d2450f09df02082dba68c95715d3cf744
self.assertIsNotNone|test_prediction_entropy_binary|import unittest import numpy as np from numpy.testing import assert_array_equal, assert_array_almost_equal from scipy.sparse import csr_matrix from sklearn.preprocessing import normalize from unittest.mock import patch, Mock from small_text.classifiers import Confiden...
null
null
null
webis-de/small-text
train
102
a3659cae2ec4c4b2eb12c72eafb40b052eef320c
train
tests/unit/small_text/query_strategies/test_strategies.py
train
webis-de/small-text:tests/unit/small_text/query_strategies/test_strategies.py
372
8
self.assertEqual
test_subsampling_str
import unittest import numpy as np from numpy.testing import assert_array_equal, assert_array_almost_equal from scipy.sparse import csr_matrix from sklearn.preprocessing import normalize from unittest.mock import patch, Mock from small_text.classifiers import ConfidenceEnhancedLinearSVC, SklearnClassifier from small...
str(strategy))
added
73d99cf831cb1175ecb482fe814bf44c1e00b7d14e2ac97da0f6e773b93296a1
self.assertEqual|test_subsampling_str|import unittest import numpy as np from numpy.testing import assert_array_equal, assert_array_almost_equal from scipy.sparse import csr_matrix from sklearn.preprocessing import normalize from unittest.mock import patch, Mock from small_text.classifiers import ConfidenceEnhancedLine...
null
null
null
webis-de/small-text
train
102
a3659cae2ec4c4b2eb12c72eafb40b052eef320c
train
tests/unit/small_text/query_strategies/test_strategies.py
train
webis-de/small-text:tests/unit/small_text/query_strategies/test_strategies.py
621
8
self.assertIsNotNone
test_sample_with_normalize_false
import unittest import numpy as np from numpy.testing import assert_array_equal, assert_array_almost_equal from scipy.sparse import csr_matrix from sklearn.preprocessing import normalize from unittest.mock import patch, Mock from small_text.classifiers import ConfidenceEnhancedLinearSVC, SklearnClassifier from small...
indices)
added
6b40a28cbb841399347b7d83520ec7b5fb155487cbd14b1daff55944d879cfd4
self.assertIsNotNone|test_sample_with_normalize_false|import unittest import numpy as np from numpy.testing import assert_array_equal, assert_array_almost_equal from scipy.sparse import csr_matrix from sklearn.preprocessing import normalize from unittest.mock import patch, Mock from small_text.classifiers import Confid...
null
null
null
webis-de/small-text
train
103
b5cec976cfac000ef40c4d7b7929edc9e837bb4c
train
tests/unit/small_text/utils/test_classification.py
train
webis-de/small-text:tests/unit/small_text/utils/test_classification.py
130
8
assert_*
test_prediction_result_multilabel_with_enc_and_proba
import unittest import numpy as np from numpy.testing import assert_array_equal from scipy.sparse import csr_matrix from sklearn.preprocessing import MultiLabelBinarizer from small_text.utils.classification import empty_result, prediction_result from tests.utils.testing import assert_csr_matrix_equal class Classif...
proba_result)
added
eceeff89481dc361526c1c2d5e0b421b6e39c82fb933078a18ee71d313b34e27
assert_*|test_prediction_result_multilabel_with_enc_and_proba|import unittest import numpy as np from numpy.testing import assert_array_equal from scipy.sparse import csr_matrix from sklearn.preprocessing import MultiLabelBinarizer from small_text.utils.classification import empty_result, prediction_result from tests.u...
null
null
null
webis-de/small-text
train
103
b5cec976cfac000ef40c4d7b7929edc9e837bb4c
train
tests/unit/small_text/utils/test_classification.py
train
webis-de/small-text:tests/unit/small_text/utils/test_classification.py
137
8
self.assertEqual
test_empty_result_single_label_prediction
import unittest import numpy as np from numpy.testing import assert_array_equal from scipy.sparse import csr_matrix from sklearn.preprocessing import MultiLabelBinarizer from small_text.utils.classification import empty_result, prediction_result from tests.utils.testing import assert_csr_matrix_equal class Classif...
prediction.dtype)
added
78a21ab39f4e51c0a6fb622875a58216376c7c7526efa19f22a1596375dcec22
self.assertEqual|test_empty_result_single_label_prediction|import unittest import numpy as np from numpy.testing import assert_array_equal from scipy.sparse import csr_matrix from sklearn.preprocessing import MultiLabelBinarizer from small_text.utils.classification import empty_result, prediction_result from tests.util...
null
null
null
webis-de/small-text
train
103
b5cec976cfac000ef40c4d7b7929edc9e837bb4c
train
tests/unit/small_text/utils/test_classification.py
train
webis-de/small-text:tests/unit/small_text/utils/test_classification.py
158
8
self.assertEqual
test_empty_result_single_label_both
import unittest import numpy as np from numpy.testing import assert_array_equal from scipy.sparse import csr_matrix from sklearn.preprocessing import MultiLabelBinarizer from small_text.utils.classification import empty_result, prediction_result from tests.utils.testing import assert_csr_matrix_equal class Classif...
proba.shape)
added
45a1a1f7a2fd24f5d6d5ccecbb1aebaaaf5158bc41c095c0fc269e61805b66e9
self.assertEqual|test_empty_result_single_label_both|import unittest import numpy as np from numpy.testing import assert_array_equal from scipy.sparse import csr_matrix from sklearn.preprocessing import MultiLabelBinarizer from small_text.utils.classification import empty_result, prediction_result from tests.utils.test...
null
null
null
webis-de/small-text
train
103
b5cec976cfac000ef40c4d7b7929edc9e837bb4c
train
tests/unit/small_text/utils/test_classification.py
train
webis-de/small-text:tests/unit/small_text/utils/test_classification.py
164
17
self.assertRaisesRegex
test_empty_result_invalid_call
import unittest import numpy as np from numpy.testing import assert_array_equal from scipy.sparse import csr_matrix from sklearn.preprocessing import MultiLabelBinarizer from small_text.utils.classification import empty_result, prediction_result from tests.utils.testing import assert_csr_matrix_equal class Classif...
ValueError, 'Invalid usage: At least one of')
added
c83466e7fde6b3b9fb083276453e9668f7e2a03cf0ef9746136a49f1321b93d3
self.assertRaisesRegex|test_empty_result_invalid_call|import unittest import numpy as np from numpy.testing import assert_array_equal from scipy.sparse import csr_matrix from sklearn.preprocessing import MultiLabelBinarizer from small_text.utils.classification import empty_result, prediction_result from tests.utils.tes...
null
null
null
webis-de/small-text
train
104
ea801dfcafe6f0b884ffd27c163907129b9a4f71
train
tests/unit/small_text/data/test_datasets.py
train
webis-de/small-text:tests/unit/small_text/data/test_datasets.py
75
12
self.assertFalse
test_init
import unittest import numpy as np from parameterized import parameterized_class from unittest import mock from numpy.testing import assert_array_equal from scipy.sparse import csr_matrix from small_text.base import LABEL_UNLABELED from small_text.data.datasets import is_multi_label from small_text.data.datasets i...
ds.is_multi_label)
added
1e93ec7a29621e4994b49f8bfb5a28bd7c432679cd14578045aed6d5ed3745a0
self.assertFalse|test_init|import unittest import numpy as np from parameterized import parameterized_class from unittest import mock from numpy.testing import assert_array_equal from scipy.sparse import csr_matrix from small_text.base import LABEL_UNLABELED from small_text.data.datasets import is_multi_label from smal...
null
null
null
webis-de/small-text
train
104
ea801dfcafe6f0b884ffd27c163907129b9a4f71
train
tests/unit/small_text/integrations/pytorch/classifiers/test_kimcnn.py
train
webis-de/small-text:tests/unit/small_text/integrations/pytorch/classifiers/test_kimcnn.py
194
8
self.assertEqual
test_predict_proba_on_empty_data
import unittest import pytest import numpy as np from unittest.mock import patch from small_text.base import LABEL_UNLABELED from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from small_text.training.metrics import Metric from small_text.training.early_stopping import EarlyStopping, EarlySto...
proba.shape[0])
added
1b7562719bfbeb7f843c99dd7ce3529d8bb4ad952b8500358922e07ea7376475
self.assertEqual|test_predict_proba_on_empty_data|import unittest import pytest import numpy as np from unittest.mock import patch from small_text.base import LABEL_UNLABELED from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from small_text.training.metrics import Metric from small_text.traini...
null
null
null
webis-de/small-text
train
104
ea801dfcafe6f0b884ffd27c163907129b9a4f71
train
tests/unit/small_text/integrations/pytorch/test_datasets.py
val
webis-de/small-text:tests/unit/small_text/integrations/pytorch/test_datasets.py
114
8
self.assertEqual
test_get_features
import unittest import pytest import numpy as np from abc import abstractmethod from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.data.exceptions import UnsupportedOperationExcept...
len(ds.x))
added
6d7827331deb248a4cd2eabe396a35959d810105da25319aa6b98bd30ba4cdcc
self.assertEqual|test_get_features|import unittest import pytest import numpy as np from abc import abstractmethod from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.data.exceptions im...
null
null
null
webis-de/small-text
train
104
ea801dfcafe6f0b884ffd27c163907129b9a4f71
train
tests/unit/small_text/integrations/pytorch/test_datasets.py
val
webis-de/small-text:tests/unit/small_text/integrations/pytorch/test_datasets.py
340
8
self.assertEqual
test_get_dataset
import unittest import pytest import numpy as np from abc import abstractmethod from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.data.exceptions import UnsupportedOperationExcept...
dataset_view.dataset)
added
8897ee18e86ae1be23b139ce0e4744b662114a50e92bef29f0e59d20a60e6fa3
self.assertEqual|test_get_dataset|import unittest import pytest import numpy as np from abc import abstractmethod from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.data.exceptions imp...
null
null
null
webis-de/small-text
train
104
ea801dfcafe6f0b884ffd27c163907129b9a4f71
train
tests/unit/small_text/integrations/transformers/classifiers/test_classification.py
train
webis-de/small-text:tests/unit/small_text/integrations/transformers/classifiers/test_classification.py
193
12
self.assertEqual
test_fit_with_validation_set
import unittest import pytest import numpy as np from unittest.mock import patch from small_text.base import LABEL_UNLABELED from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from small_text.training.early_stopping import EarlyStopping, EarlyStoppingOrCondition from small_text.training.metr...
len(call_args[1]))
added
c2c7c326d4999857a927843e8779591b2babe7f0dd9000b2c19d5bedce4c9234
self.assertEqual|test_fit_with_validation_set|import unittest import pytest import numpy as np from unittest.mock import patch from small_text.base import LABEL_UNLABELED from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from small_text.training.early_stopping import EarlyStopping, EarlyStoppi...
null
null
null
webis-de/small-text
train
104
ea801dfcafe6f0b884ffd27c163907129b9a4f71
train
tests/unit/small_text/integrations/transformers/classifiers/test_classification.py
train
webis-de/small-text:tests/unit/small_text/integrations/transformers/classifiers/test_classification.py
204
12
self.assertIsNotNone
test_fit_with_class_weighting
import unittest import pytest import numpy as np from unittest.mock import patch from small_text.base import LABEL_UNLABELED from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from small_text.training.early_stopping import EarlyStopping, EarlyStoppingOrCondition from small_text.training.metr...
classifier.class_weights_)
added
654fbb9db1cd391d8965f0ecc647777b696e48e18f2195a0fa891c5ffd365952
self.assertIsNotNone|test_fit_with_class_weighting|import unittest import pytest import numpy as np from unittest.mock import patch from small_text.base import LABEL_UNLABELED from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from small_text.training.early_stopping import EarlyStopping, EarlyS...
null
null
null
webis-de/small-text
train
104
ea801dfcafe6f0b884ffd27c163907129b9a4f71
train
tests/unit/small_text/integrations/transformers/test_datasets.py
train
webis-de/small-text:tests/unit/small_text/integrations/transformers/test_datasets.py
126
12
self.assertEqual
test_get_labels
import unittest import pytest import numpy as np from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.integrations.pytorch.datasets import PytorchDatasetView from small_text.integrat...
ds.y.shape[0])
added
0c9d456cb0723ca21d408a7f134180ddadec3f5e4e8d6cb14ec764d74fef6641
self.assertEqual|test_get_labels|import unittest import pytest import numpy as np from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.integrations.pytorch.datasets import PytorchDataset...
null
null
null
webis-de/small-text
train
104
ea801dfcafe6f0b884ffd27c163907129b9a4f71
train
tests/unit/small_text/utils/test_annotations.py
train
webis-de/small-text:tests/unit/small_text/utils/test_annotations.py
30
13
self.assertRaisesRegex
test_deprecated_invalid_usage
import unittest from packaging import version from unittest.mock import patch from small_text.utils.annotations import ( deprecated, experimental, DeprecationError, ExperimentalWarning ) class DeprecationUtilsTest(unittest.TestCase): def test_deprecated_invalid_target(self): with self.a...
ValueError, r'Keyword argument \'deprecated_in\' must be set.')
added
dc843ac060d310daafb7cd7e0663df82422adb8e7555ec020a02a98c8ec81e15
self.assertRaisesRegex|test_deprecated_invalid_usage|import unittest from packaging import version from unittest.mock import patch from small_text.utils.annotations import ( deprecated, experimental, DeprecationError, ExperimentalWarning ) class DeprecationUtilsTest(unittest.TestCase): def test_deprecated_invalid_targe...
null
null
null
webis-de/small-text
train
105
78683d4e62be77d80f1bb0bbee980eddc367fa36
train
tests/integration/small_text/query_strategies/test_query_strategies.py
train
webis-de/small-text:tests/integration/small_text/query_strategies/test_query_strategies.py
154
8
assert_*
test_normalize
import unittest import pytest import numpy as np from unittest.mock import Mock, patch from numpy.testing import assert_array_equal from sklearn.base import clone from sklearn.preprocessing import normalize from small_text.query_strategies.exceptions import EmptyPoolException from small_text.classifiers import Conf...
normalize_spy.call_args[0][0])
modified
c51ab15a5f3609c22a04c1cea32e1e4abc856687e2e0d58fdcfa1ff3a6211f53
assert_*|test_normalize|import unittest import pytest import numpy as np from unittest.mock import Mock, patch from numpy.testing import assert_array_equal from sklearn.base import clone from sklearn.preprocessing import normalize from small_text.query_strategies.exceptions import EmptyPoolException from small_text.cla...
normalize_spy.call_args[0][0])
153
8
webis-de/small-text
train
105
78683d4e62be77d80f1bb0bbee980eddc367fa36
train
tests/integration/small_text/query_strategies/test_query_strategies.py
train
webis-de/small-text:tests/integration/small_text/query_strategies/test_query_strategies.py
206
8
assert_*
test_query
import unittest import pytest import numpy as np from unittest.mock import Mock, patch from numpy.testing import assert_array_equal from sklearn.base import clone from sklearn.preprocessing import normalize from small_text.query_strategies.exceptions import EmptyPoolException from small_text.classifiers import Conf...
get_subset_indices_spy.call_args[0][3])
modified
4daefc0bac01314deb87828ba78d7b850ab78afab2a961f75660b201a442f53d
assert_*|test_query|import unittest import pytest import numpy as np from unittest.mock import Mock, patch from numpy.testing import assert_array_equal from sklearn.base import clone from sklearn.preprocessing import normalize from small_text.query_strategies.exceptions import EmptyPoolException from small_text.classif...
get_subset_indices_spy.call_args[0][3])
205
8
webis-de/small-text
train
105
78683d4e62be77d80f1bb0bbee980eddc367fa36
train
tests/integration/small_text/query_strategies/test_query_strategies.py
train
webis-de/small-text:tests/integration/small_text/query_strategies/test_query_strategies.py
248
8
self.assertEqual
test_initialize_index_default_hnsw_kwargs
import unittest import pytest import numpy as np from unittest.mock import Mock, patch from numpy.testing import assert_array_equal from sklearn.base import clone from sklearn.preprocessing import normalize from small_text.query_strategies.exceptions import EmptyPoolException from small_text.classifiers import Conf...
index.space)
modified
f1fde644e0fe054cfc530d2cd74ef4c3622c843c2ced4c94cf8d4b1ec710ea0b
self.assertEqual|test_initialize_index_default_hnsw_kwargs|import unittest import pytest import numpy as np from unittest.mock import Mock, patch from numpy.testing import assert_array_equal from sklearn.base import clone from sklearn.preprocessing import normalize from small_text.query_strategies.exceptions import Emp...
index.space)
247
8
webis-de/small-text
train
105
78683d4e62be77d80f1bb0bbee980eddc367fa36
train
tests/integration/small_text/query_strategies/test_query_strategies.py
train
webis-de/small-text:tests/integration/small_text/query_strategies/test_query_strategies.py
267
8
self.assertEqual
test_initialize_index_custom_hnsw_kwargs
import unittest import pytest import numpy as np from unittest.mock import Mock, patch from numpy.testing import assert_array_equal from sklearn.base import clone from sklearn.preprocessing import normalize from small_text.query_strategies.exceptions import EmptyPoolException from small_text.classifiers import Conf...
index.ef_construction)
modified
ac090e8ca3b53d6dbf836acd31c964710b6f64276cc331fa39fe541c500dc451
self.assertEqual|test_initialize_index_custom_hnsw_kwargs|import unittest import pytest import numpy as np from unittest.mock import Mock, patch from numpy.testing import assert_array_equal from sklearn.base import clone from sklearn.preprocessing import normalize from small_text.query_strategies.exceptions import Empt...
index.ef_construction)
266
8
webis-de/small-text
train
106
eb9f8b3906bb0c633eb7b9c6c57a13e70ce7dbdc
train
tests/unit/small_text/stopping_criteria/test_change.py
train
webis-de/small-text:tests/unit/small_text/stopping_criteria/test_change.py
14
8
self.assertEqual
test_init
import unittest import numpy as np from numpy.testing import assert_array_equal from small_text.stopping_criteria.change import ClassificationChange class ClassificationChangeTest(unittest.TestCase): def test_init(self): stopping_criterion = ClassificationChange(2) self.assertEqual(2,
stopping_criterion.num_classes)
added
b3c5159fd935c3f5cbe773e47cdef64a1f17317202889dbcc2b7d20ecf9e7bd5
self.assertEqual|test_init|import unittest import numpy as np from numpy.testing import assert_array_equal from small_text.stopping_criteria.change import ClassificationChange class ClassificationChangeTest(unittest.TestCase): def test_init(self): stopping_criterion = ClassificationChange(2) self.assertEqual(2,
null
null
null
webis-de/small-text
train
106
eb9f8b3906bb0c633eb7b9c6c57a13e70ce7dbdc
train
tests/unit/small_text/stopping_criteria/test_change.py
train
webis-de/small-text:tests/unit/small_text/stopping_criteria/test_change.py
53
8
assert_*
test_second_stop_call
import unittest import numpy as np from numpy.testing import assert_array_equal from small_text.stopping_criteria.change import ClassificationChange class ClassificationChangeTest(unittest.TestCase): def test_init(self): stopping_criterion = ClassificationChange(2) self.assertEqual(2, stopping...
stopping_criterion.last_predictions)
added
0ec9615f84bcf310879a9409fa6db2b67f0e019fea5abe1e5ac4d35fd9cd19fa
assert_*|test_second_stop_call|import unittest import numpy as np from numpy.testing import assert_array_equal from small_text.stopping_criteria.change import ClassificationChange class ClassificationChangeTest(unittest.TestCase): def test_init(self): stopping_criterion = ClassificationChange(2) self.assertEqual(2, sto...
null
null
null
webis-de/small-text
train
106
eb9f8b3906bb0c633eb7b9c6c57a13e70ce7dbdc
train
tests/unit/small_text/stopping_criteria/test_change.py
train
webis-de/small-text:tests/unit/small_text/stopping_criteria/test_change.py
66
8
self.assertTrue
test_stop
import unittest import numpy as np from numpy.testing import assert_array_equal from small_text.stopping_criteria.change import ClassificationChange class ClassificationChangeTest(unittest.TestCase): def test_init(self): stopping_criterion = ClassificationChange(2) self.assertEqual(2, stopping...
stopping_criterion.stop(predictions=fourth_predictions))
added
1291716c85e55f79edc36e40bb8d7412a7dd4adb3d57dabc8389bff1e9534bc8
self.assertTrue|test_stop|import unittest import numpy as np from numpy.testing import assert_array_equal from small_text.stopping_criteria.change import ClassificationChange class ClassificationChangeTest(unittest.TestCase): def test_init(self): stopping_criterion = ClassificationChange(2) self.assertEqual(2, stopping...
null
null
null
webis-de/small-text
train
106
eb9f8b3906bb0c633eb7b9c6c57a13e70ce7dbdc
train
tests/unit/small_text/stopping_criteria/test_change.py
train
webis-de/small-text:tests/unit/small_text/stopping_criteria/test_change.py
82
13
self.assertRaises
test_stop_with_prediction_size_changing
import unittest import numpy as np from numpy.testing import assert_array_equal from small_text.stopping_criteria.change import ClassificationChange class ClassificationChangeTest(unittest.TestCase): def test_init(self): stopping_criterion = ClassificationChange(2) self.assertEqual(2, stopping...
ValueError)
added
c4b730cc8e0d4afe17c7c5b83197e2bab34b7fb0511eb2563e423eb5bfbaa98a
self.assertRaises|test_stop_with_prediction_size_changing|import unittest import numpy as np from numpy.testing import assert_array_equal from small_text.stopping_criteria.change import ClassificationChange class ClassificationChangeTest(unittest.TestCase): def test_init(self): stopping_criterion = ClassificationChange...
null
null
null
webis-de/small-text
train
107
2e5e50507bfdee92ee82a39e9a898d6a6bc7e857
train
tests/unit/small_text/integrations/pytorch/test_datasets.py
val
webis-de/small-text:tests/unit/small_text/integrations/pytorch/test_datasets.py
719
8
assert
import unittest import pytest import numpy as np from abc import abstractmethod from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.data.exceptions import UnsupportedOperationExcept...
self.NUM_SAMPLES_VIEW_OUTER
modified
9750fea9fc12648226e92374b17e4ec5cf79873b23b9066508366e0f375ad5d6
assert||import unittest import pytest import numpy as np from abc import abstractmethod from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.data.exceptions import UnsupportedOperationEx...
self.NUM_SAMPLES_VIEW_OUTER
718
8
webis-de/small-text
train
107
2e5e50507bfdee92ee82a39e9a898d6a6bc7e857
train
tests/unit/small_text/integrations/pytorch/test_datasets.py
val
webis-de/small-text:tests/unit/small_text/integrations/pytorch/test_datasets.py
745
8
assert
import unittest import pytest import numpy as np from abc import abstractmethod from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.data.exceptions import UnsupportedOperationExcept...
self.NUM_SAMPLES_VIEW_INNER
modified
9a393760b39e4eb3cfa83eae0ae4885defc544f6c2d02490cb1926789cfea022
assert||import unittest import pytest import numpy as np from abc import abstractmethod from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.data.exceptions import UnsupportedOperationEx...
self.NUM_SAMPLES_VIEW_INNER
744
8
webis-de/small-text
train
108
34d90ea1d5a3a3994178150e0befd26c7232afcd
train
tests/integration/small_text/integrations/transformers/test_serialization.py
test
webis-de/small-text:tests/integration/small_text/integrations/transformers/test_serialization.py
32
8
self.assertFalse
test_and_load_with_file_str
import unittest import tempfile import pytest import numpy as np from numpy.testing import assert_array_equal from small_text.active_learner import PoolBasedActiveLearner from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from small_text.query_strategies import RandomSampling from small_te...
dataset.x[TransformersDataset.INDEX_TEXT].is_cuda)
modified
34066ba46d58a77fd5b0672c15308c2ea883d2ddc72fd86bbbe6be336127efeb
self.assertFalse|test_and_load_with_file_str|import unittest import tempfile import pytest import numpy as np from numpy.testing import assert_array_equal from small_text.active_learner import PoolBasedActiveLearner from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from small_text.query_strate...
dataset.x[TransformersDataset.INDEX_TEXT].is_cuda)
32
8
webis-de/small-text
train
108
34d90ea1d5a3a3994178150e0befd26c7232afcd
train
tests/integration/small_text/integrations/transformers/test_serialization.py
test
webis-de/small-text:tests/integration/small_text/integrations/transformers/test_serialization.py
57
12
self.assertIsNotNone
test_and_load_with_file_str
import unittest import tempfile import pytest import numpy as np from numpy.testing import assert_array_equal from small_text.active_learner import PoolBasedActiveLearner from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from small_text.query_strategies import RandomSampling from small_te...
active_learner)
modified
5db978ad3a3148667047c52d5b5c53c59ba8d759d5fce1f124fd681a95c0a10b
self.assertIsNotNone|test_and_load_with_file_str|import unittest import tempfile import pytest import numpy as np from numpy.testing import assert_array_equal from small_text.active_learner import PoolBasedActiveLearner from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from small_text.query_st...
active_learner)
57
12
webis-de/small-text
train
108
34d90ea1d5a3a3994178150e0befd26c7232afcd
train
tests/integration/small_text/integrations/transformers/test_serialization.py
test
webis-de/small-text:tests/integration/small_text/integrations/transformers/test_serialization.py
63
16
assert_*
test_and_load_with_file_str
import unittest import tempfile import pytest import numpy as np from numpy.testing import assert_array_equal from small_text.active_learner import PoolBasedActiveLearner from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from small_text.query_strategies import RandomSampling from small_te...
weights_after[i].cpu().detach().numpy())
modified
d56cd6ce562c3b12c340e002b9a0c4cd1544df409f49828683ce8d202248eae5
assert_*|test_and_load_with_file_str|import unittest import tempfile import pytest import numpy as np from numpy.testing import assert_array_equal from small_text.active_learner import PoolBasedActiveLearner from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from small_text.query_strategies imp...
weights_after[i].cpu().detach().numpy())
63
16
webis-de/small-text
train
108
34d90ea1d5a3a3994178150e0befd26c7232afcd
train
tests/integration/small_text/integrations/transformers/test_serialization.py
test
webis-de/small-text:tests/integration/small_text/integrations/transformers/test_serialization.py
66
12
self.assertEqual
test_and_load_with_file_str
import unittest import tempfile import pytest import numpy as np from numpy.testing import assert_array_equal from small_text.active_learner import PoolBasedActiveLearner from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from small_text.query_strategies import RandomSampling from small_te...
active_learner.query_strategy.__class__)
modified
40463cf1f6414704b9741e3f49c94a9f414eef94acc7045e034c06268c462ef2
self.assertEqual|test_and_load_with_file_str|import unittest import tempfile import pytest import numpy as np from numpy.testing import assert_array_equal from small_text.active_learner import PoolBasedActiveLearner from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from small_text.query_strate...
active_learner.query_strategy.__class__)
66
12
webis-de/small-text
train
109
1ea924069963cb52bdf06312dc6d025d9842fb83
train
tests/unit/small_text/stopping_criteria/test_uncertainty.py
train
webis-de/small-text:tests/unit/small_text/stopping_criteria/test_uncertainty.py
13
8
self.assertEqual
test_init
import unittest import numpy as np from small_text.stopping_criteria.uncertainty import OverallUncertainty class OverallUncertaintyTest(unittest.TestCase): def test_init(self): stopping_criterion = OverallUncertainty(2) self.assertEqual(2, stopping_criterion.num_classes) self.assertEqua...
stopping_criterion.threshold)
added
0677eb7023cd5530d043c6fda87e72bb8b767dbd63042f6d86c033cf561a4420
self.assertEqual|test_init|import unittest import numpy as np from small_text.stopping_criteria.uncertainty import OverallUncertainty class OverallUncertaintyTest(unittest.TestCase): def test_init(self): stopping_criterion = OverallUncertainty(2) self.assertEqual(2, stopping_criterion.num_classes) self.assertEqual(0.05...
null
null
null
webis-de/small-text
train
109
1ea924069963cb52bdf06312dc6d025d9842fb83
train
tests/unit/small_text/stopping_criteria/test_uncertainty.py
train
webis-de/small-text:tests/unit/small_text/stopping_criteria/test_uncertainty.py
22
8
self.assertEqual
test_init_with_kwargs
import unittest import numpy as np from small_text.stopping_criteria.uncertainty import OverallUncertainty class OverallUncertaintyTest(unittest.TestCase): def test_init(self): stopping_criterion = OverallUncertainty(2) self.assertEqual(2, stopping_criterion.num_classes) self.assertEqua...
stopping_criterion.num_classes)
added
e1ec7961e6a767075f08b1743bbef5546853a45cff3523aea49ab4a923a3e83a
self.assertEqual|test_init_with_kwargs|import unittest import numpy as np from small_text.stopping_criteria.uncertainty import OverallUncertainty class OverallUncertaintyTest(unittest.TestCase): def test_init(self): stopping_criterion = OverallUncertainty(2) self.assertEqual(2, stopping_criterion.num_classes) self.asse...
null
null
null
webis-de/small-text
train
109
1ea924069963cb52bdf06312dc6d025d9842fb83
train
tests/unit/small_text/stopping_criteria/test_uncertainty.py
train
webis-de/small-text:tests/unit/small_text/stopping_criteria/test_uncertainty.py
26
13
self.assertRaisesRegex
test_init_with_invalid_threshold
import unittest import numpy as np from small_text.stopping_criteria.uncertainty import OverallUncertainty class OverallUncertaintyTest(unittest.TestCase): def test_init(self): stopping_criterion = OverallUncertainty(2) self.assertEqual(2, stopping_criterion.num_classes) self.assertEqua...
ValueError, 'Threshold must be')
added
8744488e0ae7ff4e2b9805badcb8c9725e46f1f3984b203d897a72bfdfbd6195
self.assertRaisesRegex|test_init_with_invalid_threshold|import unittest import numpy as np from small_text.stopping_criteria.uncertainty import OverallUncertainty class OverallUncertaintyTest(unittest.TestCase): def test_init(self): stopping_criterion = OverallUncertainty(2) self.assertEqual(2, stopping_criterion.num_c...
null
null
null
webis-de/small-text
train
109
1ea924069963cb52bdf06312dc6d025d9842fb83
train
tests/unit/small_text/stopping_criteria/test_uncertainty.py
train
webis-de/small-text:tests/unit/small_text/stopping_criteria/test_uncertainty.py
78
13
self.assertRaisesRegex
test_stop_with_proba_none
import unittest import numpy as np from small_text.stopping_criteria.uncertainty import OverallUncertainty class OverallUncertaintyTest(unittest.TestCase): def test_init(self): stopping_criterion = OverallUncertainty(2) self.assertEqual(2, stopping_criterion.num_classes) self.assertEqua...
ValueError, 'indices_stopping must not be None')
added
a2a0903ccdef129a5f153f0be6abceabfdd9bdef5c86e825eedc787efc006305
self.assertRaisesRegex|test_stop_with_proba_none|import unittest import numpy as np from small_text.stopping_criteria.uncertainty import OverallUncertainty class OverallUncertaintyTest(unittest.TestCase): def test_init(self): stopping_criterion = OverallUncertainty(2) self.assertEqual(2, stopping_criterion.num_classes)...
null
null
null
webis-de/small-text
train
110
dd5892974f3a2ab4d6e5ec92e9945d325e887ca2
train
tests/unit/small_text/integrations/pytorch/classifiers/test_base.py
train
webis-de/small-text:tests/unit/small_text/integrations/pytorch/classifiers/test_base.py
59
8
self.assertFalse
test_init_with_cuda_available_and_device
import pytest import unittest from unittest.mock import patch from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from small_text.training.model_selection import ModelSelection, NoopModelSelection from tests.utils.datasets import random_text_classification_dataset try: import torch fr...
clf.multi_label)
modified
e5e41af14ebf47fb084684922c457af63bbec3f9714120d6379f985919388112
self.assertFalse|test_init_with_cuda_available_and_device|import pytest import unittest from unittest.mock import patch from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from small_text.training.model_selection import ModelSelection, NoopModelSelection from tests.utils.datasets import random_t...
clf.multi_label)
59
8
webis-de/small-text
train
110
dd5892974f3a2ab4d6e5ec92e9945d325e887ca2
train
tests/unit/small_text/integrations/pytorch/classifiers/test_base.py
train
webis-de/small-text:tests/unit/small_text/integrations/pytorch/classifiers/test_base.py
83
8
self.assertTrue
test_get_default_criterion_binary
import pytest import unittest from unittest.mock import patch from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from small_text.training.model_selection import ModelSelection, NoopModelSelection from tests.utils.datasets import random_text_classification_dataset try: import torch fr...
isinstance(loss, BCEWithLogitsLoss))
modified
59690d1ff9bf234ab538133fd23121b501e43466be02ef07d3ed1249bd7fca78
self.assertTrue|test_get_default_criterion_binary|import pytest import unittest from unittest.mock import patch from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from small_text.training.model_selection import ModelSelection, NoopModelSelection from tests.utils.datasets import random_text_clas...
isinstance(loss, BCEWithLogitsLoss))
83
8
webis-de/small-text
train
110
dd5892974f3a2ab4d6e5ec92e9945d325e887ca2
train
tests/unit/small_text/integrations/pytorch/classifiers/test_base.py
train
webis-de/small-text:tests/unit/small_text/integrations/pytorch/classifiers/test_base.py
105
8
self.assertTrue
test_get_default_criterion_multilabel
import pytest import unittest from unittest.mock import patch from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from small_text.training.model_selection import ModelSelection, NoopModelSelection from tests.utils.datasets import random_text_classification_dataset try: import torch fr...
isinstance(loss, BCEWithLogitsLoss))
modified
c63d226b68bad492261db101249e2d8bd5d5719d8d1acac0dca3eab30521af7c
self.assertTrue|test_get_default_criterion_multilabel|import pytest import unittest from unittest.mock import patch from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from small_text.training.model_selection import ModelSelection, NoopModelSelection from tests.utils.datasets import random_text_...
isinstance(loss, BCEWithLogitsLoss))
105
8
webis-de/small-text
train
110
dd5892974f3a2ab4d6e5ec92e9945d325e887ca2
train
tests/unit/small_text/integrations/pytorch/classifiers/test_base.py
train
webis-de/small-text:tests/unit/small_text/integrations/pytorch/classifiers/test_base.py
232
8
self.assertEqual
test_sum_up_accuracy
import pytest import unittest from unittest.mock import patch from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from small_text.training.model_selection import ModelSelection, NoopModelSelection from tests.utils.datasets import random_text_classification_dataset try: import torch fr...
accuracy)
modified
f8fc5916cb9ebd085d7af728ce278faaa20550f7ea59e2306777115646a963f5
self.assertEqual|test_sum_up_accuracy|import pytest import unittest from unittest.mock import patch from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from small_text.training.model_selection import ModelSelection, NoopModelSelection from tests.utils.datasets import random_text_classification_d...
accuracy)
232
8
webis-de/small-text
train
110
dd5892974f3a2ab4d6e5ec92e9945d325e887ca2
train
tests/unit/small_text/integrations/pytorch/test_utils.py
train
webis-de/small-text:tests/unit/small_text/integrations/pytorch/test_utils.py
23
13
self.assertRaises
test_assert_layer_exists_fail
import unittest import pytest from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: from small_text.integrations.pytorch.models.kimcnn import KimCNN from small_text.integrations.pytorch.utils.misc import _assert_layer_exists except PytorchNotFoundError: pass @pytest.mark.pyto...
ValueError)
modified
7f47d3d60a032f29941b48d8632971eace84d6b08b7409d67d065369fbfbf262
self.assertRaises|test_assert_layer_exists_fail|import unittest import pytest from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: from small_text.integrations.pytorch.models.kimcnn import KimCNN from small_text.integrations.pytorch.utils.misc import _assert_layer_exists except PytorchNotFou...
ValueError)
23
13
webis-de/small-text
train
110
dd5892974f3a2ab4d6e5ec92e9945d325e887ca2
train
tests/unit/small_text/integrations/pytorch/utils/test_loss.py
val
webis-de/small-text:tests/unit/small_text/integrations/pytorch/utils/test_loss.py
26
8
self.assertEqual
test_loss_fct
import unittest import pytest from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from torch.nn import BCEWithLogitsLoss from small_text.integrations.pytorch.utils.loss import _LossAdapter2DTo1D except (ImportError, PytorchNotFoundError): pass @pytest.mark....
len(loss.shape))
modified
18e28960ea1c3f6f0737a198a86f0640f273efec91823296cfb4f9758a8c4a5d
self.assertEqual|test_loss_fct|import unittest import pytest from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from torch.nn import BCEWithLogitsLoss from small_text.integrations.pytorch.utils.loss import _LossAdapter2DTo1D except (ImportError, PytorchNotFoundError): pass @py...
len(loss.shape))
26
8
webis-de/small-text
train
110
dd5892974f3a2ab4d6e5ec92e9945d325e887ca2
train
tests/unit/small_text/integrations/pytorch/utils/test_loss.py
val
webis-de/small-text:tests/unit/small_text/integrations/pytorch/utils/test_loss.py
27
8
self.assertEqual
test_loss_fct
import unittest import pytest from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from torch.nn import BCEWithLogitsLoss from small_text.integrations.pytorch.utils.loss import _LossAdapter2DTo1D except (ImportError, PytorchNotFoundError): pass @pytest.mark....
loss.shape[0])
modified
338b91e3f512d542822e502ca358d643f2184c63450e9c31b7489f56ef02fdf6
self.assertEqual|test_loss_fct|import unittest import pytest from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from torch.nn import BCEWithLogitsLoss from small_text.integrations.pytorch.utils.loss import _LossAdapter2DTo1D except (ImportError, PytorchNotFoundError): pass @py...
loss.shape[0])
27
8
webis-de/small-text
train
111
ae783789b3119ef25ef717a04d43adb0932141a1
train
tests/unit/small_text/data/test_datasets.py
train
webis-de/small-text:tests/unit/small_text/data/test_datasets.py
362
8
self.assertEqual
test_init_with_numpy_slice
import unittest import numpy as np from parameterized import parameterized_class from unittest import mock from numpy.testing import assert_array_equal from scipy.sparse import csr_matrix from small_text.base import LABEL_UNLABELED from small_text.data.datasets import is_multi_label from small_text.data.datasets i...
len(dataset_view))
added
4ff0a73dc36e4d20283c363dbaa73ca4741713b1f389122161f838888d8f9d9e
self.assertEqual|test_init_with_numpy_slice|import unittest import numpy as np from parameterized import parameterized_class from unittest import mock from numpy.testing import assert_array_equal from scipy.sparse import csr_matrix from small_text.base import LABEL_UNLABELED from small_text.data.datasets import is_mult...
null
null
null
webis-de/small-text
train
111
ae783789b3119ef25ef717a04d43adb0932141a1
train
tests/unit/small_text/data/test_datasets.py
train
webis-de/small-text:tests/unit/small_text/data/test_datasets.py
408
8
assert_*
test_get_target_labels
import unittest import numpy as np from parameterized import parameterized_class from unittest import mock from numpy.testing import assert_array_equal from scipy.sparse import csr_matrix from small_text.base import LABEL_UNLABELED from small_text.data.datasets import is_multi_label from small_text.data.datasets i...
dataset_view.target_labels)
added
8ad2ecf44180740a41ce2c436b30878b1ddf78a1806d3d44f2d4cae4a4f7fa3c
assert_*|test_get_target_labels|import unittest import numpy as np from parameterized import parameterized_class from unittest import mock from numpy.testing import assert_array_equal from scipy.sparse import csr_matrix from small_text.base import LABEL_UNLABELED from small_text.data.datasets import is_multi_label from...
null
null
null
webis-de/small-text
train
111
ae783789b3119ef25ef717a04d43adb0932141a1
train
tests/unit/small_text/data/test_datasets.py
train
webis-de/small-text:tests/unit/small_text/data/test_datasets.py
736
8
self.assertEqual
test_split_data_balanced_return_indices
import unittest import numpy as np from parameterized import parameterized_class from unittest import mock from numpy.testing import assert_array_equal from scipy.sparse import csr_matrix from small_text.base import LABEL_UNLABELED from small_text.data.datasets import is_multi_label from small_text.data.datasets i...
indices_valid.shape[0])
added
22026708f799f1556d835950866647e9b3fbd0590f1ad51b294bb4e93e811ddb
self.assertEqual|test_split_data_balanced_return_indices|import unittest import numpy as np from parameterized import parameterized_class from unittest import mock from numpy.testing import assert_array_equal from scipy.sparse import csr_matrix from small_text.base import LABEL_UNLABELED from small_text.data.datasets i...
null
null
null
webis-de/small-text
train
111
ae783789b3119ef25ef717a04d43adb0932141a1
train
tests/unit/small_text/integrations/pytorch/test_datasets.py
val
webis-de/small-text:tests/unit/small_text/integrations/pytorch/test_datasets.py
345
8
self.assertEqual
test_get_dataset
import unittest import pytest import numpy as np from abc import abstractmethod from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.data.exceptions import UnsupportedOperationExcept...
dataset_view.dataset)
added
00fdd5d385a425d23811ea39b7e94044cd85da0da57f354735c9a949d12636e1
self.assertEqual|test_get_dataset|import unittest import pytest import numpy as np from abc import abstractmethod from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.data.exceptions imp...
null
null
null
webis-de/small-text
train
111
ae783789b3119ef25ef717a04d43adb0932141a1
train
tests/unit/small_text/integrations/pytorch/test_datasets.py
val
webis-de/small-text:tests/unit/small_text/integrations/pytorch/test_datasets.py
484
8
self.assertEqual
test_indexing_list_index
import unittest import pytest import numpy as np from abc import abstractmethod from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.data.exceptions import UnsupportedOperationExcept...
len(result))
added
f78afbaf67bcdad1025b9e65abca151db241ceaa774a789fd392fa4eeeb1cdee
self.assertEqual|test_indexing_list_index|import unittest import pytest import numpy as np from abc import abstractmethod from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.data.except...
null
null
null
webis-de/small-text
train
111
ae783789b3119ef25ef717a04d43adb0932141a1
train
tests/unit/small_text/integrations/transformers/test_datasets.py
train
webis-de/small-text:tests/unit/small_text/integrations/transformers/test_datasets.py
138
12
assert_*
test_set_labels
import unittest import pytest import numpy as np from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.integrations.pytorch.datasets import PytorchDatasetView from small_text.integrat...
ds_new.y)
modified
a34035819967f1212ba251ddd06b43b3cfc47cbad4532202337bddbe5f1a6ca2
assert_*|test_set_labels|import unittest import pytest import numpy as np from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.integrations.pytorch.datasets import PytorchDatasetView fro...
ds_new.y)
135
12
webis-de/small-text
train
111
ae783789b3119ef25ef717a04d43adb0932141a1
train
tests/unit/small_text/integrations/transformers/test_datasets.py
train
webis-de/small-text:tests/unit/small_text/integrations/transformers/test_datasets.py
177
8
assert_*
test_get_target_labels
import unittest import pytest import numpy as np from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.integrations.pytorch.datasets import PytorchDatasetView from small_text.integrat...
ds.target_labels)
added
2d94b2f45bda0a22abf546db203c1762944ef48734c59cc29e8e603d321130bd
assert_*|test_get_target_labels|import unittest import pytest import numpy as np from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.integrations.pytorch.datasets import PytorchDatasetV...
null
null
null
webis-de/small-text
train
111
ae783789b3119ef25ef717a04d43adb0932141a1
train
tests/unit/small_text/integrations/transformers/test_datasets.py
train
webis-de/small-text:tests/unit/small_text/integrations/transformers/test_datasets.py
188
13
self.assertRaisesRegex
test_set_target_labels_where_existing_labels_are_outside_of_given_set
import unittest import pytest import numpy as np from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.integrations.pytorch.datasets import PytorchDatasetView from small_text.integrat...
ValueError, 'Cannot remove existing labels')
added
38b0048d91d7e724d5606c82c455db6cc962d665c4def4dc850adac18b5c7496
self.assertRaisesRegex|test_set_target_labels_where_existing_labels_are_outside_of_given_set|import unittest import pytest import numpy as np from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from sm...
null
null
null
webis-de/small-text
train
112
30464e8a3a5c9b9da1866995b92aa2ced985423d
train
tests/unit/small_text/integrations/pytorch/test_datasets.py
val
webis-de/small-text:tests/unit/small_text/integrations/pytorch/test_datasets.py
57
8
self.assertIsNotNone
test_init
import unittest import pytest import numpy as np from abc import abstractmethod from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.data.exceptions import UnsupportedOperationExcept...
ds.vocab)
modified
3c70614345efc3f5e2d2c927858ecc2c2d69728a872a9a92a0e27ca5d5d1eb9f
self.assertIsNotNone|test_init|import unittest import pytest import numpy as np from abc import abstractmethod from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.data.exceptions import...
ds.vocab)
56
8
webis-de/small-text
train
112
30464e8a3a5c9b9da1866995b92aa2ced985423d
train
tests/unit/small_text/integrations/pytorch/test_datasets.py
val
webis-de/small-text:tests/unit/small_text/integrations/pytorch/test_datasets.py
146
12
self.assertTrue
test_get_labels
import unittest import pytest import numpy as np from abc import abstractmethod from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.data.exceptions import UnsupportedOperationExcept...
isinstance(ds.y, np.ndarray))
modified
dc9329b9351db092ca41c2ba7154678cccd04c0609460ab8670a0dfde23cdb40
self.assertTrue|test_get_labels|import unittest import pytest import numpy as np from abc import abstractmethod from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.data.exceptions impor...
isinstance(ds.y, np.ndarray))
145
12
webis-de/small-text
train
112
30464e8a3a5c9b9da1866995b92aa2ced985423d
train
tests/unit/small_text/integrations/pytorch/test_datasets.py
val
webis-de/small-text:tests/unit/small_text/integrations/pytorch/test_datasets.py
345
8
self.assertEqual
test_init_with_numpy_slice
import unittest import pytest import numpy as np from abc import abstractmethod from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.data.exceptions import UnsupportedOperationExcept...
len(dataset_view))
added
bb871873a828dd73593800ebaed3dd09094adef86219f07c0c0a97e6c1351eb0
self.assertEqual|test_init_with_numpy_slice|import unittest import pytest import numpy as np from abc import abstractmethod from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.data.exce...
null
null
null
webis-de/small-text
train
112
30464e8a3a5c9b9da1866995b92aa2ced985423d
train
tests/unit/small_text/integrations/pytorch/test_datasets.py
val
webis-de/small-text:tests/unit/small_text/integrations/pytorch/test_datasets.py
356
8
assert_*
test_get_x
import unittest import pytest import numpy as np from abc import abstractmethod from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.data.exceptions import UnsupportedOperationExcept...
dataset_view.x)
added
eaed0eb77ea78cba1c175e5b58c50daed91b2b1fe884b179b176f00f6b0d234a
assert_*|test_get_x|import unittest import pytest import numpy as np from abc import abstractmethod from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.data.exceptions import Unsupporte...
null
null
null
webis-de/small-text
train
112
30464e8a3a5c9b9da1866995b92aa2ced985423d
train
tests/unit/small_text/integrations/transformers/test_datasets.py
train
webis-de/small-text:tests/unit/small_text/integrations/transformers/test_datasets.py
114
8
self.assertEqual
test_set_features
import unittest import pytest import numpy as np from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.integrations.pytorch.datasets import PytorchDatasetView from small_text.integrat...
len(ds.x))
modified
6f1a4f1a959b73e9a0445b13cc96d1c0a5714d4ae041865aa5f77131df60a3b1
self.assertEqual|test_set_features|import unittest import pytest import numpy as np from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.integrations.pytorch.datasets import PytorchDatas...
len(ds.x))
113
8
webis-de/small-text
train
112
30464e8a3a5c9b9da1866995b92aa2ced985423d
train
tests/unit/small_text/integrations/transformers/test_datasets.py
train
webis-de/small-text:tests/unit/small_text/integrations/transformers/test_datasets.py
165
13
self.assertRaisesRegex
test_set_labels_with_mismatching_data_length
import unittest import pytest import numpy as np from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.integrations.pytorch.datasets import PytorchDatasetView from small_text.integrat...
ValueError, 'Size mismatch: ')
modified
e88ef87fe5f7554761a449bd73ae35166ad750beefab18c5515446b5332102a0
self.assertRaisesRegex|test_set_labels_with_mismatching_data_length|import unittest import pytest import numpy as np from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.integrations.pyt...
ValueError, 'Size mismatch: ')
164
13
webis-de/small-text
train
112
30464e8a3a5c9b9da1866995b92aa2ced985423d
train
tests/unit/small_text/integrations/transformers/test_datasets.py
train
webis-de/small-text:tests/unit/small_text/integrations/transformers/test_datasets.py
262
8
assert_*
test_indexing_slicing
import unittest import pytest import numpy as np from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.integrations.pytorch.datasets import PytorchDatasetView from small_text.integrat...
result.x)
modified
9772efdaaa959e80a62743b5fe5226faa138a7d8028aa3b378490c0030ae38f3
assert_*|test_indexing_slicing|import unittest import pytest import numpy as np from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.integrations.pytorch.datasets import PytorchDatasetVi...
result.x)
261
8
webis-de/small-text
train
112
30464e8a3a5c9b9da1866995b92aa2ced985423d
train
tests/unit/small_text/integrations/transformers/test_datasets.py
train
webis-de/small-text:tests/unit/small_text/integrations/transformers/test_datasets.py
306
8
assert_*
_clone_test
import unittest import pytest import numpy as np from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.integrations.pytorch.datasets import PytorchDatasetView from small_text.integrat...
ds_cloned.x)
modified
97e2994f805c7ae71cb82dea97e2feaf1e65c7eb6f9329a3ce526acd69599e11
assert_*|_clone_test|import unittest import pytest import numpy as np from scipy.sparse import csr_matrix from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.base import LABEL_UNLABELED from small_text.integrations.pytorch.datasets import PytorchDatasetView from sm...
ds_cloned.x)
305
8
webis-de/small-text
train
113
f13b098137921ddc1d737ca1dcc206ce46b079f7
train
tests/unit/small_text/stopping_criteria/test_utility.py
train
webis-de/small-text:tests/unit/small_text/stopping_criteria/test_utility.py
11
8
self.assertEqual
test_init
import unittest from small_text.stopping_criteria.utility import MaxIterations class MaxIterationsTest(unittest.TestCase): def test_init(self): stopping_criterion = MaxIterations(2) self.assertEqual(2,
stopping_criterion.max_iterations)
added
d123eed365b0b29b16efaffc99856e6763ff4501f9435a45fe081651d22ecc9e
self.assertEqual|test_init|import unittest from small_text.stopping_criteria.utility import MaxIterations class MaxIterationsTest(unittest.TestCase): def test_init(self): stopping_criterion = MaxIterations(2) self.assertEqual(2,
null
null
null
webis-de/small-text
train
113
f13b098137921ddc1d737ca1dcc206ce46b079f7
train
tests/unit/small_text/stopping_criteria/test_utility.py
train
webis-de/small-text:tests/unit/small_text/stopping_criteria/test_utility.py
15
13
self.assertRaisesRegex
test_init_invalid_value
import unittest from small_text.stopping_criteria.utility import MaxIterations class MaxIterationsTest(unittest.TestCase): def test_init(self): stopping_criterion = MaxIterations(2) self.assertEqual(2, stopping_criterion.max_iterations) self.assertEqual(0, stopping_criterion.current_ite...
ValueError, 'Argument max_iterations must be')
added
00dadef8f8e4758323f9f2abb5a3b1e5860b269d419a823e535ec43298f0c1c5
self.assertRaisesRegex|test_init_invalid_value|import unittest from small_text.stopping_criteria.utility import MaxIterations class MaxIterationsTest(unittest.TestCase): def test_init(self): stopping_criterion = MaxIterations(2) self.assertEqual(2, stopping_criterion.max_iterations) self.assertEqual(0, stopping_criteri...
null
null
null
webis-de/small-text
train
113
f13b098137921ddc1d737ca1dcc206ce46b079f7
train
tests/unit/small_text/stopping_criteria/test_utility.py
train
webis-de/small-text:tests/unit/small_text/stopping_criteria/test_utility.py
25
8
self.assertFalse
test_stop
import unittest from small_text.stopping_criteria.utility import MaxIterations class MaxIterationsTest(unittest.TestCase): def test_init(self): stopping_criterion = MaxIterations(2) self.assertEqual(2, stopping_criterion.max_iterations) self.assertEqual(0, stopping_criterion.current_ite...
stopping_criterion.stop())
added
22b3e986cd662477cad46d75681977c0453d3743246f18f71d386a785a01603a
self.assertFalse|test_stop|import unittest from small_text.stopping_criteria.utility import MaxIterations class MaxIterationsTest(unittest.TestCase): def test_init(self): stopping_criterion = MaxIterations(2) self.assertEqual(2, stopping_criterion.max_iterations) self.assertEqual(0, stopping_criterion.current_iteration...
null
null
null
webis-de/small-text
train
113
f13b098137921ddc1d737ca1dcc206ce46b079f7
train
tests/unit/small_text/stopping_criteria/test_utility.py
train
webis-de/small-text:tests/unit/small_text/stopping_criteria/test_utility.py
26
8
self.assertFalse
test_stop
import unittest from small_text.stopping_criteria.utility import MaxIterations class MaxIterationsTest(unittest.TestCase): def test_init(self): stopping_criterion = MaxIterations(2) self.assertEqual(2, stopping_criterion.max_iterations) self.assertEqual(0, stopping_criterion.current_ite...
stopping_criterion.stop())
added
a1a24aad90eaff4240dab6007f2a0ade151a9385629e39d86045b2d86ee857c8
self.assertFalse|test_stop|import unittest from small_text.stopping_criteria.utility import MaxIterations class MaxIterationsTest(unittest.TestCase): def test_init(self): stopping_criterion = MaxIterations(2) self.assertEqual(2, stopping_criterion.max_iterations) self.assertEqual(0, stopping_criterion.current_iteration...
null
null
null
webis-de/small-text
train
114
67ae83a948c1391f3443abaf03dd3e2e9e81805e
train
tests/unit/small_text/training/test_model_selection.py
train
webis-de/small-text:tests/unit/small_text/training/test_model_selection.py
158
13
self.assertRaisesRegex
test_add_model_missing_metrics
import unittest from small_text.training.metrics import Metric from small_text.training.model_selection import ( ModelSelectionResult, ModelSelection, NoopModelSelection ) class ModelSelectionResultTest(unittest.TestCase): def test_init(self): model_id = '1' model_path = 'any' measur...
ValueError, 'Required measured values missing for metric "val_loss"')
added
f93ef70f0b2956d30078390bfd5f1b1d1c085cd06f9efa5c95f1eeb6d87cac07
self.assertRaisesRegex|test_add_model_missing_metrics|import unittest from small_text.training.metrics import Metric from small_text.training.model_selection import ( ModelSelectionResult, ModelSelection, NoopModelSelection ) class ModelSelectionResultTest(unittest.TestCase): def test_init(self): model_id = '1' model_p...
null
null
null
webis-de/small-text
train
114
67ae83a948c1391f3443abaf03dd3e2e9e81805e
train
tests/unit/small_text/training/test_model_selection.py
train
webis-de/small-text:tests/unit/small_text/training/test_model_selection.py
171
8
self.assertEqual
test_add_model_with_fields_config
import unittest from small_text.training.metrics import Metric from small_text.training.model_selection import ( ModelSelectionResult, ModelSelection, NoopModelSelection ) class ModelSelectionResultTest(unittest.TestCase): def test_init(self): model_id = '1' model_path = 'any' measur...
model_selection.models.shape)
added
995a0c91d26f89e64025a570559f7aadd966f3e4ec7e00da2b07696e6366ed7c
self.assertEqual|test_add_model_with_fields_config|import unittest from small_text.training.metrics import Metric from small_text.training.model_selection import ( ModelSelectionResult, ModelSelection, NoopModelSelection ) class ModelSelectionResultTest(unittest.TestCase): def test_init(self): model_id = '1' model_path...
null
null
null
webis-de/small-text
train
114
67ae83a948c1391f3443abaf03dd3e2e9e81805e
train
tests/unit/small_text/training/test_model_selection.py
train
webis-de/small-text:tests/unit/small_text/training/test_model_selection.py
181
13
self.assertRaisesRegex
test_add_model_with_duplicate_id
import unittest from small_text.training.metrics import Metric from small_text.training.model_selection import ( ModelSelectionResult, ModelSelection, NoopModelSelection ) class ModelSelectionResultTest(unittest.TestCase): def test_init(self): model_id = '1' model_path = 'any' measur...
ValueError, 'Duplicate model_id')
added
a26685dc7e0e2a90d04e11904386cc3af05f3fcfd5995c2c42aac53c6e8c6fc8
self.assertRaisesRegex|test_add_model_with_duplicate_id|import unittest from small_text.training.metrics import Metric from small_text.training.model_selection import ( ModelSelectionResult, ModelSelection, NoopModelSelection ) class ModelSelectionResultTest(unittest.TestCase): def test_init(self): model_id = '1' model...
null
null
null
webis-de/small-text
train
114
67ae83a948c1391f3443abaf03dd3e2e9e81805e
train
tests/unit/small_text/training/test_model_selection.py
train
webis-de/small-text:tests/unit/small_text/training/test_model_selection.py
191
13
self.assertRaisesRegex
test_add_model_with_duplicate_model_path
import unittest from small_text.training.metrics import Metric from small_text.training.model_selection import ( ModelSelectionResult, ModelSelection, NoopModelSelection ) class ModelSelectionResultTest(unittest.TestCase): def test_init(self): model_id = '1' model_path = 'any' measur...
ValueError, 'Duplicate model_path')
added
73a96f64c11a5e1f6961cc68f9497eda07d87932201c8e3c753a827b54cfccd7
self.assertRaisesRegex|test_add_model_with_duplicate_model_path|import unittest from small_text.training.metrics import Metric from small_text.training.model_selection import ( ModelSelectionResult, ModelSelection, NoopModelSelection ) class ModelSelectionResultTest(unittest.TestCase): def test_init(self): model_id = '...
null
null
null
webis-de/small-text
train
115
a63327a3ace9025293cf14d4fe87c0e93f01d9ef
train
tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn.py
val
webis-de/small-text:tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn.py
123
8
self.assertSequenceEqual
test_fit_and_predict_proba_dropout_sampling
import unittest import pytest import numpy as np from unittest.mock import patch from unittest import mock from unittest.mock import Mock from scipy.sparse import issparse from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from small_text.training.early_stopping import EarlyStopping, NoopEarl...
y_pred_proba.shape)
added
0373a40e59acb77195496d946ae8ad5dcbcaa750a765b3cbf658b6cb87f0f43c
self.assertSequenceEqual|test_fit_and_predict_proba_dropout_sampling|import unittest import pytest import numpy as np from unittest.mock import patch from unittest import mock from unittest.mock import Mock from scipy.sparse import issparse from small_text.integrations.pytorch.exceptions import PytorchNotFoundError fro...
null
null
null
webis-de/small-text
train
115
a63327a3ace9025293cf14d4fe87c0e93f01d9ef
train
tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn.py
val
webis-de/small-text:tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn.py
149
12
self.assertTrue
test_fit_and_validate
import unittest import pytest import numpy as np from unittest.mock import patch from unittest import mock from unittest.mock import Mock from scipy.sparse import issparse from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from small_text.training.early_stopping import EarlyStopping, NoopEarl...
0 <= acc <= 1)
added
0c16b267f489a4578f3bc80b8c499273d0205b9786c494ba22e5453ea22fc107
self.assertTrue|test_fit_and_validate|import unittest import pytest import numpy as np from unittest.mock import patch from unittest import mock from unittest.mock import Mock from scipy.sparse import issparse from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from small_text.training.early_sto...
null
null
null