def test_check_tf_version_error(): utils.tf.__version__ = "2.1.0" with pytest.raises(ImportError) as info: utils.check_tf_version() assert "Tensorflow package version needs to be at least 2.3.0" in str(info.value)
def test_check_tf_version_error(): utils.tf.__version__ = "2.1.0" with pytest.warns(ImportWarning) as record: utils.check_tf_version() assert len(record) == 1 assert ("Tensorflow package version needs to be at least" in record[0].message.args[0])
from autokeras.nodes import TextInput from autokeras.nodes import TimeseriesInput from autokeras.tasks import ImageClassifier from autokeras.tasks import ImageRegressor from autokeras.tasks import StructuredDataClassifier from autokeras.tasks import StructuredDataRegressor from autokeras.tasks import TextClassifier from autokeras.tasks import TextRegressor from autokeras.tasks import TimeseriesForecaster from autokeras.tuners import BayesianOptimization from autokeras.tuners import Greedy from autokeras.tuners import Hyperband from autokeras.tuners import RandomSearch from autokeras.utils.io_utils import image_dataset_from_directory from autokeras.utils.io_utils import text_dataset_from_directory from autokeras.utils.utils import check_kt_version from autokeras.utils.utils import check_tf_version __version__ = "1.0.13" check_tf_version() check_kt_version() CUSTOM_OBJECTS = { "BertEncoder": BertEncoder, "BertTokenizer": BertTokenizer, "CastToFloat32": CastToFloat32, "ExpandLastDim": ExpandLastDim, "MultiCategoryEncoding": MultiCategoryEncoding, }