Skip to content

Commit

Permalink
Split distributed tests into separate test suite (#1126)
Browse files Browse the repository at this point in the history
  • Loading branch information
tgaddair committed Mar 19, 2021
1 parent b0e12a4 commit 32313e3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
matrix:
os: [ ubuntu-latest ]
python-version: [ 3.6, 3.7, 3.8 ]
test-markers: [ "not distributed", "distributed" ]
include:
- python-version: 3.6
tensorflow-version: 2.3.1
Expand All @@ -26,6 +27,9 @@ jobs:
tensorflow-version: nightly
env:
TENSORFLOW: ${{ matrix.tensorflow-version }}
MARKERS: ${{ matrix.test-markers }}

name: py${{ matrix.python-version }}, tf${{ matrix.tensorflow-version }}, ${{ matrix.test-markers }}, ${{ matrix.os }}

timeout-minutes: 70
steps:
Expand Down Expand Up @@ -93,4 +97,4 @@ jobs:

- name: Tests
run: |
pytest -v --timeout 300 --durations 10 tests
pytest -v --timeout 360 --durations 10 -m "$MARKERS" tests
5 changes: 2 additions & 3 deletions ludwig/data/preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@
import logging
import os
from abc import ABC, abstractmethod
from copy import copy

import numpy as np
import pandas as pd

import ludwig
from ludwig.backend import LOCAL_BACKEND
from ludwig.backend import LOCAL_BACKEND
from ludwig.constants import *
from ludwig.constants import TEXT
from ludwig.data.concatenate_datasets import concatenate_files, concatenate_df
Expand Down Expand Up @@ -1681,7 +1679,8 @@ def preprocess_for_prediction(
:returns: Dataset, Train set metadata
"""
# TODO dask: support distributed backend for prediction
backend = LOCAL_BACKEND
if backend.df_engine != LOCAL_BACKEND.df_engine:
backend = LOCAL_BACKEND

# Sanity Check to make sure some data source is provided
if dataset is None:
Expand Down
3 changes: 2 additions & 1 deletion tests/integration_tests/test_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,8 @@ def test_experiment_image_dataset(
# create hdf5 data set
_, test_set, _, training_set_metadata_for_test = preprocess_for_training(
model.config,
dataset=test_data
dataset=test_data,
backend=backend,
)
test_dataset_to_use = test_set.data_hdf5_fp
else:
Expand Down
1 change: 0 additions & 1 deletion tests/integration_tests/test_ray.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# limitations under the License.
# ==============================================================================
import os
import shutil
import tempfile

import pytest
Expand Down

0 comments on commit 32313e3

Please sign in to comment.