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

Move orca learn ray tests to a ray sub dir #2577

Merged
merged 2 commits into from
Jul 16, 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: 2 additions & 9 deletions pyzoo/dev/run-pytests-ray
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ then
exit $exit_status_1
fi

echo "Running MXNetTrainer tests"
python -m pytest -v ../test/zoo/orca/learn/mxnet
echo "Running orca learn ray tests"
python -m pytest -v ../test/zoo/orca/learn/ray
exit_status_2=$?
if [ $exit_status_2 -ne 0 ];
then
Expand Down Expand Up @@ -65,10 +65,3 @@ then
exit $exit_status_5
fi

echo "Running PyTorchTrainer tests"
python -m pytest -v ../test/zoo/orca/learn/pytorch
exit_status_6=$?
if [ $exit_status_6 -ne 0 ];
then
exit $exit_status_6
fi
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def forward(self, x):

class TestMXNetSparkXShards(TestCase):
def test_xshards_symbol_with_val(self):
resource_path = os.path.join(os.path.split(__file__)[0], "../../../resources")
resource_path = os.path.join(os.path.split(__file__)[0], "../../../../resources")
train_file_path = os.path.join(resource_path, "orca/learn/single_input_json/train")
train_data_shard = zoo.orca.data.pandas.read_json(
train_file_path, orient='records', lines=False).transform_shard(prepare_data_symbol)
Expand All @@ -99,7 +99,7 @@ def test_xshards_symbol_with_val(self):
estimator.shutdown()

def test_xshards_symbol_without_val(self):
resource_path = os.path.join(os.path.split(__file__)[0], "../../../resources")
resource_path = os.path.join(os.path.split(__file__)[0], "../../../../resources")
train_file_path = os.path.join(resource_path, "orca/learn/single_input_json/train")
train_data_shard = zoo.orca.data.pandas.read_json(
train_file_path, orient='records', lines=False).transform_shard(prepare_data_symbol)
Expand All @@ -110,7 +110,7 @@ def test_xshards_symbol_without_val(self):
estimator.shutdown()

def test_xshards_gluon(self):
resource_path = os.path.join(os.path.split(__file__)[0], "../../../resources")
resource_path = os.path.join(os.path.split(__file__)[0], "../../../../resources")
train_file_path = os.path.join(resource_path, "orca/learn/single_input_json/train")
train_data_shard = zoo.orca.data.pandas.read_json(
train_file_path, orient='records', lines=False).transform_shard(prepare_data_gluon)
Expand Down
15 changes: 15 additions & 0 deletions pyzoo/test/zoo/orca/learn/ray/pytorch/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#
# Copyright 2018 Analytics Zoo Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#