Skip to content

Commit

Permalink
Fixing TF zcc to use python instead of pytest (#139)
Browse files Browse the repository at this point in the history
* updated config/tests.sh

* Add pythonpath when running tests

* Change horovod folder name so it doesn't pretend to be the horovod package
  • Loading branch information
jarednielsen authored and Vikas-kum committed Jan 10, 2020
1 parent f5c882c commit 703c4dc
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions config/buildspec_zero_code_change.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ phases:
commands:
- cd $CODEBUILD_SRC_DIR && chmod +x config/install_smdebug.sh && chmod +x config/check_smdebug_install.sh && ./config/install_smdebug.sh && cd ..
- cd $RULES_CODEBUILD_SRC_DIR && python setup.py bdist_wheel --universal && pip install dist/*.whl && cd ..
- cd $CODEBUILD_SRC_DIR && chmod +x config/tests.sh && ./config/tests.sh && mkdir -p upload/$CURRENT_COMMIT_PATH/wheels && cp ./dist/*.whl upload/$CURRENT_COMMIT_PATH/wheels && cd ..
- cd $RULES_CODEBUILD_SRC_DIR && chmod +x config/tests.sh && mkdir -p upload/$CURRENT_COMMIT_PATH/wheels && ./config/tests.sh && cp ./dist/*.whl upload/$CURRENT_COMMIT_PATH/wheels && cd ..
- cd $CODEBUILD_SRC_DIR && chmod +x config/tests.sh && PYTHONPATH=. ./config/tests.sh && mkdir -p upload/$CURRENT_COMMIT_PATH/wheels && cp ./dist/*.whl upload/$CURRENT_COMMIT_PATH/wheels && cd ..
- cd $RULES_CODEBUILD_SRC_DIR && chmod +x config/tests.sh && mkdir -p upload/$CURRENT_COMMIT_PATH/wheels && PYTHONPATH=. ./config/tests.sh && cp ./dist/*.whl upload/$CURRENT_COMMIT_PATH/wheels && cd ..

post_build:
commands:
Expand Down
4 changes: 2 additions & 2 deletions config/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ run_for_framework() {
# ignoring some test becuase they require multiple frmaeworks to be installed, these tests need to be broken down
python -m pytest --durations=50 --html=$REPORT_DIR/report_$1.html -v -s --self-contained-html --ignore=tests/core/test_hook_save_scalar.py --ignore=tests/core/test_paths.py --ignore=tests/core/test_index_utils.py --ignore=tests/core/test_collections.py tests/$1
if [ "$1" = "mxnet" ] ; then
python tests/zero_code_change/mxnet_gluon_integration_test.py
python tests/zero_code_change/mxnet_gluon_integration_test.py
elif [ "$1" = "pytorch" ] ; then
python tests/zero_code_change/pytorch_integration_tests.py
elif [ "$1" = "tensorflow" ] ; then
python -m pytest tests/zero_code_change/tensorflow_integration_tests.py
python tests/zero_code_change/tensorflow_integration_tests.py
fi

else
Expand Down
File renamed without changes.
12 changes: 5 additions & 7 deletions tests/zero_code_change/tensorflow_integration_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,7 @@
import tensorflow_datasets as tfds
from tests.tensorflow.hooks.test_mirrored_strategy import test_basic
from tests.tensorflow.keras.test_keras_mirrored import test_tf_keras

# First Party
import smdebug.tensorflow as smd
from smdebug.core.utils import SagemakerSimulator

# Local
from .tf_utils import (
from tf_utils import (
get_data,
get_estimator,
get_input_fns,
Expand All @@ -37,6 +31,10 @@
get_train_op_and_placeholders,
)

# First Party
import smdebug.tensorflow as smd
from smdebug.core.utils import SagemakerSimulator


def test_estimator(script_mode: bool = False):
""" Works as intended. """
Expand Down

0 comments on commit 703c4dc

Please sign in to comment.