From 8aea65d344c8b57a16ad89de8272202a6d6a7b03 Mon Sep 17 00:00:00 2001 From: Yang Wang Date: Thu, 16 Jul 2020 16:56:30 +0800 Subject: [PATCH] Move orca learn ray tests to a ray sub dir (#2577) * move orca learn ray tests to a ray sub dir * fix path --- .../bigdl/orca/learn/{mxnet => ray}/__init__.py | 0 .../orca/learn/{pytorch => ray/mxnet}/__init__.py | 0 .../bigdl/orca/learn/{ => ray}/mxnet/conftest.py | 0 .../learn/{ => ray}/mxnet/test_mxnet_gluon.py | 0 .../{ => ray}/mxnet/test_mxnet_spark_xshards.py | 6 +++--- .../learn/{ => ray}/mxnet/test_mxnet_symbol.py | 0 .../test/bigdl/orca/learn/ray/pytorch/__init__.py | 15 +++++++++++++++ .../orca/learn/{ => ray}/pytorch/conftest.py | 0 .../{ => ray}/pytorch/test_pytorch_trainer.py | 0 9 files changed, 18 insertions(+), 3 deletions(-) rename python/orca/test/bigdl/orca/learn/{mxnet => ray}/__init__.py (100%) rename python/orca/test/bigdl/orca/learn/{pytorch => ray/mxnet}/__init__.py (100%) rename python/orca/test/bigdl/orca/learn/{ => ray}/mxnet/conftest.py (100%) rename python/orca/test/bigdl/orca/learn/{ => ray}/mxnet/test_mxnet_gluon.py (100%) rename python/orca/test/bigdl/orca/learn/{ => ray}/mxnet/test_mxnet_spark_xshards.py (98%) rename python/orca/test/bigdl/orca/learn/{ => ray}/mxnet/test_mxnet_symbol.py (100%) create mode 100644 python/orca/test/bigdl/orca/learn/ray/pytorch/__init__.py rename python/orca/test/bigdl/orca/learn/{ => ray}/pytorch/conftest.py (100%) rename python/orca/test/bigdl/orca/learn/{ => ray}/pytorch/test_pytorch_trainer.py (100%) diff --git a/python/orca/test/bigdl/orca/learn/mxnet/__init__.py b/python/orca/test/bigdl/orca/learn/ray/__init__.py similarity index 100% rename from python/orca/test/bigdl/orca/learn/mxnet/__init__.py rename to python/orca/test/bigdl/orca/learn/ray/__init__.py diff --git a/python/orca/test/bigdl/orca/learn/pytorch/__init__.py b/python/orca/test/bigdl/orca/learn/ray/mxnet/__init__.py similarity index 100% rename from python/orca/test/bigdl/orca/learn/pytorch/__init__.py rename to python/orca/test/bigdl/orca/learn/ray/mxnet/__init__.py diff --git a/python/orca/test/bigdl/orca/learn/mxnet/conftest.py b/python/orca/test/bigdl/orca/learn/ray/mxnet/conftest.py similarity index 100% rename from python/orca/test/bigdl/orca/learn/mxnet/conftest.py rename to python/orca/test/bigdl/orca/learn/ray/mxnet/conftest.py diff --git a/python/orca/test/bigdl/orca/learn/mxnet/test_mxnet_gluon.py b/python/orca/test/bigdl/orca/learn/ray/mxnet/test_mxnet_gluon.py similarity index 100% rename from python/orca/test/bigdl/orca/learn/mxnet/test_mxnet_gluon.py rename to python/orca/test/bigdl/orca/learn/ray/mxnet/test_mxnet_gluon.py diff --git a/python/orca/test/bigdl/orca/learn/mxnet/test_mxnet_spark_xshards.py b/python/orca/test/bigdl/orca/learn/ray/mxnet/test_mxnet_spark_xshards.py similarity index 98% rename from python/orca/test/bigdl/orca/learn/mxnet/test_mxnet_spark_xshards.py rename to python/orca/test/bigdl/orca/learn/ray/mxnet/test_mxnet_spark_xshards.py index 86eae9ea7a2..57a2a7824f1 100644 --- a/python/orca/test/bigdl/orca/learn/mxnet/test_mxnet_spark_xshards.py +++ b/python/orca/test/bigdl/orca/learn/ray/mxnet/test_mxnet_spark_xshards.py @@ -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) @@ -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) @@ -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) diff --git a/python/orca/test/bigdl/orca/learn/mxnet/test_mxnet_symbol.py b/python/orca/test/bigdl/orca/learn/ray/mxnet/test_mxnet_symbol.py similarity index 100% rename from python/orca/test/bigdl/orca/learn/mxnet/test_mxnet_symbol.py rename to python/orca/test/bigdl/orca/learn/ray/mxnet/test_mxnet_symbol.py diff --git a/python/orca/test/bigdl/orca/learn/ray/pytorch/__init__.py b/python/orca/test/bigdl/orca/learn/ray/pytorch/__init__.py new file mode 100644 index 00000000000..5976dc4df02 --- /dev/null +++ b/python/orca/test/bigdl/orca/learn/ray/pytorch/__init__.py @@ -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. +# diff --git a/python/orca/test/bigdl/orca/learn/pytorch/conftest.py b/python/orca/test/bigdl/orca/learn/ray/pytorch/conftest.py similarity index 100% rename from python/orca/test/bigdl/orca/learn/pytorch/conftest.py rename to python/orca/test/bigdl/orca/learn/ray/pytorch/conftest.py diff --git a/python/orca/test/bigdl/orca/learn/pytorch/test_pytorch_trainer.py b/python/orca/test/bigdl/orca/learn/ray/pytorch/test_pytorch_trainer.py similarity index 100% rename from python/orca/test/bigdl/orca/learn/pytorch/test_pytorch_trainer.py rename to python/orca/test/bigdl/orca/learn/ray/pytorch/test_pytorch_trainer.py