Skip to content
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
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 ..
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we still need this ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that addresses the first issue (importing tests.tensorflow)

- 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
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