Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip WaveNet test on windows #777

Merged
merged 5 commits into from
Apr 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions test/dataset/test_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ def test_io_speed() -> None:
).generate()
print(f"Test data generation took {timer.interval} seconds")

# name of method, loading function and maximum slowdown expected
# name of method, loading function and min allowed throughput
fixtures = [
("baseline", baseline, 100_000),
("baseline", baseline, 70_000),
# ('json.loads', load_json, xxx),
("ujson.loads", load_ujson, 20000),
("JsonLinesFile", load_json_lines_file, 10000),
("ujson.loads", load_ujson, 20_000),
("JsonLinesFile", load_json_lines_file, 10_000),
("ListDataset", load_list_dataset, 500),
("FileDataset", load_file_dataset, 500),
("FileDatasetCached", load_file_dataset_cached, 500),
Expand Down Expand Up @@ -146,8 +146,7 @@ def test_io_speed() -> None:
f"{exp_size} lines"
)

# for each loader, assert that the slowdown w.r.t. the baseline loader
# is not above the max. tolerated value
# for each loader, assert that throughput is above threshold
for name, _, min_rate in fixtures:
assert min_rate <= rates[name], (
f"The throughput of {name} ({rates[name]} lines/second) "
Expand Down
4 changes: 4 additions & 0 deletions test/model/wavenet/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# permissions and limitations under the License.

import pytest
import sys

from gluonts.model.wavenet import WaveNetEstimator

Expand All @@ -32,6 +33,9 @@ def hyperparameters(dsinfo):
)


@pytest.mark.skipif(
sys.platform == "win32", reason="test times out for some reason"
)
@pytest.mark.parametrize("hybridize", [True, False])
def test_accuracy(accuracy_test, hyperparameters, hybridize):
hyperparameters.update(num_batches_per_epoch=10, hybridize=hybridize)
Expand Down