Skip to content

Commit

Permalink
FIX: Failure in audio feature related test (#3651)
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Thompson <[email protected]>
  • Loading branch information
jimthompson5802 authored Sep 22, 2023
1 parent 19c48ab commit ee92f7d
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
- name: Setup Linux
if: runner.os == 'linux'
run: |
sudo apt-get update && sudo apt-get install -y cmake libsndfile1 wget
sudo apt-get update && sudo apt-get install -y cmake libsndfile1 wget libsox-dev
- name: Setup macOS
if: runner.os == 'macOS'
Expand Down
8 changes: 0 additions & 8 deletions tests/ludwig/data/test_dataset_synthesizer.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
import pytest
import torch
from packaging import version

from ludwig.data import dataset_synthesizer


@pytest.mark.skipif(
version.parse(torch.__version__).base_version >= version.parse("2.2.0").base_version,
reason="Fails with torch 2.2.0. https://github.com/ludwig-ai/ludwig/issues/3645",
)
def test_build_synthetic_dataset(tmpdir):
features = [
{"name": "text", "type": "text"},
Expand Down
5 changes: 0 additions & 5 deletions tests/ludwig/features/test_audio_feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import pandas as pd
import pytest
import torch
from packaging import version

from ludwig.backend import LOCAL_BACKEND
from ludwig.constants import BFILL, ENCODER_OUTPUT, PROC_COLUMN
Expand Down Expand Up @@ -53,10 +52,6 @@ def test_audio_input_feature(encoder: str) -> None:
assert encoder_output[ENCODER_OUTPUT].shape[1:] == audio_input_feature.output_shape


@pytest.mark.skipif(
version.parse(torch.__version__).base_version >= version.parse("2.2.0").base_version,
reason="Fails with torch 2.2.0. https://github.com/ludwig-ai/ludwig/issues/3645",
)
@pytest.mark.parametrize("feature_type", ["raw", "stft", "stft_phase", "group_delay", "fbank"])
def test_add_feature_data(feature_type, tmpdir):
preprocessing_params = {
Expand Down
6 changes: 0 additions & 6 deletions tests/ludwig/models/test_training_determinism.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

import numpy as np
import pytest
import torch
from packaging import version

from ludwig.api import LudwigModel
from ludwig.constants import BATCH_SIZE, EVAL_BATCH_SIZE, TRAINER
Expand Down Expand Up @@ -44,10 +42,6 @@ def test_training_determinism_ray_backend(csv_filename, tmpdir, ray_cluster_4cpu
np.testing.assert_equal(train_stats_1, train_stats_2)


@pytest.mark.skipif(
version.parse(torch.__version__).base_version >= version.parse("2.2.0").base_version,
reason="Fails with torch 2.2.0. https://github.com/ludwig-ai/ludwig/issues/3645",
)
def test_training_determinism_local_backend(csv_filename, tmpdir):
experiment_output_1, experiment_output_2 = train_twice("local", csv_filename, tmpdir)

Expand Down
8 changes: 2 additions & 6 deletions tests/regression_tests/model/test_old_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,12 @@ def test_model_loaded_from_old_config_prediction_works(tmpdir):
[
"https://predibase-public-us-west-2.s3.us-west-2.amazonaws.com/ludwig_unit_tests/titanic_v07.zip",
"https://predibase-public-us-west-2.s3.us-west-2.amazonaws.com/ludwig_unit_tests/twitter_bots_v05_1.zip",
# TODO(Justin): Audio features are broken for torch 2.2.
# "https://predibase-public-us-west-2.s3.us-west-2.amazonaws.com/ludwig_unit_tests/respiratory_v05.zip",
"https://predibase-public-us-west-2.s3.us-west-2.amazonaws.com/ludwig_unit_tests/respiratory_v05.zip",
# TODO(Arnav): Re-enable once https://github.com/ludwig-ai/ludwig/issues/3150 is resolved since the GBM
# model uses the PassthroughDecoder for the category output feature.
# "https://predibase-public-us-west-2.s3.us-west-2.amazonaws.com/ludwig_unit_tests/gbm_adult_census_income_v061.zip", # noqa: E501
],
ids=[
"titanic",
"twitter_bots",
], # "respiratory"], # , "gbm_adult_census_income"],
ids=["titanic", "twitter_bots", "respiratory"], # , "gbm_adult_census_income"],
)
def test_predict_deprecated_model(model_url, tmpdir):
model_dir = os.path.join(tmpdir, "model")
Expand Down

0 comments on commit ee92f7d

Please sign in to comment.