def METHOD_NAME(tmp_path):
    train_x = test_utils.generate_text_data(num_instances=320)
    train_y = np.random.randint(0, 2, 320)
    test_x = train_x
    test_y = train_y
    clf = ak.TextClassifier(
        directory=tmp_path,
        max_trials=2,
        seed=test_utils.SEED,
        metrics=["accuracy"],
        objective="accuracy",
    )
    clf.fit(
        train_x,
        train_y,
        epochs=2,
        validation_data=(test_x, test_y),
        batch_size=6,
    )
    clf.export_model()
    assert clf.predict(test_x).shape == (len(test_x), 1)
    assert clf.tuner._get_best_trial_epochs() <= 2