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 | 25 | acc653f08378ee81f9c77720b2aadd05fa2d0398 | train | tests/unit/small_text/integrations/transformers/test_classification.py | train | webis-de/small-text:tests/unit/small_text/integrations/transformers/test_classification.py | 33 | 17 | self.assertRaises | test_fine_tuning_arguments_invalid_decay_factor | import unittest
import pytest
import warnings
from unittest.mock import patch
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
from torch.nn.modules import BCEWithLogitsLoss
from small_text.integrations.transformers.classifiers.classification import \
FineTuningArgumen... | ValueError) | modified | b339ebfeaaf069c7af842994fd9da641cb39ab15d03ea8606bcac33b9c6ee335 | self.assertRaises|test_fine_tuning_arguments_invalid_decay_factor|import unittest import pytest import warnings from unittest.mock import patch from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: from torch.nn.modules import BCEWithLogitsLoss from small_text.integrations.transformers.classi... | ValueError) | 30 | 17 |
webis-de/small-text | train | 25 | acc653f08378ee81f9c77720b2aadd05fa2d0398 | train | tests/unit/small_text/integrations/transformers/test_classification.py | train | webis-de/small-text:tests/unit/small_text/integrations/transformers/test_classification.py | 44 | 8 | self.assertEqual | test_transformer_model_arguments_init | import unittest
import pytest
import warnings
from unittest.mock import patch
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
from torch.nn.modules import BCEWithLogitsLoss
from small_text.integrations.transformers.classifiers.classification import \
FineTuningArgumen... | model_args.tokenizer) | modified | 92a771ad8b36455da69cd0eb553ac0fe6f61a0c6b9685c1404615e3c6b997223 | self.assertEqual|test_transformer_model_arguments_init|import unittest import pytest import warnings from unittest.mock import patch from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: from torch.nn.modules import BCEWithLogitsLoss from small_text.integrations.transformers.classifiers.class... | model_args.tokenizer) | 41 | 8 |
webis-de/small-text | train | 25 | acc653f08378ee81f9c77720b2aadd05fa2d0398 | train | tests/unit/small_text/integrations/transformers/test_classification.py | train | webis-de/small-text:tests/unit/small_text/integrations/transformers/test_classification.py | 97 | 12 | self.assertTrue | test_fit_without_validation_set | import unittest
import pytest
import warnings
from unittest.mock import patch
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
from torch.nn.modules import BCEWithLogitsLoss
from small_text.integrations.transformers.classifiers.classification import \
FineTuningArgumen... | isinstance(call_args[0], PytorchDatasetView)) | added | a4f2b00fa72411593c0a7d9647b12e1d23893d67ad92c7329c760fb2ada71bf3 | self.assertTrue|test_fit_without_validation_set|import unittest import pytest import warnings from unittest.mock import patch from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: from torch.nn.modules import BCEWithLogitsLoss from small_text.integrations.transformers.classifiers.classificati... | null | null | null |
webis-de/small-text | train | 26 | 9c33c42a0cb854e625ccac14b534ce4513dee04e | train | tests/integration/small_text/integrations/transformers/classifiers/test_classification.py | train | webis-de/small-text:tests/integration/small_text/integrations/transformers/classifiers/test_classification.py | 60 | 8 | self.assertEqual | test_embed | import unittest
import pytest
from unittest.mock import patch
from parameterized import parameterized_class
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
from tests.utils.datasets import twenty_news_transformers
from tests.utils.testing import assert_array_not_equal
try:
import tor... | len(embeddings.shape)) | modified | e80bbad2b9a1388c996e17e6ae918c46ef87c6575d8dcf8a25548bc23450facb | self.assertEqual|test_embed|import unittest import pytest from unittest.mock import patch from parameterized import parameterized_class from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import twenty_news_transformers from tests.utils.testing import assert_array_not_e... | len(embeddings.shape)) | 57 | 8 |
webis-de/small-text | train | 26 | 9c33c42a0cb854e625ccac14b534ce4513dee04e | train | tests/integration/small_text/integrations/transformers/classifiers/test_classification.py | train | webis-de/small-text:tests/integration/small_text/integrations/transformers/classifiers/test_classification.py | 89 | 8 | self.assertEqual | test_embed_with_layer_index | import unittest
import pytest
from unittest.mock import patch
from parameterized import parameterized_class
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
from tests.utils.datasets import twenty_news_transformers
from tests.utils.testing import assert_array_not_equal
try:
import tor... | embedding_two.shape[1]) | added | b6c078c8bb6363901ced5e43c0a54ec91990bb213559210e69912d83c5769507 | self.assertEqual|test_embed_with_layer_index|import unittest import pytest from unittest.mock import patch from parameterized import parameterized_class from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import twenty_news_transformers from tests.utils.testing import a... | null | null | null |
webis-de/small-text | train | 26 | 9c33c42a0cb854e625ccac14b534ce4513dee04e | train | tests/integration/small_text/integrations/transformers/test_serialization.py | test | webis-de/small-text:tests/integration/small_text/integrations/transformers/test_serialization.py | 77 | 12 | 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 transformers import AutoTokenizer
from small_text.active_learner import PoolBasedActiveLearner
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
from small_text.query_strategi... | active_learner.x_indices_labeled) | added | f802b548e84d1ffd05b6e2c561831305b92320d0154fce82ffbb3cb256c85dc8 | 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 transformers import AutoTokenizer from small_text.active_learner import PoolBasedActiveLearner from small_text.integrations.pytorch.exceptions import PytorchNotFoundErr... | null | null | null |
webis-de/small-text | train | 26 | 9c33c42a0cb854e625ccac14b534ce4513dee04e | train | tests/integration/small_text/integrations/transformers/test_serialization.py | test | webis-de/small-text:tests/integration/small_text/integrations/transformers/test_serialization.py | 82 | 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 transformers import AutoTokenizer
from small_text.active_learner import PoolBasedActiveLearner
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
from small_text.query_strategi... | weights_after[i].cpu().detach().numpy()) | added | ef5f3c98fa3474d581b96a59412b96046f5b37fe24af42885905e38de6243655 | 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 transformers import AutoTokenizer from small_text.active_learner import PoolBasedActiveLearner from small_text.integrations.pytorch.exceptions import PytorchNotFoundErr... | null | null | null |
webis-de/small-text | train | 26 | 9c33c42a0cb854e625ccac14b534ce4513dee04e | train | tests/unit/small_text/integrations/pytorch/classifiers/test_factories.py | train | webis-de/small-text:tests/unit/small_text/integrations/pytorch/classifiers/test_factories.py | 26 | 8 | self.assertTrue | test_factory_new | import unittest
import pytest
import numpy as np
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier
from small_text.integrations.pytorch.classifiers.factories import KimCNNFactory
... | isinstance(clf, KimCNNClassifier)) | added | e2125445632751acb5b25e21c65e16ab211b4f0935cbca8dfb831e11b4029e50 | self.assertTrue|test_factory_new|import unittest import pytest import numpy as np from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier from small_text.integrations.pytorch.classifiers.factories impor... | null | null | null |
webis-de/small-text | train | 26 | 9c33c42a0cb854e625ccac14b534ce4513dee04e | train | tests/unit/small_text/integrations/pytorch/classifiers/test_factories.py | train | webis-de/small-text:tests/unit/small_text/integrations/pytorch/classifiers/test_factories.py | 27 | 8 | self.assertEqual | test_factory_new | import unittest
import pytest
import numpy as np
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier
from small_text.integrations.pytorch.classifiers.factories import KimCNNFactory
... | clf.num_classes) | added | ddb3a3708f143a315f5db62ad5cdffa492df157e85f773884ea18cb1d2a69024 | self.assertEqual|test_factory_new|import unittest import pytest import numpy as np from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier from small_text.integrations.pytorch.classifiers.factories impo... | null | null | null |
webis-de/small-text | train | 26 | 9c33c42a0cb854e625ccac14b534ce4513dee04e | train | tests/unit/small_text/integrations/transformers/classifiers/test_factories.py | train | webis-de/small-text:tests/unit/small_text/integrations/transformers/classifiers/test_factories.py | 28 | 8 | self.assertTrue | test_factory_new | import unittest
import pytest
import numpy as np
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from small_text.integrations.transformers.classifiers.classification import \
TransformerBasedClassification, TransformerModelArguments
from small_text.in... | isinstance(clf, TransformerBasedClassification)) | added | 96f4f0752be68c25447cffd9be2c85603ab59b1afc9d8088e5af438e0e518b40 | self.assertTrue|test_factory_new|import unittest import pytest import numpy as np from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from small_text.integrations.transformers.classifiers.classification import \ TransformerBasedClassification, TransformerModelArguments from sma... | null | null | null |
webis-de/small-text | train | 26 | 9c33c42a0cb854e625ccac14b534ce4513dee04e | train | tests/unit/small_text/integrations/transformers/classifiers/test_factories.py | train | webis-de/small-text:tests/unit/small_text/integrations/transformers/classifiers/test_factories.py | 29 | 8 | self.assertEqual | test_factory_new | import unittest
import pytest
import numpy as np
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from small_text.integrations.transformers.classifiers.classification import \
TransformerBasedClassification, TransformerModelArguments
from small_text.in... | clf.num_classes) | added | e145988cb08aaff49a524cf394b47aed132f2b74eaee4aeb88b1d3f2dfea7382 | self.assertEqual|test_factory_new|import unittest import pytest import numpy as np from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from small_text.integrations.transformers.classifiers.classification import \ TransformerBasedClassification, TransformerModelArguments from sm... | null | null | null |
webis-de/small-text | train | 27 | be80d5e424724630e16a6b8b91609e2ecd1dfc04 | train | tests/unit/small_text/integrations/transformers/classifiers/test_factories.py | train | webis-de/small-text:tests/unit/small_text/integrations/transformers/classifiers/test_factories.py | 26 | 8 | self.assertTrue | test_factory_new | import unittest
import pytest
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from small_text.integrations.transformers.classifiers.classification import \
TransformerBasedClassification, TransformerModelArguments
from small_text.integrations.transform... | isinstance(clf, TransformerBasedClassification)) | modified | 1dde6634f16c12653adeb87212e20b6e94619c11ce24fa909954f24e6c11608e | self.assertTrue|test_factory_new|import unittest import pytest from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from small_text.integrations.transformers.classifiers.classification import \ TransformerBasedClassification, TransformerModelArguments from small_text.integration... | isinstance(clf, TransformerBasedClassification)) | 28 | 8 |
webis-de/small-text | train | 27 | be80d5e424724630e16a6b8b91609e2ecd1dfc04 | train | tests/unit/small_text/integrations/transformers/classifiers/test_factories.py | train | webis-de/small-text:tests/unit/small_text/integrations/transformers/classifiers/test_factories.py | 27 | 8 | self.assertEqual | test_factory_new | import unittest
import pytest
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from small_text.integrations.transformers.classifiers.classification import \
TransformerBasedClassification, TransformerModelArguments
from small_text.integrations.transform... | clf.num_classes) | modified | 772bd021da92e29b9037ad6011369e16812fecf4861fb5c7c290e30928add302 | self.assertEqual|test_factory_new|import unittest import pytest from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from small_text.integrations.transformers.classifiers.classification import \ TransformerBasedClassification, TransformerModelArguments from small_text.integratio... | clf.num_classes) | 29 | 8 |
webis-de/small-text | train | 28 | 1c554c97544b73c7e375b55bdab827d3a22bf081 | train | tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn_embeddings.py | train | webis-de/small-text:tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn_embeddings.py | 31 | 13 | self.assertRaises | test_embed_model_not_trained | import unittest
import pytest
import numpy as np
from unittest import mock
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier
from small_text.integrations.pytorch.datasets import Pyt... | ValueError) | modified | 4606b09337a72bafaa7552af69a04a298fa95ecbdf0aaae3056861b51dafe5cc | self.assertRaises|test_embed_model_not_trained|import unittest import pytest import numpy as np from unittest import mock from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier from small_text.integrat... | ValueError) | 28 | 13 |
webis-de/small-text | train | 28 | 1c554c97544b73c7e375b55bdab827d3a22bf081 | train | tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn_embeddings.py | train | webis-de/small-text:tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn_embeddings.py | 54 | 12 | self.assertEqual | test_embed | import unittest
import pytest
import numpy as np
from unittest import mock
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier
from small_text.integrations.pytorch.datasets import Pyt... | embeddings.shape[1]) | added | e9566d4697bb8a134d8036295c02c5573cd754fdf03e97fbda705f8ce1bb6530 | self.assertEqual|test_embed|import unittest import pytest import numpy as np from unittest import mock from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier from small_text.integrations.pytorch.datase... | null | null | null |
webis-de/small-text | train | 28 | 1c554c97544b73c7e375b55bdab827d3a22bf081 | train | tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn_embeddings.py | train | webis-de/small-text:tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn_embeddings.py | 77 | 12 | self.assertEqual | test_embed_and_predict | import unittest
import pytest
import numpy as np
from unittest import mock
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier
from small_text.integrations.pytorch.datasets import Pyt... | embeddings.shape[0]) | added | cfdacae9c5d5059106374b4992b097528f57d8ed6578f98abe2b11d13390e84c | self.assertEqual|test_embed_and_predict|import unittest import pytest import numpy as np from unittest import mock from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier from small_text.integrations.py... | null | null | null |
webis-de/small-text | train | 28 | 1c554c97544b73c7e375b55bdab827d3a22bf081 | train | tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn_embeddings.py | train | webis-de/small-text:tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn_embeddings.py | 82 | 12 | self.assertEqual | test_embed_and_predict | import unittest
import pytest
import numpy as np
from unittest import mock
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier
from small_text.integrations.pytorch.datasets import Pyt... | predictions.shape[0]) | added | cda658190b42ced9075859be4131f3186df6a51b6019a0a833420738dad995c5 | self.assertEqual|test_embed_and_predict|import unittest import pytest import numpy as np from unittest import mock from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier from small_text.integrations.py... | null | null | null |
webis-de/small-text | train | 29 | c1c1ef879d9c391472dbd0b7161dd60cc040c1d8 | train | tests/integration/small_text/integrations/transformers/classifiers/test_classification.py | train | webis-de/small-text:tests/integration/small_text/integrations/transformers/classifiers/test_classification.py | 43 | 13 | self.assertRaises | test_embed_model_not_fitted | import unittest
import pytest
from unittest import mock
from unittest.mock import patch
from parameterized import parameterized_class
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
from tests.utils.datasets import twenty_news_transformers
from tests.utils.testing import assert_array_not_... | ValueError) | modified | 134311c23abe5671246524fa4ea870f7fc2e18c338cda81f2427f7d2271143a4 | self.assertRaises|test_embed_model_not_fitted|import unittest import pytest from unittest import mock from unittest.mock import patch from parameterized import parameterized_class from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import twenty_news_transformers from t... | ValueError) | 42 | 13 |
webis-de/small-text | train | 29 | c1c1ef879d9c391472dbd0b7161dd60cc040c1d8 | train | tests/integration/small_text/integrations/transformers/classifiers/test_classification.py | train | webis-de/small-text:tests/integration/small_text/integrations/transformers/classifiers/test_classification.py | 69 | 8 | self.assertEqual | test_embed | import unittest
import pytest
from unittest import mock
from unittest.mock import patch
from parameterized import parameterized_class
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
from tests.utils.datasets import twenty_news_transformers
from tests.utils.testing import assert_array_not_... | embeddings.shape[1]) | added | c1b5364d7e512a885bc42f34a0910291f0d902013934701207a971efa339a079 | self.assertEqual|test_embed|import unittest import pytest from unittest import mock from unittest.mock import patch from parameterized import parameterized_class from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import twenty_news_transformers from tests.utils.testing... | null | null | null |
webis-de/small-text | train | 29 | c1c1ef879d9c391472dbd0b7161dd60cc040c1d8 | train | tests/integration/small_text/integrations/transformers/classifiers/test_classification.py | train | webis-de/small-text:tests/integration/small_text/integrations/transformers/classifiers/test_classification.py | 100 | 8 | self.assertEqual | test_embed_with_layer_index | import unittest
import pytest
from unittest import mock
from unittest.mock import patch
from parameterized import parameterized_class
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
from tests.utils.datasets import twenty_news_transformers
from tests.utils.testing import assert_array_not_... | len(embedding_one.shape)) | added | 15f4850e044eae6dfcf57894fcc94d5a0ddc5a66e170b042e4189887f99578f4 | self.assertEqual|test_embed_with_layer_index|import unittest import pytest from unittest import mock from unittest.mock import patch from parameterized import parameterized_class from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import twenty_news_transformers from te... | null | null | null |
webis-de/small-text | train | 29 | c1c1ef879d9c391472dbd0b7161dd60cc040c1d8 | train | tests/integration/small_text/integrations/transformers/classifiers/test_classification.py | train | webis-de/small-text:tests/integration/small_text/integrations/transformers/classifiers/test_classification.py | 124 | 8 | self.assertEqual | test_embed_with_predictions | import unittest
import pytest
from unittest import mock
from unittest.mock import patch
from parameterized import parameterized_class
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
from tests.utils.datasets import twenty_news_transformers
from tests.utils.testing import assert_array_not_... | embeddings.shape[1]) | added | 941ad4967e3a426d31e07d131ff1e8517209073d58e2ca21a4c862609e901ff9 | self.assertEqual|test_embed_with_predictions|import unittest import pytest from unittest import mock from unittest.mock import patch from parameterized import parameterized_class from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import twenty_news_transformers from te... | null | null | null |
webis-de/small-text | train | 30 | ba5993f5931890b47141762fdb6ec223485fa00d | train | tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn_embeddings.py | train | webis-de/small-text:tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn_embeddings.py | 74 | 12 | self.assertFalse | test_embed_and_predict | import unittest
import pytest
import numpy as np
from unittest import mock
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier
from small_text.integrations.pytorch.datasets import Pyt... | classifier.model.training) | modified | 075b539aebb65b5de9db4c3eac33b680b626556b5246dbc3af429ff279d99a59 | self.assertFalse|test_embed_and_predict|import unittest import pytest import numpy as np from unittest import mock from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier from small_text.integrations.py... | classifier.model.training) | 74 | 12 |
webis-de/small-text | train | 30 | ba5993f5931890b47141762fdb6ec223485fa00d | train | tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn_embeddings.py | train | webis-de/small-text:tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn_embeddings.py | 77 | 12 | self.assertEqual | test_embed_and_predict | import unittest
import pytest
import numpy as np
from unittest import mock
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier
from small_text.integrations.pytorch.datasets import Pyt... | embeddings.shape[0]) | modified | cb8b1907064db8e5a699c57ebd5c778be650b0f7dcbbdc627129b2d0e679a868 | self.assertEqual|test_embed_and_predict|import unittest import pytest import numpy as np from unittest import mock from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier from small_text.integrations.py... | embeddings.shape[0]) | 77 | 12 |
webis-de/small-text | train | 30 | ba5993f5931890b47141762fdb6ec223485fa00d | train | tests/integration/small_text/integrations/pytorch/test_query_strategies.py | train | webis-de/small-text:tests/integration/small_text/integrations/pytorch/test_query_strategies.py | 64 | 8 | self.assertFalse | _simple_exhaustive_active_learning_test | import unittest
import pytest
import numpy as np
from unittest import mock
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
from tests.utils.datasets import trec_dataset
from tests.utils.object_factory import get_initialized_active_learner
try:
import torch
from small_text.integr... | dataset[0].x[PytorchTextClassificationDataset.INDEX_TEXT].is_cuda) | added | 0eecf75dc731b310654cc6a776e3b473e8a19d5edb3ca78e2e7e07d3cb9f6a5c | self.assertFalse|_simple_exhaustive_active_learning_test|import unittest import pytest import numpy as np from unittest import mock from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import trec_dataset from tests.utils.object_factory import get_initialized_active_lear... | null | null | null |
webis-de/small-text | train | 30 | ba5993f5931890b47141762fdb6ec223485fa00d | train | tests/integration/small_text/integrations/pytorch/test_query_strategies.py | train | webis-de/small-text:tests/integration/small_text/integrations/pytorch/test_query_strategies.py | 76 | 8 | self.assertEqual | _simple_exhaustive_active_learning_test | import unittest
import pytest
import numpy as np
from unittest import mock
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
from tests.utils.datasets import trec_dataset
from tests.utils.object_factory import get_initialized_active_learner
try:
import torch
from small_text.integr... | active_learner.x_indices_labeled.shape[0]) | added | 67c9b337d0f5545bf6afeb57d2a4862dd3c9e17a90010c7932c6667148fea30f | self.assertEqual|_simple_exhaustive_active_learning_test|import unittest import pytest import numpy as np from unittest import mock from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import trec_dataset from tests.utils.object_factory import get_initialized_active_lear... | null | null | null |
webis-de/small-text | train | 30 | ba5993f5931890b47141762fdb6ec223485fa00d | train | tests/integration/small_text/integrations/transformers/classifiers/test_classification.py | train | webis-de/small-text:tests/integration/small_text/integrations/transformers/classifiers/test_classification.py | 123 | 8 | self.assertEqual | test_embed_with_predictions | import unittest
import pytest
from unittest import mock
from unittest.mock import patch
from parameterized import parameterized_class
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
from tests.utils.datasets import twenty_news_transformers
from tests.utils.testing import assert_array_not_... | embeddings.shape[0]) | modified | 7fdddd40aa59d7f74f390280463544858a1a51cf26db2018f688873bcd641c5e | self.assertEqual|test_embed_with_predictions|import unittest import pytest from unittest import mock from unittest.mock import patch from parameterized import parameterized_class from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import twenty_news_transformers from te... | embeddings.shape[0]) | 123 | 8 |
webis-de/small-text | train | 30 | ba5993f5931890b47141762fdb6ec223485fa00d | train | tests/integration/small_text/integrations/transformers/classifiers/test_classification.py | train | webis-de/small-text:tests/integration/small_text/integrations/transformers/classifiers/test_classification.py | 125 | 8 | self.assertEqual | test_embed_with_predictions | import unittest
import pytest
from unittest import mock
from unittest.mock import patch
from parameterized import parameterized_class
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
from tests.utils.datasets import twenty_news_transformers
from tests.utils.testing import assert_array_not_... | predictions.shape[0]) | modified | a759c07f5ae26459613f9882405e7b332db0507885f55e3120795468b0153924 | self.assertEqual|test_embed_with_predictions|import unittest import pytest from unittest import mock from unittest.mock import patch from parameterized import parameterized_class from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import twenty_news_transformers from te... | predictions.shape[0]) | 125 | 8 |
webis-de/small-text | train | 30 | ba5993f5931890b47141762fdb6ec223485fa00d | train | tests/unit/small_text/query_strategies/test_strategies.py | train | webis-de/small-text:tests/unit/small_text/query_strategies/test_strategies.py | 362 | 8 | self.assertEqual | test_str | import unittest
import numpy as np
from numpy.testing import assert_array_equal, assert_array_almost_equal
from sklearn.preprocessing import normalize
from unittest.mock import patch, Mock
from small_text.classifiers import ConfidenceEnhancedLinearSVC, SklearnClassifier
from small_text.query_strategies import EmptyP... | str(query_strategy)) | added | f10da603acb5a37fbee1df0ee25935ee17f853bf5e24f8ad483f648b9c02c7d4 | self.assertEqual|test_str|import unittest import numpy as np from numpy.testing import assert_array_equal, assert_array_almost_equal from sklearn.preprocessing import normalize from unittest.mock import patch, Mock from small_text.classifiers import ConfidenceEnhancedLinearSVC, SklearnClassifier from small_text.query_s... | null | null | null |
webis-de/small-text | train | 30 | ba5993f5931890b47141762fdb6ec223485fa00d | train | tests/unit/small_text/query_strategies/test_strategies.py | train | webis-de/small-text:tests/unit/small_text/query_strategies/test_strategies.py | 536 | 8 | self.assertIsNotNone | test_sample_with_fallback | import unittest
import numpy as np
from numpy.testing import assert_array_equal, assert_array_almost_equal
from sklearn.preprocessing import normalize
from unittest.mock import patch, Mock
from small_text.classifiers import ConfidenceEnhancedLinearSVC, SklearnClassifier
from small_text.query_strategies import EmptyP... | indices) | added | 6ccbd16ed050c3b9e6055f3d803e43d7614851cf8f22a69b26613a4867526aa0 | self.assertIsNotNone|test_sample_with_fallback|import unittest import numpy as np from numpy.testing import assert_array_equal, assert_array_almost_equal from sklearn.preprocessing import normalize from unittest.mock import patch, Mock from small_text.classifiers import ConfidenceEnhancedLinearSVC, SklearnClassifier fr... | null | null | null |
webis-de/small-text | train | 31 | bf1eaf051e6c22f0e0d65118b236d6255888a5ab | train | tests/integration/small_text/integrations/transformers/classifiers/test_classification.py | train | webis-de/small-text:tests/integration/small_text/integrations/transformers/classifiers/test_classification.py | 75 | 8 | self.assertEqual | test_embed | import unittest
import pytest
from unittest import mock
from unittest.mock import patch
from parameterized import parameterized_class
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
from tests.utils.datasets import twenty_news_transformers
from tests.utils.testing import assert_array_not_... | embeddings.shape[0]) | added | 6d7e866143ca930e1043c9f92bc9c1a96d9317e8847dfa34084de85b29575170 | self.assertEqual|test_embed|import unittest import pytest from unittest import mock from unittest.mock import patch from parameterized import parameterized_class from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import twenty_news_transformers from tests.utils.testing... | null | null | null |
webis-de/small-text | train | 31 | bf1eaf051e6c22f0e0d65118b236d6255888a5ab | train | tests/integration/small_text/integrations/transformers/classifiers/test_classification.py | train | webis-de/small-text:tests/integration/small_text/integrations/transformers/classifiers/test_classification.py | 134 | 8 | self.assertEqual | test_embed_with_predictions | import unittest
import pytest
from unittest import mock
from unittest.mock import patch
from parameterized import parameterized_class
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
from tests.utils.datasets import twenty_news_transformers
from tests.utils.testing import assert_array_not_... | predictions.shape[0]) | added | f58c4f90ac2b9c647b9fe8959538ef68a12cd81085c1db652ec2b3d2e40bd839 | self.assertEqual|test_embed_with_predictions|import unittest import pytest from unittest import mock from unittest.mock import patch from parameterized import parameterized_class from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import twenty_news_transformers from te... | null | null | null |
webis-de/small-text | train | 31 | bf1eaf051e6c22f0e0d65118b236d6255888a5ab | train | tests/integration/small_text/integrations/transformers/classifiers/test_classification.py | train | webis-de/small-text:tests/integration/small_text/integrations/transformers/classifiers/test_classification.py | 211 | 8 | self.assertEqual | test_initialize_optimizer_and_scheduler_default | import unittest
import pytest
from unittest import mock
from unittest.mock import patch
from parameterized import parameterized_class
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
from tests.utils.datasets import twenty_news_transformers
from tests.utils.testing import assert_array_not_... | classifier._default_optimizer(optimizer_params, base_lr).__class__) | added | 936d0d2ddbf30946b152bc530ac5d40e376215da9dc6f78960bc4d38a003a260 | self.assertEqual|test_initialize_optimizer_and_scheduler_default|import unittest import pytest from unittest import mock from unittest.mock import patch from parameterized import parameterized_class from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import twenty_news_... | null | null | null |
webis-de/small-text | train | 31 | bf1eaf051e6c22f0e0d65118b236d6255888a5ab | train | tests/integration/small_text/integrations/transformers/classifiers/test_classification.py | train | webis-de/small-text:tests/integration/small_text/integrations/transformers/classifiers/test_classification.py | 243 | 8 | self.assertIsNotNone | test_initialize_optimizer_and_scheduler_custom | import unittest
import pytest
from unittest import mock
from unittest.mock import patch
from parameterized import parameterized_class
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
from tests.utils.datasets import twenty_news_transformers
from tests.utils.testing import assert_array_not_... | scheduler) | added | d25bd3ec2ffb73568d3e730b86ce8688730cf283563ff65b5926a80c3fdf1e39 | self.assertIsNotNone|test_initialize_optimizer_and_scheduler_custom|import unittest import pytest from unittest import mock from unittest.mock import patch from parameterized import parameterized_class from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import twenty_ne... | null | null | null |
webis-de/small-text | train | 32 | a73f296f7a8a1edaedc351accb0cf1ce453ece2a | train | tests/unit/small_text/test_active_learner.py | val | webis-de/small-text:tests/unit/small_text/test_active_learner.py | 351 | 13 | self.assertRaises | test_update_duplicate_indices_in_labeled_pool | import unittest
import numpy as np
from unittest.mock import call, patch, Mock, ANY
from numpy.testing import assert_array_equal
from small_text.active_learner import (PoolBasedActiveLearner,
ActiveLearner, AbstractPoolBasedActiveLearner)
from small_text.exceptions import Learne... | ValueError) | modified | c52bf98293a6c05cd86ab3ed0e351680389e78549a8847ccfa5270a270cae847 | self.assertRaises|test_update_duplicate_indices_in_labeled_pool|import unittest import numpy as np from unittest.mock import call, patch, Mock, ANY from numpy.testing import assert_array_equal from small_text.active_learner import (PoolBasedActiveLearner, ActiveLearner, AbstractPoolBasedActiveLearner) from small_text.e... | ValueError) | 351 | 13 |
webis-de/small-text | train | 32 | a73f296f7a8a1edaedc351accb0cf1ce453ece2a | train | tests/unit/small_text/test_active_learner.py | val | webis-de/small-text:tests/unit/small_text/test_active_learner.py | 388 | 12 | assert_* | _test_update_label_at | import unittest
import numpy as np
from unittest.mock import call, patch, Mock, ANY
from numpy.testing import assert_array_equal
from small_text.active_learner import (PoolBasedActiveLearner,
ActiveLearner, AbstractPoolBasedActiveLearner)
from small_text.exceptions import Learne... | active_learner.y[-5:]) | modified | 091cee8a0faddfc015b0fee37b8f4f740ce3f434597907614c37526acb313656 | assert_*|_test_update_label_at|import unittest import numpy as np from unittest.mock import call, patch, Mock, ANY from numpy.testing import assert_array_equal from small_text.active_learner import (PoolBasedActiveLearner, ActiveLearner, AbstractPoolBasedActiveLearner) from small_text.exceptions import LearnerNotInitia... | active_learner.y[-5:]) | 388 | 12 |
webis-de/small-text | train | 32 | a73f296f7a8a1edaedc351accb0cf1ce453ece2a | train | tests/unit/small_text/test_active_learner.py | val | webis-de/small-text:tests/unit/small_text/test_active_learner.py | 423 | 12 | self.assertEqual | _test_remove_label_at | import unittest
import numpy as np
from unittest.mock import call, patch, Mock, ANY
from numpy.testing import assert_array_equal
from small_text.active_learner import (PoolBasedActiveLearner,
ActiveLearner, AbstractPoolBasedActiveLearner)
from small_text.exceptions import Learne... | len(active_learner.x_indices_labeled)) | modified | 47106e52c1ed01ddf3fcf203a34ab28035748a7bdaa70eb8cc36ea1340d0d174 | self.assertEqual|_test_remove_label_at|import unittest import numpy as np from unittest.mock import call, patch, Mock, ANY from numpy.testing import assert_array_equal from small_text.active_learner import (PoolBasedActiveLearner, ActiveLearner, AbstractPoolBasedActiveLearner) from small_text.exceptions import LearnerN... | len(active_learner.x_indices_labeled)) | 423 | 12 |
webis-de/small-text | train | 32 | a73f296f7a8a1edaedc351accb0cf1ce453ece2a | train | tests/unit/small_text/test_active_learner.py | val | webis-de/small-text:tests/unit/small_text/test_active_learner.py | 483 | 8 | assert_* | _test_ignore_sample_without_label_change | import unittest
import numpy as np
from unittest.mock import call, patch, Mock, ANY
from numpy.testing import assert_array_equal
from small_text.active_learner import (PoolBasedActiveLearner,
ActiveLearner, AbstractPoolBasedActiveLearner)
from small_text.exceptions import Learne... | active_learner.x_indices_ignored) | modified | fc29b24ed6e0ccbd1601f89e67e189f3c639939f0ce83580f78742e48dabe85c | assert_*|_test_ignore_sample_without_label_change|import unittest import numpy as np from unittest.mock import call, patch, Mock, ANY from numpy.testing import assert_array_equal from small_text.active_learner import (PoolBasedActiveLearner, ActiveLearner, AbstractPoolBasedActiveLearner) from small_text.exceptions impo... | active_learner.x_indices_ignored) | 483 | 8 |
webis-de/small-text | train | 33 | 73990ac1533272dd9f83e1d0e74f12d38ed47285 | train | tests/integration/small_text/integrations/transformers/test_serialization.py | test | webis-de/small-text:tests/integration/small_text/integrations/transformers/test_serialization.py | 33 | 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) | added | 2fdc1d6ed83f91fcd14315ec109a770cb5131128a63d8420ddc2329584886014 | 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... | null | null | null |
webis-de/small-text | train | 33 | 73990ac1533272dd9f83e1d0e74f12d38ed47285 | 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 | 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... | active_learner.x_indices_labeled) | added | 410fc98705280e3a18c14f5521f7089e52384a45de22f5ee5f1977c0f6e52c63 | 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... | null | null | null |
webis-de/small-text | train | 33 | 73990ac1533272dd9f83e1d0e74f12d38ed47285 | train | tests/integration/small_text/integrations/transformers/test_serialization.py | test | webis-de/small-text:tests/integration/small_text/integrations/transformers/test_serialization.py | 60 | 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... | len(weights_after)) | added | 95c216966b29fd3873ee1e0e4a14ed04e780f8c504db9d91c4b9de5789b42009 | 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... | null | null | null |
webis-de/small-text | train | 33 | 73990ac1533272dd9f83e1d0e74f12d38ed47285 | train | tests/integration/small_text/integrations/transformers/test_serialization.py | test | webis-de/small-text:tests/integration/small_text/integrations/transformers/test_serialization.py | 62 | 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()) | added | 9866c242d0471f830c105c5b6b4228a767b5a4f8bb5a913057da8b99ff55f47b | 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... | null | null | null |
webis-de/small-text | train | 33 | 73990ac1533272dd9f83e1d0e74f12d38ed47285 | train | tests/unit/small_text/integrations/pytorch/utils/test_data.py | train | webis-de/small-text:tests/unit/small_text/integrations/pytorch/utils/test_data.py | 28 | 8 | self.assertTrue | test_dataloader_train | import unittest
import numpy as np
import pytest
import torch
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
from torch.utils.data.sampler import BatchSampler, SequentialSampler, RandomSampler
from small_text.integrations.pytorch.utils.data import dataloader, get_class_weig... | isinstance(loader.dataset, np.ndarray)) | added | 57c88c8b34f1414b5fa47566612a4089c80660ce4987f5fd3dca8594544f0ac7 | self.assertTrue|test_dataloader_train|import unittest import numpy as np import pytest import torch from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: from torch.utils.data.sampler import BatchSampler, SequentialSampler, RandomSampler from small_text.integrations.pytorch.utils.data import ... | null | null | null |
webis-de/small-text | train | 33 | 73990ac1533272dd9f83e1d0e74f12d38ed47285 | train | tests/unit/small_text/integrations/pytorch/utils/test_data.py | train | webis-de/small-text:tests/unit/small_text/integrations/pytorch/utils/test_data.py | 36 | 8 | self.assertTrue | test_dataloader_test | import unittest
import numpy as np
import pytest
import torch
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
from torch.utils.data.sampler import BatchSampler, SequentialSampler, RandomSampler
from small_text.integrations.pytorch.utils.data import dataloader, get_class_weig... | isinstance(loader.dataset, np.ndarray)) | added | 08873ac97245c8a2fd8c0dfc5cf4c2300dfbaf22c4f4792a064b181aff328df2 | self.assertTrue|test_dataloader_test|import unittest import numpy as np import pytest import torch from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: from torch.utils.data.sampler import BatchSampler, SequentialSampler, RandomSampler from small_text.integrations.pytorch.utils.data import d... | null | null | null |
webis-de/small-text | train | 33 | 73990ac1533272dd9f83e1d0e74f12d38ed47285 | train | tests/unit/small_text/integrations/pytorch/utils/test_data.py | train | webis-de/small-text:tests/unit/small_text/integrations/pytorch/utils/test_data.py | 45 | 8 | self.assertTrue | test_get_class_weights_binary | import unittest
import numpy as np
import pytest
import torch
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
from torch.utils.data.sampler import BatchSampler, SequentialSampler, RandomSampler
from small_text.integrations.pytorch.utils.data import dataloader, get_class_weig... | torch.equal(torch.tensor([4., 1.0]), class_weights)) | modified | f8408ab9adfb1cac24a2bf54f30b599f6b3fdd640c135829b6429f5b6738f365 | self.assertTrue|test_get_class_weights_binary|import unittest import numpy as np import pytest import torch from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: from torch.utils.data.sampler import BatchSampler, SequentialSampler, RandomSampler from small_text.integrations.pytorch.utils.data... | torch.equal(torch.tensor([4., 1.0]), class_weights)) | 42 | 8 |
webis-de/small-text | train | 33 | 73990ac1533272dd9f83e1d0e74f12d38ed47285 | train | tests/unit/small_text/integrations/pytorch/utils/test_data.py | train | webis-de/small-text:tests/unit/small_text/integrations/pytorch/utils/test_data.py | 50 | 8 | self.assertTrue | test_get_class_weights_multiclass | import unittest
import numpy as np
import pytest
import torch
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
from torch.utils.data.sampler import BatchSampler, SequentialSampler, RandomSampler
from small_text.integrations.pytorch.utils.data import dataloader, get_class_weig... | torch.equal(torch.tensor([7.0, 1.0, 7.0, 3.0]), class_weights)) | modified | 2868af254485ed775646498d66871ac9345af2681ff260b35e1de2dd6108017d | self.assertTrue|test_get_class_weights_multiclass|import unittest import numpy as np import pytest import torch from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: from torch.utils.data.sampler import BatchSampler, SequentialSampler, RandomSampler from small_text.integrations.pytorch.utils.... | torch.equal(torch.tensor([7.0, 1.0, 7.0, 3.0]), class_weights)) | 47 | 8 |
webis-de/small-text | train | 34 | 5e75f058550b564e734f6a4f98b42f4b24967524 | train | tests/integration/small_text/integrations/transformers/classifiers/test_classification.py | train | webis-de/small-text:tests/integration/small_text/integrations/transformers/classifiers/test_classification.py | 115 | 8 | self.assertEqual | test_embed_with_layer_index | import unittest
import pytest
import warnings
import numpy as np
from unittest import mock
from unittest.mock import patch
from parameterized import parameterized_class
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
from tests.utils.datasets import twenty_news_transformers
from tests.ut... | embedding_one.shape[1]) | modified | 8d16592857f01aadefa20a69ab221ddbfff234e0dc3b11dd98da50385ad5cdc8 | self.assertEqual|test_embed_with_layer_index|import unittest import pytest import warnings import numpy as np from unittest import mock from unittest.mock import patch from parameterized import parameterized_class from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets impo... | embedding_one.shape[1]) | 112 | 8 |
webis-de/small-text | train | 34 | 5e75f058550b564e734f6a4f98b42f4b24967524 | train | tests/integration/small_text/integrations/transformers/classifiers/test_classification.py | train | webis-de/small-text:tests/integration/small_text/integrations/transformers/classifiers/test_classification.py | 235 | 8 | self.assertEqual | test_initialize_optimizer_and_scheduler_custom | import unittest
import pytest
import warnings
import numpy as np
from unittest import mock
from unittest.mock import patch
from parameterized import parameterized_class
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
from tests.utils.datasets import twenty_news_transformers
from tests.ut... | optimizer_arg) | added | e4c95642f475c64e0588cd94170f6f774c2023f51f1cccb46736f46f8238c64c | self.assertEqual|test_initialize_optimizer_and_scheduler_custom|import unittest import pytest import warnings import numpy as np from unittest import mock from unittest.mock import patch from parameterized import parameterized_class from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.... | null | null | null |
webis-de/small-text | train | 34 | 5e75f058550b564e734f6a4f98b42f4b24967524 | train | tests/integration/small_text/integrations/transformers/classifiers/test_classification.py | train | webis-de/small-text:tests/integration/small_text/integrations/transformers/classifiers/test_classification.py | 251 | 8 | self.assertTrue | test_predict_and_validate | import unittest
import pytest
import warnings
import numpy as np
from unittest import mock
from unittest.mock import patch
from parameterized import parameterized_class
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
from tests.utils.datasets import twenty_news_transformers
from tests.ut... | isinstance(y_pred, np.ndarray)) | added | 9e2969a32a08be864028c4aaee3db5e89fd8e5150466392e8f2f34e7c805ad36 | self.assertTrue|test_predict_and_validate|import unittest import pytest import warnings import numpy as np from unittest import mock from unittest.mock import patch from parameterized import parameterized_class from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import ... | null | null | null |
webis-de/small-text | train | 34 | 5e75f058550b564e734f6a4f98b42f4b24967524 | train | tests/integration/small_text/integrations/transformers/classifiers/test_classification.py | train | webis-de/small-text:tests/integration/small_text/integrations/transformers/classifiers/test_classification.py | 273 | 12 | self.assertEqual | test_validate_with_validations_per_epoch | import unittest
import pytest
import warnings
import numpy as np
from unittest import mock
from unittest.mock import patch
from parameterized import parameterized_class
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
from tests.utils.datasets import twenty_news_transformers
from tests.ut... | validate_spy.call_count) | added | 5af1e78143818b2888c3c217cb64e7b940b729e2184f5662b87cad54606fd43d | self.assertEqual|test_validate_with_validations_per_epoch|import unittest import pytest import warnings import numpy as np from unittest import mock from unittest.mock import patch from parameterized import parameterized_class from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.... | null | null | null |
webis-de/small-text | train | 35 | 1f6afd7114c2a654cbfaa95abc94807e2db0cbbc | train | tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn_embeddings.py | train | webis-de/small-text:tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn_embeddings.py | 29 | 13 | self.assertRaises | test_embed_model_not_trained | import unittest
import pytest
import numpy as np
from unittest import mock
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier
from small_text.integrations.pytorch.datasets import Pyt... | ValueError) | modified | 762da1d453a344639a44d9a99a2b80a0a311fcb6200311932e983f30b67239fd | self.assertRaises|test_embed_model_not_trained|import unittest import pytest import numpy as np from unittest import mock from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier from small_text.integrat... | ValueError) | 31 | 13 |
webis-de/small-text | train | 35 | 1f6afd7114c2a654cbfaa95abc94807e2db0cbbc | train | tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn_embeddings.py | train | webis-de/small-text:tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn_embeddings.py | 46 | 12 | self.assertFalse | test_embed | import unittest
import pytest
import numpy as np
from unittest import mock
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier
from small_text.integrations.pytorch.datasets import Pyt... | classifier.model.training) | modified | 961bd9de31dac348373662a05f65142478ecd47b80e4f980ded47e41ed1c9acd | self.assertFalse|test_embed|import unittest import pytest import numpy as np from unittest import mock from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier from small_text.integrations.pytorch.datase... | classifier.model.training) | 48 | 12 |
webis-de/small-text | train | 35 | 1f6afd7114c2a654cbfaa95abc94807e2db0cbbc | train | tests/integration/small_text/integrations/pytorch/test_serialization.py | train | webis-de/small-text:tests/integration/small_text/integrations/pytorch/test_serialization.py | 54 | 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 tests.ut... | active_learner) | modified | efd163477b31025498d7619573e8d11742ab532d1c9a05a4f53bb4fd83343e74 | 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) | 54 | 12 |
webis-de/small-text | train | 35 | 1f6afd7114c2a654cbfaa95abc94807e2db0cbbc | train | tests/integration/small_text/integrations/pytorch/test_serialization.py | train | webis-de/small-text:tests/integration/small_text/integrations/pytorch/test_serialization.py | 60 | 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 tests.ut... | weights_after[i].cpu().detach().numpy()) | modified | bc01bfbd5389181a3c75c09124bb0ddb6aa7fdffc3ccf85e03c67f794fa70947 | 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()) | 60 | 16 |
webis-de/small-text | train | 35 | 1f6afd7114c2a654cbfaa95abc94807e2db0cbbc | train | tests/unit/small_text/integrations/pytorch/test_datasets.py | val | webis-de/small-text:tests/unit/small_text/integrations/pytorch/test_datasets.py | 172 | 8 | self.assertEqual | test_init_with_numpy_slice | import unittest
import pytest
import numpy as np
from collections import Counter
from numpy.testing import assert_array_equal
from parameterized import parameterized_class
from small_text.data.exceptions import UnsupportedOperationException
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError... | len(dataset_view)) | modified | 50f03bd8d93da76fb1dec1bdc7b75073d254759f0e8cce6284a40d42021d7ec8 | self.assertEqual|test_init_with_numpy_slice|import unittest import pytest import numpy as np from collections import Counter from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.data.exceptions import UnsupportedOperationException from small_text.integrations.pytorc... | len(dataset_view)) | 172 | 8 |
webis-de/small-text | train | 35 | 1f6afd7114c2a654cbfaa95abc94807e2db0cbbc | train | tests/unit/small_text/integrations/pytorch/test_datasets.py | val | webis-de/small-text:tests/unit/small_text/integrations/pytorch/test_datasets.py | 178 | 8 | assert_* | test_get_x | import unittest
import pytest
import numpy as np
from collections import Counter
from numpy.testing import assert_array_equal
from parameterized import parameterized_class
from small_text.data.exceptions import UnsupportedOperationException
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError... | dataset_view.x) | modified | 2aa392674fe67842baf28bbed85931d5372c27b708272796d58bd1a15504c7f2 | assert_*|test_get_x|import unittest import pytest import numpy as np from collections import Counter from numpy.testing import assert_array_equal from parameterized import parameterized_class from small_text.data.exceptions import UnsupportedOperationException from small_text.integrations.pytorch.exceptions import Pyto... | dataset_view.x) | 178 | 8 |
webis-de/small-text | train | 35 | 1f6afd7114c2a654cbfaa95abc94807e2db0cbbc | train | tests/unit/small_text/integrations/pytorch/test_strategies.py | train | webis-de/small-text:tests/unit/small_text/integrations/pytorch/test_strategies.py | 48 | 8 | self.assertEqual | test_init | import unittest
import pytest
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
from small_text.integrations.pytorch.query_strategies import (
BADGE,
ExpectedGradientLength,
ExpectedGradientLengthMaxWord)
except PytorchNotFoundError:
pass
@pytest.mark.... | strategy.device) | modified | ac9e37dedb52a519fbe3b8baa49d8c4e67df32996af009ed068abe9fe3f88263 | self.assertEqual|test_init|import unittest import pytest from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: from small_text.integrations.pytorch.query_strategies import ( BADGE, ExpectedGradientLength, ExpectedGradientLengthMaxWord) except PytorchNotFoundError: pass @pytest.mark.pytorch cl... | strategy.device) | 46 | 8 |
webis-de/small-text | train | 35 | 1f6afd7114c2a654cbfaa95abc94807e2db0cbbc | train | tests/unit/small_text/integrations/pytorch/test_strategies.py | train | webis-de/small-text:tests/unit/small_text/integrations/pytorch/test_strategies.py | 61 | 8 | self.assertEqual | test_init_default | import unittest
import pytest
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
from small_text.integrations.pytorch.query_strategies import (
BADGE,
ExpectedGradientLength,
ExpectedGradientLengthMaxWord)
except PytorchNotFoundError:
pass
@pytest.mark.... | strategy.num_classes) | modified | 290667213155ad8c7e7b38e8552850ce8ddd5d774a604b19fa816117012dd454 | self.assertEqual|test_init_default|import unittest import pytest from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: from small_text.integrations.pytorch.query_strategies import ( BADGE, ExpectedGradientLength, ExpectedGradientLengthMaxWord) except PytorchNotFoundError: pass @pytest.mark.py... | strategy.num_classes) | 59 | 8 |
webis-de/small-text | train | 36 | 763a86977eb6c1923d80ce991927dc8c2f2acc66 | train | tests/integration/small_text/test_serialization.py | train | webis-de/small-text:tests/integration/small_text/test_serialization.py | 66 | 8 | self.assertIsNotNone | import unittest
import tempfile
import numpy as np
from pathlib import Path
from numpy.testing import assert_array_equal
from small_text.active_learner import PoolBasedActiveLearner
from small_text.classifiers import ConfidenceEnhancedLinearSVC, SklearnClassifierFactory
from small_text.query_strategies import Random... | active_learner) | modified | 178799284a720c630bade757576f5cf6c94d5ce5da4330a61bdae0ac5cf632ec | self.assertIsNotNone||import unittest import tempfile import numpy as np from pathlib import Path from numpy.testing import assert_array_equal from small_text.active_learner import PoolBasedActiveLearner from small_text.classifiers import ConfidenceEnhancedLinearSVC, SklearnClassifierFactory from small_text.query_strat... | active_learner.classifier) | 65 | 8 | |
webis-de/small-text | train | 36 | 763a86977eb6c1923d80ce991927dc8c2f2acc66 | train | tests/integration/small_text/test_serialization.py | train | webis-de/small-text:tests/integration/small_text/test_serialization.py | 68 | 8 | assert_* | import unittest
import tempfile
import numpy as np
from pathlib import Path
from numpy.testing import assert_array_equal
from small_text.active_learner import PoolBasedActiveLearner
from small_text.classifiers import ConfidenceEnhancedLinearSVC, SklearnClassifierFactory
from small_text.query_strategies import Random... | active_learner.x_indices_labeled) | added | 34d14d8851b82cdbfc71b461db4f0a8318e5235d79caad886829c8c10804eb0a | assert_*||import unittest import tempfile import numpy as np from pathlib import Path from numpy.testing import assert_array_equal from small_text.active_learner import PoolBasedActiveLearner from small_text.classifiers import ConfidenceEnhancedLinearSVC, SklearnClassifierFactory from small_text.query_strategies import... | null | null | null | |
webis-de/small-text | train | 36 | 763a86977eb6c1923d80ce991927dc8c2f2acc66 | train | tests/integration/small_text/test_serialization.py | train | webis-de/small-text:tests/integration/small_text/test_serialization.py | 69 | 8 | self.assertIsNotNone | import unittest
import tempfile
import numpy as np
from pathlib import Path
from numpy.testing import assert_array_equal
from small_text.active_learner import PoolBasedActiveLearner
from small_text.classifiers import ConfidenceEnhancedLinearSVC, SklearnClassifierFactory
from small_text.query_strategies import Random... | active_learner.classifier) | added | da0303fee642cbdc0e000dd4634232747f78f81006d2daadfb624735e8f57419 | self.assertIsNotNone||import unittest import tempfile import numpy as np from pathlib import Path from numpy.testing import assert_array_equal from small_text.active_learner import PoolBasedActiveLearner from small_text.classifiers import ConfidenceEnhancedLinearSVC, SklearnClassifierFactory from small_text.query_strat... | null | null | null | |
webis-de/small-text | train | 36 | 763a86977eb6c1923d80ce991927dc8c2f2acc66 | train | tests/integration/small_text/test_serialization.py | train | webis-de/small-text:tests/integration/small_text/test_serialization.py | 70 | 8 | self.assertEqual | import unittest
import tempfile
import numpy as np
from pathlib import Path
from numpy.testing import assert_array_equal
from small_text.active_learner import PoolBasedActiveLearner
from small_text.classifiers import ConfidenceEnhancedLinearSVC, SklearnClassifierFactory
from small_text.query_strategies import Random... | active_learner.query_strategy.__class__) | added | 5edd79ac94908b603af93a1555c01a739dd812f96987a21ce3d879d0a62b6a4a | self.assertEqual||import unittest import tempfile import numpy as np from pathlib import Path from numpy.testing import assert_array_equal from small_text.active_learner import PoolBasedActiveLearner from small_text.classifiers import ConfidenceEnhancedLinearSVC, SklearnClassifierFactory from small_text.query_strategie... | null | null | null | |
webis-de/small-text | train | 37 | 2c8a1a97d69829188d00f258c64f1241fd938ef3 | train | tests/unit/small_text/query_strategies/test_strategies.py | train | webis-de/small-text:tests/unit/small_text/query_strategies/test_strategies.py | 399 | 12 | assert_* | test_query_when_embed_has_return_proba | import unittest
import numpy as np
from numpy.testing import assert_array_equal, assert_array_almost_equal
from sklearn.preprocessing import normalize
from unittest.mock import patch, Mock
from small_text.classifiers import ConfidenceEnhancedLinearSVC, SklearnClassifier
from small_text.query_strategies import EmptyP... | clf.embeddings_) | added | 217158c6ca0776e872ba9321c98e68e007be6df814278f955e4f02890ee81a5f | assert_*|test_query_when_embed_has_return_proba|import unittest import numpy as np from numpy.testing import assert_array_equal, assert_array_almost_equal from sklearn.preprocessing import normalize from unittest.mock import patch, Mock from small_text.classifiers import ConfidenceEnhancedLinearSVC, SklearnClassifier f... | null | null | null |
webis-de/small-text | train | 37 | 2c8a1a97d69829188d00f258c64f1241fd938ef3 | train | tests/unit/small_text/query_strategies/test_strategies.py | train | webis-de/small-text:tests/unit/small_text/query_strategies/test_strategies.py | 418 | 12 | assert_* | test_query_when_embed_has_no_return_proba | import unittest
import numpy as np
from numpy.testing import assert_array_equal, assert_array_almost_equal
from sklearn.preprocessing import normalize
from unittest.mock import patch, Mock
from small_text.classifiers import ConfidenceEnhancedLinearSVC, SklearnClassifier
from small_text.query_strategies import EmptyP... | clf.embeddings_) | added | 06820a3c4d4cbaa6c57d1e1f49f4cc794d413968cbf54ccf2ee2141e07fc43fb | assert_*|test_query_when_embed_has_no_return_proba|import unittest import numpy as np from numpy.testing import assert_array_equal, assert_array_almost_equal from sklearn.preprocessing import normalize from unittest.mock import patch, Mock from small_text.classifiers import ConfidenceEnhancedLinearSVC, SklearnClassifie... | null | null | null |
webis-de/small-text | train | 37 | 2c8a1a97d69829188d00f258c64f1241fd938ef3 | train | tests/unit/small_text/query_strategies/test_strategies.py | train | webis-de/small-text:tests/unit/small_text/query_strategies/test_strategies.py | 451 | 13 | self.assertRaises | test_query_with_nonexistent_embed_kwargs_and_return_proba | import unittest
import numpy as np
from numpy.testing import assert_array_equal, assert_array_almost_equal
from sklearn.preprocessing import normalize
from unittest.mock import patch, Mock
from small_text.classifiers import ConfidenceEnhancedLinearSVC, SklearnClassifier
from small_text.query_strategies import EmptyP... | TypeError) | modified | 10750ec5243117e8b98978d5d7817a0b4af239c9fae25d00206affc9f9552171 | self.assertRaises|test_query_with_nonexistent_embed_kwargs_and_return_proba|import unittest import numpy as np from numpy.testing import assert_array_equal, assert_array_almost_equal from sklearn.preprocessing import normalize from unittest.mock import patch, Mock from small_text.classifiers import ConfidenceEnhancedLi... | TypeError) | 451 | 13 |
webis-de/small-text | train | 37 | 2c8a1a97d69829188d00f258c64f1241fd938ef3 | train | tests/unit/small_text/query_strategies/test_strategies.py | train | webis-de/small-text:tests/unit/small_text/query_strategies/test_strategies.py | 472 | 8 | self.assertEqual | test_query | import unittest
import numpy as np
from numpy.testing import assert_array_equal, assert_array_almost_equal
from sklearn.preprocessing import normalize
from unittest.mock import patch, Mock
from small_text.classifiers import ConfidenceEnhancedLinearSVC, SklearnClassifier
from small_text.query_strategies import EmptyP... | indices.shape[0]) | added | 6fcf18fa6d426e2093c3428fec7c2fed7c38fb14cb0151266927525e2421c235 | self.assertEqual|test_query|import unittest import numpy as np from numpy.testing import assert_array_equal, assert_array_almost_equal from sklearn.preprocessing import normalize from unittest.mock import patch, Mock from small_text.classifiers import ConfidenceEnhancedLinearSVC, SklearnClassifier from small_text.query... | null | null | null |
webis-de/small-text | train | 38 | 88b16119a287d9e3aa15fdb74f67fad2456b5227 | train | tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn_embeddings.py | train | webis-de/small-text:tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn_embeddings.py | 34 | 13 | self.assertRaises | test_embed_model_not_trained | import unittest
import pytest
import numpy as np
from unittest import mock
from parameterized import parameterized_class
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier
from smal... | ValueError) | added | 1a9b08d6b50c9516f0162e2fa8f1f471a80ae19dab9ba3e9a5e762beacc2a2cb | self.assertRaises|test_embed_model_not_trained|import unittest import pytest import numpy as np from unittest import mock from parameterized import parameterized_class from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from small_text.integrations.pytorch.classifiers.kimcnn im... | null | null | null |
webis-de/small-text | train | 38 | 88b16119a287d9e3aa15fdb74f67fad2456b5227 | train | tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn_embeddings.py | train | webis-de/small-text:tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn_embeddings.py | 58 | 12 | self.assertFalse | test_embed | import unittest
import pytest
import numpy as np
from unittest import mock
from parameterized import parameterized_class
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier
from smal... | classifier.model.training) | added | 38bc7a49762eb8285c566a920b84858bc09ed508ecffadaf426755b055b31112 | self.assertFalse|test_embed|import unittest import pytest import numpy as np from unittest import mock from parameterized import parameterized_class from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifi... | null | null | null |
webis-de/small-text | train | 38 | 88b16119a287d9e3aa15fdb74f67fad2456b5227 | train | tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn_embeddings.py | train | webis-de/small-text:tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn_embeddings.py | 99 | 16 | self.assertEqual | test_embed_and_predict | import unittest
import pytest
import numpy as np
from unittest import mock
from parameterized import parameterized_class
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier
from smal... | embeddings.shape[1]) | added | 912f5918c77a41a167941ad8c4e13a7e79099af88e953140674f8b89b8a0a7fc | self.assertEqual|test_embed_and_predict|import unittest import pytest import numpy as np from unittest import mock from parameterized import parameterized_class from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from small_text.integrations.pytorch.classifiers.kimcnn import Ki... | null | null | null |
webis-de/small-text | train | 38 | 88b16119a287d9e3aa15fdb74f67fad2456b5227 | train | tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn_embeddings.py | train | webis-de/small-text:tests/integration/small_text/integrations/pytorch/classifiers/test_kimcnn_embeddings.py | 102 | 16 | self.assertEqual | test_embed_and_predict | import unittest
import pytest
import numpy as np
from unittest import mock
from parameterized import parameterized_class
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier
from smal... | embeddings.shape[1]) | added | 47c4302319cb2b78f887f3255f5223e459a5e1aae7ac1c5093f25651e9262b95 | self.assertEqual|test_embed_and_predict|import unittest import pytest import numpy as np from unittest import mock from parameterized import parameterized_class from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from small_text.integrations.pytorch.classifiers.kimcnn import Ki... | null | null | null |
webis-de/small-text | train | 39 | 00633b75dbfbbe891a5104b0d41c8f1f4be3c4e0 | 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 | 72 | 12 | self.assertTrue | test_fit_and_validate | import unittest
import pytest
import numpy as np
from unittest import mock
from parameterized import parameterized_class
from scipy.sparse import issparse
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from small_text.integrations.pytorch.classifiers.kimcnn imp... | 0 <= acc <= 1) | added | 707221322ee0958762001c2adbbc6848a0ec9bc716fe8e9399aa6a75314db565 | self.assertTrue|test_fit_and_validate|import unittest import pytest import numpy as np from unittest import mock from parameterized import parameterized_class from scipy.sparse import issparse from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from small_text.integrations.pyto... | null | null | null |
webis-de/small-text | train | 39 | 00633b75dbfbbe891a5104b0d41c8f1f4be3c4e0 | train | tests/integration/small_text/test_serialization.py | train | webis-de/small-text:tests/integration/small_text/test_serialization.py | 69 | 8 | self.assertIsNotNone | import unittest
import tempfile
import numpy as np
from pathlib import Path
from numpy.testing import assert_array_equal
from small_text.active_learner import PoolBasedActiveLearner
from small_text.classifiers import ConfidenceEnhancedLinearSVC, SklearnClassifierFactory
from small_text.query_strategies import Random... | active_learner.classifier) | modified | 488c166fbccfb64448fd571b24b049cb2e193f80251ebfa3ef808ef1b1480a3b | self.assertIsNotNone||import unittest import tempfile import numpy as np from pathlib import Path from numpy.testing import assert_array_equal from small_text.active_learner import PoolBasedActiveLearner from small_text.classifiers import ConfidenceEnhancedLinearSVC, SklearnClassifierFactory from small_text.query_strat... | active_learner.classifier) | 69 | 8 | |
webis-de/small-text | train | 39 | 00633b75dbfbbe891a5104b0d41c8f1f4be3c4e0 | train | tests/unit/small_text/classifiers/test_classifiers.py | train | webis-de/small-text:tests/unit/small_text/classifiers/test_classifiers.py | 45 | 12 | self.assertTrue | test_predict_proba_on_empty_data | import unittest
import numpy as np
from scipy.sparse import csr_matrix
from small_text.classifiers.classification import ConfidenceEnhancedLinearSVC, SklearnClassifier
from small_text.data.datasets import SklearnDataset
from tests.utils.datasets import random_sklearn_dataset, random_matrix_data
class _ClassifierBa... | isinstance(proba, csr_matrix)) | added | f4424bf4b7b6b2fe2d6b7d41f004710c2e87752ff9436e7bf11954a211300bb3 | self.assertTrue|test_predict_proba_on_empty_data|import unittest import numpy as np from scipy.sparse import csr_matrix from small_text.classifiers.classification import ConfidenceEnhancedLinearSVC, SklearnClassifier from small_text.data.datasets import SklearnDataset from tests.utils.datasets import random_sklearn_dat... | null | null | null |
webis-de/small-text | train | 39 | 00633b75dbfbbe891a5104b0d41c8f1f4be3c4e0 | train | tests/unit/small_text/data/test_datasets.py | train | webis-de/small-text:tests/unit/small_text/data/test_datasets.py | 399 | 8 | self.assertEqual | test_split_data_stratified_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 | 7bfb639999a1b075301e7172cfeb04a68dbb91c8ace854df0c070c9152652fdd | self.assertEqual|test_split_data_stratified_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... | null | null | null |
webis-de/small-text | train | 39 | 00633b75dbfbbe891a5104b0d41c8f1f4be3c4e0 | train | tests/unit/small_text/data/test_sampling.py | test | webis-de/small-text:tests/unit/small_text/data/test_sampling.py | 45 | 8 | self.assertEqual | test_stratified_sampling_n_samples | import unittest
import numpy as np
from small_text.data import balanced_sampling, stratified_sampling
from small_text.data.sampling import _get_class_histogram
class StratifiedSamplingTest(unittest.TestCase):
def test_stratified_sampling(self):
y = np.array([0]*10 + [1]*10 + [2]*10 + [3]*70)
ind... | counts.shape[0]) | modified | febbf2a9448f39c66541b3d3aef2c29e02759a30e9c00ee27de0c5dc8a4135ec | self.assertEqual|test_stratified_sampling_n_samples|import unittest import numpy as np from small_text.data import balanced_sampling, stratified_sampling from small_text.data.sampling import _get_class_histogram class StratifiedSamplingTest(unittest.TestCase): def test_stratified_sampling(self): y = np.array([0]*10 + [... | len(counts)) | 45 | 8 |
webis-de/small-text | train | 39 | 00633b75dbfbbe891a5104b0d41c8f1f4be3c4e0 | train | tests/unit/small_text/initialization/test_strategies.py | train | webis-de/small-text:tests/unit/small_text/initialization/test_strategies.py | 73 | 13 | self.assertRaises | test_random_initialization_stratified_multilabel_illegal_strategy | import unittest
import numpy as np
from unittest.mock import patch
from scipy.sparse import csr_matrix
from small_text.data import balanced_sampling, stratified_sampling
from small_text.initialization import random_initialization, \
random_initialization_stratified, random_initialization_balanced
class RandomIn... | ValueError) | added | 702510e16e122b893540ca164cc26e3c556f7cda5049c118fd4b15c599f7b720 | self.assertRaises|test_random_initialization_stratified_multilabel_illegal_strategy|import unittest import numpy as np from unittest.mock import patch from scipy.sparse import csr_matrix from small_text.data import balanced_sampling, stratified_sampling from small_text.initialization import random_initialization, \ ran... | null | null | null |
webis-de/small-text | train | 39 | 00633b75dbfbbe891a5104b0d41c8f1f4be3c4e0 | train | tests/unit/small_text/test_active_learner.py | val | webis-de/small-text:tests/unit/small_text/test_active_learner.py | 288 | 12 | assert_* | test_update_with_ignored_samples | import unittest
import numpy as np
from unittest.mock import call, patch, Mock, ANY
from numpy.testing import assert_array_equal
from scipy import sparse
from scipy.sparse import csr_matrix, vstack
from small_text.active_learner import (
AbstractPoolBasedActiveLearner,
ActiveLearner,
PoolBasedActiveLearne... | active_learner.x_indices_labeled) | added | 7071572b121272e43905a0ef5acef5de543dc3e2197fc0ee19e97f3165389880 | assert_*|test_update_with_ignored_samples|import unittest import numpy as np from unittest.mock import call, patch, Mock, ANY from numpy.testing import assert_array_equal from scipy import sparse from scipy.sparse import csr_matrix, vstack from small_text.active_learner import ( AbstractPoolBasedActiveLearner, ActiveLe... | null | null | null |
webis-de/small-text | train | 39 | 00633b75dbfbbe891a5104b0d41c8f1f4be3c4e0 | train | tests/unit/small_text/utils/test_clustering.py | train | webis-de/small-text:tests/unit/small_text/utils/test_clustering.py | 58 | 8 | self.assertEqual | test_init_kmeans_plusplus_safe_duplicate_indices_warning_suppressed | import unittest
import numpy as np
from unittest.mock import patch
from small_text.utils.clustering import init_kmeans_plusplus_safe
class ClusteringUtilsTest(unittest.TestCase):
@patch('small_text.utils.clustering.warnings.warn')
@patch('small_text.utils.clustering.choice')
@patch('small_text.utils.cl... | centers.shape) | modified | fec134da50fe265299560c69a21449227b347bdb3a2b52131259d630475bf8d5 | self.assertEqual|test_init_kmeans_plusplus_safe_duplicate_indices_warning_suppressed|import unittest import numpy as np from unittest.mock import patch from small_text.utils.clustering import init_kmeans_plusplus_safe class ClusteringUtilsTest(unittest.TestCase): @patch('small_text.utils.clustering.warnings.warn') @pat... | centers.shape) | 58 | 8 |
webis-de/small-text | train | 40 | 7614f7ac8b0eb16d32cb1a84df5a171911cb33e9 | 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 | 52 | 8 | self.assertIsNone | test_init_default_parameters | import unittest
import pytest
import numpy as np
from unittest.mock import patch
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from torch.nn.modules import BCEWithLogitsLoss
from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier
... | classifier.model) | modified | ae77eda016f13990770c6ee7fa76bc655462cc6d9a43901b705b15a0087c959f | self.assertIsNone|test_init_default_parameters|import unittest import pytest import numpy as np from unittest.mock import patch from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from torch.nn.modules import BCEWithLogitsLoss from small_text.integrations.pytorch.classifiers.ki... | classifier.model) | 51 | 8 |
webis-de/small-text | train | 40 | 7614f7ac8b0eb16d32cb1a84df5a171911cb33e9 | 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 | 126 | 12 | self.assertTrue | test_fit_without_validation_set | import unittest
import pytest
import numpy as np
from unittest.mock import patch
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from torch.nn.modules import BCEWithLogitsLoss
from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier
... | isinstance(call_args[1], PytorchDatasetView)) | modified | 83dc6f90746b6deb3a3a88089c1c1946e1432f8b50ee1102101b6681ebaa559c | self.assertTrue|test_fit_without_validation_set|import unittest import pytest import numpy as np from unittest.mock import patch from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from torch.nn.modules import BCEWithLogitsLoss from small_text.integrations.pytorch.classifiers.k... | isinstance(call_args[1], PytorchDatasetView)) | 124 | 12 |
webis-de/small-text | train | 40 | 7614f7ac8b0eb16d32cb1a84df5a171911cb33e9 | 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 | 144 | 12 | self.assertEqual | test_fit_with_validation_set | import unittest
import pytest
import numpy as np
from unittest.mock import patch
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from torch.nn.modules import BCEWithLogitsLoss
from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier
... | len(call_args[0])) | modified | 42fb4e835f1d8f5b84de8ad9734439519591837ee70b52da00073a8cb690b7ce | self.assertEqual|test_fit_with_validation_set|import unittest import pytest import numpy as np from unittest.mock import patch from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from torch.nn.modules import BCEWithLogitsLoss from small_text.integrations.pytorch.classifiers.kim... | len(call_args[0])) | 142 | 12 |
webis-de/small-text | train | 40 | 7614f7ac8b0eb16d32cb1a84df5a171911cb33e9 | 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 | 175 | 13 | self.assertRaisesRegex | test_fit_with_label_information_mismatch | import unittest
import pytest
import numpy as np
from unittest.mock import patch
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from torch.nn.modules import BCEWithLogitsLoss
from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier
... | ValueError, 'Conflicting information about the number of classes: ' 'expected: 3, encountered: 2') | modified | 1c570f6809f27e2466ffd2a9fdaef3536b0ead79b4d8684b3fd385d8dec05ec9 | self.assertRaisesRegex|test_fit_with_label_information_mismatch|import unittest import pytest import numpy as np from unittest.mock import patch from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from torch.nn.modules import BCEWithLogitsLoss from small_text.integrations.pytor... | ValueError, 'Conflicting information about the number of classes: ' 'expected: 3, encountered: 2') | 173 | 13 |
webis-de/small-text | train | 41 | 5ec7216be950e7670c2636cd51a302bb8162650e | train | tests/integration/small_text/integrations/pytorch/classifiers/test_base.py | train | webis-de/small-text:tests/integration/small_text/integrations/pytorch/classifiers/test_base.py | 62 | 8 | self.assertIsNotNone | test_initialize_optimizer_and_scheduler_default | import unittest
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from torch.nn.modules import BCEWithLogitsLoss
from torch.optim import Adadelta, AdamW
from torch.optim.lr_scheduler import ExponentialLR
from small_text.integrations.pytorch.classifiers... | optimizer) | modified | 09ebc8a1c0daa2df789537aeb15755a3784c21515bbfd8a5ce7e294a05b86e74 | self.assertIsNotNone|test_initialize_optimizer_and_scheduler_default|import unittest from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from torch.nn.modules import BCEWithLogitsLoss from torch.optim import Adadelta, AdamW from torch.optim.lr_scheduler import ExponentialLR fro... | optimizer) | 62 | 8 |
webis-de/small-text | train | 41 | 5ec7216be950e7670c2636cd51a302bb8162650e | train | tests/integration/small_text/integrations/pytorch/classifiers/test_base.py | train | webis-de/small-text:tests/integration/small_text/integrations/pytorch/classifiers/test_base.py | 63 | 8 | self.assertIsNotNone | test_initialize_optimizer_and_scheduler_default | import unittest
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from torch.nn.modules import BCEWithLogitsLoss
from torch.optim import Adadelta, AdamW
from torch.optim.lr_scheduler import ExponentialLR
from small_text.integrations.pytorch.classifiers... | scheduler) | modified | cd401040e5097c27b6087c047337ecb7c6a27ccb1cdbca1fa7cb1c11f3a1b105 | self.assertIsNotNone|test_initialize_optimizer_and_scheduler_default|import unittest from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from torch.nn.modules import BCEWithLogitsLoss from torch.optim import Adadelta, AdamW from torch.optim.lr_scheduler import ExponentialLR fro... | scheduler) | 63 | 8 |
webis-de/small-text | train | 41 | 5ec7216be950e7670c2636cd51a302bb8162650e | train | tests/integration/small_text/integrations/pytorch/classifiers/test_base.py | train | webis-de/small-text:tests/integration/small_text/integrations/pytorch/classifiers/test_base.py | 92 | 8 | self.assertIsNotNone | test_initialize_optimizer_and_scheduler_custom | import unittest
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from torch.nn.modules import BCEWithLogitsLoss
from torch.optim import Adadelta, AdamW
from torch.optim.lr_scheduler import ExponentialLR
from small_text.integrations.pytorch.classifiers... | optimizer) | modified | db1f198ac672c61b0cadb4b619a649e4a8a8e4b9e51ae2eae0530718e3e69ba1 | self.assertIsNotNone|test_initialize_optimizer_and_scheduler_custom|import unittest from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from torch.nn.modules import BCEWithLogitsLoss from torch.optim import Adadelta, AdamW from torch.optim.lr_scheduler import ExponentialLR from... | optimizer) | 93 | 8 |
webis-de/small-text | train | 41 | 5ec7216be950e7670c2636cd51a302bb8162650e | train | tests/integration/small_text/integrations/pytorch/classifiers/test_base.py | train | webis-de/small-text:tests/integration/small_text/integrations/pytorch/classifiers/test_base.py | 93 | 8 | self.assertIsNotNone | test_initialize_optimizer_and_scheduler_custom | import unittest
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from torch.nn.modules import BCEWithLogitsLoss
from torch.optim import Adadelta, AdamW
from torch.optim.lr_scheduler import ExponentialLR
from small_text.integrations.pytorch.classifiers... | scheduler) | modified | 0baddefd796e7edb16feabf2804addf1d45064d102f338d6b85d9f137db49359 | self.assertIsNotNone|test_initialize_optimizer_and_scheduler_custom|import unittest from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from torch.nn.modules import BCEWithLogitsLoss from torch.optim import Adadelta, AdamW from torch.optim.lr_scheduler import ExponentialLR from... | scheduler) | 94 | 8 |
webis-de/small-text | train | 42 | 71e0ffa2c67b4d59cbb57f920312230ad95053e8 | 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 | 112 | 13 | self.assertRaises | test_init_without_embedding_matrix | import unittest
import pytest
import numpy as np
from unittest.mock import patch
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from torch.nn.modules import BCEWithLogitsLoss
from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier
... | ValueError) | added | fe201d84732f41122bab24dd11f2db58e9aad1d3817c0c041dd2a3d9efdefa02 | self.assertRaises|test_init_without_embedding_matrix|import unittest import pytest import numpy as np from unittest.mock import patch from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from torch.nn.modules import BCEWithLogitsLoss from small_text.integrations.pytorch.classifi... | null | null | null |
webis-de/small-text | train | 42 | 71e0ffa2c67b4d59cbb57f920312230ad95053e8 | 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 | 149 | 12 | self.assertEqual | test_fit_with_validation_set | import unittest
import pytest
import numpy as np
from unittest.mock import patch
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from torch.nn.modules import BCEWithLogitsLoss
from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier
... | len(call_args[1])) | added | 615a0bcc5437de433ed860ca3d6a88a2df24e00af383678a87d0f2c67453c71b | self.assertEqual|test_fit_with_validation_set|import unittest import pytest import numpy as np from unittest.mock import patch from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from torch.nn.modules import BCEWithLogitsLoss from small_text.integrations.pytorch.classifiers.kim... | null | null | null |
webis-de/small-text | train | 42 | 71e0ffa2c67b4d59cbb57f920312230ad95053e8 | 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 | 193 | 8 | self.assertTrue | test_predict_on_empty_data | import unittest
import pytest
import numpy as np
from unittest.mock import patch
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from torch.nn.modules import BCEWithLogitsLoss
from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier
... | np.issubdtype(predictions.dtype, np.integer)) | added | 919cbfdfd124127cbf8fbffff6643706ae2b01402c3a87de91781e90c190077c | self.assertTrue|test_predict_on_empty_data|import unittest import pytest import numpy as np from unittest.mock import patch from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from torch.nn.modules import BCEWithLogitsLoss from small_text.integrations.pytorch.classifiers.kimcnn... | null | null | null |
webis-de/small-text | train | 42 | 71e0ffa2c67b4d59cbb57f920312230ad95053e8 | 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 | 204 | 8 | self.assertTrue | test_predict_proba_on_empty_data | import unittest
import pytest
import numpy as np
from unittest.mock import patch
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from torch.nn.modules import BCEWithLogitsLoss
from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier
... | np.issubdtype(proba.dtype, np.float)) | added | 4cdc0d560306d6edc5f967e9090c6ac2b44d7c4b09627d027b85cf91c8e896ae | self.assertTrue|test_predict_proba_on_empty_data|import unittest import pytest import numpy as np from unittest.mock import patch from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from torch.nn.modules import BCEWithLogitsLoss from small_text.integrations.pytorch.classifiers.... | null | null | null |
webis-de/small-text | train | 43 | 96f820b2244102bb7f23905a2034d8ebd0aec825 | train | tests/unit/small_text/stopping_criteria/test_base.py | train | webis-de/small-text:tests/unit/small_text/stopping_criteria/test_base.py | 34 | 13 | self.assertRaises | test_init_multiclass | import unittest
import numpy as np
from numpy.testing import assert_array_equal, assert_array_almost_equal
from small_text.stopping_criteria.base import DeltaFScore
class DeltaFScoreTest(unittest.TestCase):
def test_init_default(self):
stopping_criterion = DeltaFScore(2)
self.assertEqual(2, st... | ValueError) | added | d93cf140f1a5291607460426ccb0e7d1687cd0efb7528eaa975590c30262bb04 | self.assertRaises|test_init_multiclass|import unittest import numpy as np from numpy.testing import assert_array_equal, assert_array_almost_equal from small_text.stopping_criteria.base import DeltaFScore class DeltaFScoreTest(unittest.TestCase): def test_init_default(self): stopping_criterion = DeltaFScore(2) self.asse... | null | null | null |
webis-de/small-text | train | 43 | 96f820b2244102bb7f23905a2034d8ebd0aec825 | train | tests/unit/small_text/stopping_criteria/test_base.py | train | webis-de/small-text:tests/unit/small_text/stopping_criteria/test_base.py | 59 | 8 | assert_* | test_second_stop_call | import unittest
import numpy as np
from numpy.testing import assert_array_equal, assert_array_almost_equal
from small_text.stopping_criteria.base import DeltaFScore
class DeltaFScoreTest(unittest.TestCase):
def test_init_default(self):
stopping_criterion = DeltaFScore(2)
self.assertEqual(2, st... | stopping_criterion.last_predictions) | added | 70d399d7b42c6318d031cc6712d570e5476cb070981679fdaccd97900e5e997e | assert_*|test_second_stop_call|import unittest import numpy as np from numpy.testing import assert_array_equal, assert_array_almost_equal from small_text.stopping_criteria.base import DeltaFScore class DeltaFScoreTest(unittest.TestCase): def test_init_default(self): stopping_criterion = DeltaFScore(2) self.assertEqual(... | null | null | null |
webis-de/small-text | train | 43 | 96f820b2244102bb7f23905a2034d8ebd0aec825 | train | tests/unit/small_text/stopping_criteria/test_base.py | train | webis-de/small-text:tests/unit/small_text/stopping_criteria/test_base.py | 76 | 8 | assert_* | test_stop | import unittest
import numpy as np
from numpy.testing import assert_array_equal, assert_array_almost_equal
from small_text.stopping_criteria.base import DeltaFScore
class DeltaFScoreTest(unittest.TestCase):
def test_init_default(self):
stopping_criterion = DeltaFScore(2)
self.assertEqual(2, st... | stopping_criterion.delta_history) | added | 383e314736a19a59129044de517ee739f29ac86c4abbbf757021f3373365dfaa | assert_*|test_stop|import unittest import numpy as np from numpy.testing import assert_array_equal, assert_array_almost_equal from small_text.stopping_criteria.base import DeltaFScore class DeltaFScoreTest(unittest.TestCase): def test_init_default(self): stopping_criterion = DeltaFScore(2) self.assertEqual(2, stopping_... | null | null | null |
webis-de/small-text | train | 43 | 96f820b2244102bb7f23905a2034d8ebd0aec825 | train | tests/unit/small_text/stopping_criteria/test_base.py | train | webis-de/small-text:tests/unit/small_text/stopping_criteria/test_base.py | 95 | 13 | self.assertRaises | test_stop_with_prediction_size_changing | import unittest
import numpy as np
from numpy.testing import assert_array_equal, assert_array_almost_equal
from small_text.stopping_criteria.base import DeltaFScore
class DeltaFScoreTest(unittest.TestCase):
def test_init_default(self):
stopping_criterion = DeltaFScore(2)
self.assertEqual(2, st... | ValueError) | added | a493f4cca60f19d77d275f3a0b5969f1aac0702d4d625bf5d1043c8ca3b8c848 | self.assertRaises|test_stop_with_prediction_size_changing|import unittest import numpy as np from numpy.testing import assert_array_equal, assert_array_almost_equal from small_text.stopping_criteria.base import DeltaFScore class DeltaFScoreTest(unittest.TestCase): def test_init_default(self): stopping_criterion = Delta... | null | null | null |
webis-de/small-text | train | 43 | 96f820b2244102bb7f23905a2034d8ebd0aec825 | train | tests/unit/small_text/stopping_criteria/test_kappa.py | train | webis-de/small-text:tests/unit/small_text/stopping_criteria/test_kappa.py | 34 | 8 | self.assertEqual | test_init_with_kwargs | import json
import unittest
import warnings
import numpy as np
from pathlib import Path
from numpy.testing import assert_array_equal
from small_text.stopping_criteria.kappa import KappaAverage
class KappaAverageTest(unittest.TestCase):
def test_init(self):
stopping_criterion = KappaAverage(2)
... | stopping_criterion.kappa) | added | dd5e31257050776c11088a278480d0628ffddad5f83a9abb9cdcd9378c2b1603 | self.assertEqual|test_init_with_kwargs|import json import unittest import warnings import numpy as np from pathlib import Path from numpy.testing import assert_array_equal from small_text.stopping_criteria.kappa import KappaAverage class KappaAverageTest(unittest.TestCase): def test_init(self): stopping_criterion = Kap... | null | null | null |
webis-de/small-text | train | 43 | 96f820b2244102bb7f23905a2034d8ebd0aec825 | train | tests/unit/small_text/stopping_criteria/test_kappa.py | train | webis-de/small-text:tests/unit/small_text/stopping_criteria/test_kappa.py | 58 | 8 | self.assertEqual | test_second_stop_call | import json
import unittest
import warnings
import numpy as np
from pathlib import Path
from numpy.testing import assert_array_equal
from small_text.stopping_criteria.kappa import KappaAverage
class KappaAverageTest(unittest.TestCase):
def test_init(self):
stopping_criterion = KappaAverage(2)
... | stopping_criterion.kappa_history) | added | b3428bcd2b94c40b3478f8870f841276f01d0dfb490893e9c079dcf709842ca0 | self.assertEqual|test_second_stop_call|import json import unittest import warnings import numpy as np from pathlib import Path from numpy.testing import assert_array_equal from small_text.stopping_criteria.kappa import KappaAverage class KappaAverageTest(unittest.TestCase): def test_init(self): stopping_criterion = Kap... | null | null | null |
webis-de/small-text | train | 43 | 96f820b2244102bb7f23905a2034d8ebd0aec825 | train | tests/unit/small_text/stopping_criteria/test_kappa.py | train | webis-de/small-text:tests/unit/small_text/stopping_criteria/test_kappa.py | 83 | 13 | self.assertRaises | test_stop_with_predictions_none | import json
import unittest
import warnings
import numpy as np
from pathlib import Path
from numpy.testing import assert_array_equal
from small_text.stopping_criteria.kappa import KappaAverage
class KappaAverageTest(unittest.TestCase):
def test_init(self):
stopping_criterion = KappaAverage(2)
... | ValueError) | added | e90e1c1a2668fb6fb118946460c3878dd7ecf3c5bacd6d7811a2c3bb98c2482a | self.assertRaises|test_stop_with_predictions_none|import json import unittest import warnings import numpy as np from pathlib import Path from numpy.testing import assert_array_equal from small_text.stopping_criteria.kappa import KappaAverage class KappaAverageTest(unittest.TestCase): def test_init(self): stopping_crit... | null | null | null |
webis-de/small-text | train | 43 | 96f820b2244102bb7f23905a2034d8ebd0aec825 | train | tests/unit/small_text/stopping_criteria/test_kappa.py | train | webis-de/small-text:tests/unit/small_text/stopping_criteria/test_kappa.py | 117 | 8 | assert_* | test_stop_with_nans_occurring | import json
import unittest
import warnings
import numpy as np
from pathlib import Path
from numpy.testing import assert_array_equal
from small_text.stopping_criteria.kappa import KappaAverage
class KappaAverageTest(unittest.TestCase):
def test_init(self):
stopping_criterion = KappaAverage(2)
... | stopping_criterion.last_predictions) | added | 5bdfd782256da1e215ce796180f7daf7529db8658dffdd13e9445b687ff24502 | assert_*|test_stop_with_nans_occurring|import json import unittest import warnings import numpy as np from pathlib import Path from numpy.testing import assert_array_equal from small_text.stopping_criteria.kappa import KappaAverage class KappaAverageTest(unittest.TestCase): def test_init(self): stopping_criterion = Kap... | null | null | null |
webis-de/small-text | train | 44 | 3d593243cabe94aa1be7b9e4664908f307f42e37 | train | tests/unit/small_text/stopping_criteria/test_kappa.py | train | webis-de/small-text:tests/unit/small_text/stopping_criteria/test_kappa.py | 28 | 8 | self.assertEqual | test_init_with_kwargs | import unittest
import numpy as np
from numpy.testing import assert_array_equal
from small_text.stopping_criteria.kappa import KappaAverage
class KappaAverageTest(unittest.TestCase):
def test_init(self):
stopping_criterion = KappaAverage(2)
self.assertEqual([], stopping_criterion.kappa_history... | stopping_criterion.window_size) | added | 476b785bb979db73437265b6440c2566084c6939e1207e14de81440f7c654b5c | self.assertEqual|test_init_with_kwargs|import unittest import numpy as np from numpy.testing import assert_array_equal from small_text.stopping_criteria.kappa import KappaAverage class KappaAverageTest(unittest.TestCase): def test_init(self): stopping_criterion = KappaAverage(2) self.assertEqual([], stopping_criterion.... | null | null | null |
webis-de/small-text | train | 44 | 3d593243cabe94aa1be7b9e4664908f307f42e37 | train | tests/unit/small_text/stopping_criteria/test_kappa.py | train | webis-de/small-text:tests/unit/small_text/stopping_criteria/test_kappa.py | 40 | 8 | self.assertEqual | test_first_stop_call | import unittest
import numpy as np
from numpy.testing import assert_array_equal
from small_text.stopping_criteria.kappa import KappaAverage
class KappaAverageTest(unittest.TestCase):
def test_init(self):
stopping_criterion = KappaAverage(2)
self.assertEqual([], stopping_criterion.kappa_history... | stopping_criterion.kappa_history) | added | 496a285afa93ad36820a3397683af5eaf6de3c0c92c3f4a0a5fe10ef6677186a | self.assertEqual|test_first_stop_call|import unittest import numpy as np from numpy.testing import assert_array_equal from small_text.stopping_criteria.kappa import KappaAverage class KappaAverageTest(unittest.TestCase): def test_init(self): stopping_criterion = KappaAverage(2) self.assertEqual([], stopping_criterion.k... | null | null | null |
webis-de/small-text | train | 44 | 3d593243cabe94aa1be7b9e4664908f307f42e37 | train | tests/unit/small_text/stopping_criteria/test_kappa.py | train | webis-de/small-text:tests/unit/small_text/stopping_criteria/test_kappa.py | 59 | 13 | self.assertRaises | test_stop_with_predictions_none | import unittest
import numpy as np
from numpy.testing import assert_array_equal
from small_text.stopping_criteria.kappa import KappaAverage
class KappaAverageTest(unittest.TestCase):
def test_init(self):
stopping_criterion = KappaAverage(2)
self.assertEqual([], stopping_criterion.kappa_history... | ValueError) | added | 2b97e4b0563be1f56c2e2c153bc249a954f823e2a6f64b00f9a317c660685019 | self.assertRaises|test_stop_with_predictions_none|import unittest import numpy as np from numpy.testing import assert_array_equal from small_text.stopping_criteria.kappa import KappaAverage class KappaAverageTest(unittest.TestCase): def test_init(self): stopping_criterion = KappaAverage(2) self.assertEqual([], stopping... | null | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.