From 278d00672997153df6bbde70be6f6bbb53eb3bf0 Mon Sep 17 00:00:00 2001 From: Amol Lele <19983848+leleamol@users.noreply.github.com> Date: Tue, 13 Oct 2020 18:09:03 -0700 Subject: [PATCH 1/5] Pinning the version of tensorflow_datasets package so that it does not require updating TF --- config/buildspec.yml | 6 ++++-- config/buildspec_zero_code_change.yml | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/config/buildspec.yml b/config/buildspec.yml index fefc3579d..d835d913d 100755 --- a/config/buildspec.yml +++ b/config/buildspec.yml @@ -30,7 +30,8 @@ phases: - cd $CODEBUILD_SRC_DIR && chmod +x config/protoc_downloader.sh && ./config/protoc_downloader.sh - pip install --upgrade pip==19.3.1 - if [ "$run_pytest_xgboost" = "enable" ]; then pip install --upgrade pyYaml==5.1; else pip install -q pyYaml; fi - - pip install -q pytest==5.3.3 wheel pytest-html pre-commit awscli tensorflow_datasets pytest-cov + # tensorflow_datasets verion 4.0.0 and onwards require tensorflow >= 2.1.0 + - pip install -q pytest==5.3.3 wheel pytest-html pre-commit awscli tensorflow_datasets==3.2.1 pytest-cov pre_build: commands: @@ -39,7 +40,8 @@ phases: build: commands: - cd $CODEBUILD_SRC_DIR && python setup.py bdist_wheel --universal - - cd $RULES_CODEBUILD_SRC_DIR && python setup.py bdist_wheel --universal && pip install --force-reinstall dist/*.whl && cd .. + # The build container does not have rules binary, we do not need to force-reinstall the binary. + - cd $RULES_CODEBUILD_SRC_DIR && python setup.py bdist_wheel --universal && pip install dist/*.whl && cd .. - cd $CODEBUILD_SRC_DIR && pip install --force-reinstall dist/*.whl && 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 .. - pip show smdebug diff --git a/config/buildspec_zero_code_change.yml b/config/buildspec_zero_code_change.yml index f8a5db709..fb5875cd8 100644 --- a/config/buildspec_zero_code_change.yml +++ b/config/buildspec_zero_code_change.yml @@ -25,7 +25,8 @@ phases: - sudo apt-get install unzip -qq -o=Dpkg::Use-Pty=0 - cd $CODEBUILD_SRC_DIR && chmod +x config/protoc_downloader.sh && ./config/protoc_downloader.sh - pip install --upgrade pip==19.3.1 - - pip install -q pytest==5.3.3 wheel pyYaml pytest-html pre-commit awscli tensorflow_datasets pytest-cov + # tensorflow_datasets verion 4.0.0 and onwards require tensorflow >= 2.1.0 + - pip install -q pytest==5.3.3 wheel pyYaml pytest-html pre-commit awscli tensorflow_datasets==3.2.1 pytest-cov - cd $CODEBUILD_SRC_DIR && chmod +x config/install_smdebug.sh && chmod +x config/check_smdebug_install.sh && ./config/install_smdebug.sh; build: From fae816fa6334c9f6f18926974317ba5c587d5ed6 Mon Sep 17 00:00:00 2001 From: Amol Lele <19983848+leleamol@users.noreply.github.com> Date: Tue, 13 Oct 2020 18:40:17 -0700 Subject: [PATCH 2/5] Pinning the version of tensorflow_datasets package so that it does not require updating TF --- config/buildspec.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config/buildspec.yml b/config/buildspec.yml index d835d913d..7b15e5674 100755 --- a/config/buildspec.yml +++ b/config/buildspec.yml @@ -40,8 +40,7 @@ phases: build: commands: - cd $CODEBUILD_SRC_DIR && python setup.py bdist_wheel --universal - # The build container does not have rules binary, we do not need to force-reinstall the binary. - - cd $RULES_CODEBUILD_SRC_DIR && python setup.py bdist_wheel --universal && pip install dist/*.whl && cd .. + - if [ "$run_pytest_xgboost" = "enable" ]; then pip install --force-reinstall $RULES_CODEBUILD_SRC_DIR/dist/*.whl; else pip install $RULES_CODEBUILD_SRC_DIR/dist/*.whl; fi - cd $CODEBUILD_SRC_DIR && pip install --force-reinstall dist/*.whl && 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 .. - pip show smdebug From e7f970b42c4be80ed88074f823048b99aeb2e04e Mon Sep 17 00:00:00 2001 From: Amol Lele <19983848+leleamol@users.noreply.github.com> Date: Tue, 13 Oct 2020 18:48:53 -0700 Subject: [PATCH 3/5] Fixing CI for xgboost --- config/buildspec.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/config/buildspec.yml b/config/buildspec.yml index 7b15e5674..4c47963aa 100755 --- a/config/buildspec.yml +++ b/config/buildspec.yml @@ -40,6 +40,7 @@ phases: build: commands: - cd $CODEBUILD_SRC_DIR && python setup.py bdist_wheel --universal + - cd $RULES_CODEBUILD_SRC_DIR && python setup.py bdist_wheel --universal - if [ "$run_pytest_xgboost" = "enable" ]; then pip install --force-reinstall $RULES_CODEBUILD_SRC_DIR/dist/*.whl; else pip install $RULES_CODEBUILD_SRC_DIR/dist/*.whl; fi - cd $CODEBUILD_SRC_DIR && pip install --force-reinstall dist/*.whl && 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 .. From 05128d97831d1acc8fba1b4139b3db8c98ac4aff Mon Sep 17 00:00:00 2001 From: Amol Lele <19983848+leleamol@users.noreply.github.com> Date: Tue, 13 Oct 2020 19:05:33 -0700 Subject: [PATCH 4/5] Addressed the review comments to move the installation closer to framework --- config/buildspec.yml | 3 +-- config/buildspec_zero_code_change.yml | 3 +-- config/tests.sh | 2 ++ 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/buildspec.yml b/config/buildspec.yml index 4c47963aa..303a7653a 100755 --- a/config/buildspec.yml +++ b/config/buildspec.yml @@ -30,8 +30,7 @@ phases: - cd $CODEBUILD_SRC_DIR && chmod +x config/protoc_downloader.sh && ./config/protoc_downloader.sh - pip install --upgrade pip==19.3.1 - if [ "$run_pytest_xgboost" = "enable" ]; then pip install --upgrade pyYaml==5.1; else pip install -q pyYaml; fi - # tensorflow_datasets verion 4.0.0 and onwards require tensorflow >= 2.1.0 - - pip install -q pytest==5.3.3 wheel pytest-html pre-commit awscli tensorflow_datasets==3.2.1 pytest-cov + - pip install -q pytest==5.3.3 wheel pytest-html pre-commit awscli pytest-cov pre_build: commands: diff --git a/config/buildspec_zero_code_change.yml b/config/buildspec_zero_code_change.yml index fb5875cd8..4bdc941ab 100644 --- a/config/buildspec_zero_code_change.yml +++ b/config/buildspec_zero_code_change.yml @@ -25,8 +25,7 @@ phases: - sudo apt-get install unzip -qq -o=Dpkg::Use-Pty=0 - cd $CODEBUILD_SRC_DIR && chmod +x config/protoc_downloader.sh && ./config/protoc_downloader.sh - pip install --upgrade pip==19.3.1 - # tensorflow_datasets verion 4.0.0 and onwards require tensorflow >= 2.1.0 - - pip install -q pytest==5.3.3 wheel pyYaml pytest-html pre-commit awscli tensorflow_datasets==3.2.1 pytest-cov + - pip install -q pytest==5.3.3 wheel pyYaml pytest-html pre-commit awscli pytest-cov - cd $CODEBUILD_SRC_DIR && chmod +x config/install_smdebug.sh && chmod +x config/check_smdebug_install.sh && ./config/install_smdebug.sh; build: diff --git a/config/tests.sh b/config/tests.sh index d08aec9d6..fa4040bce 100644 --- a/config/tests.sh +++ b/config/tests.sh @@ -60,10 +60,12 @@ if [ "$run_pytest_xgboost" = "enable" ] ; then fi if [ "$run_pytest_tensorflow" = "enable" ] ; then + pip install tensorflow_datasets==3.2.1 run_for_framework tensorflow fi if [ "$run_pytest_tensorflow2" = "enable" ] ; then + pip install tensorflow_datasets run_for_framework tensorflow2 fi From 1a62aec3483b2033a640ab3f123146ba7d6c401e Mon Sep 17 00:00:00 2001 From: NihalHarish Date: Tue, 13 Oct 2020 21:42:29 -0700 Subject: [PATCH 5/5] comments and unpin pytest --- config/buildspec.yml | 2 +- config/buildspec_build_wheel.yml | 2 +- config/buildspec_vanilla_framework_tests.yml | 2 +- config/buildspec_zero_code_change.yml | 2 +- config/tests.sh | 1 + 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/config/buildspec.yml b/config/buildspec.yml index 303a7653a..17a30113b 100755 --- a/config/buildspec.yml +++ b/config/buildspec.yml @@ -30,7 +30,7 @@ phases: - cd $CODEBUILD_SRC_DIR && chmod +x config/protoc_downloader.sh && ./config/protoc_downloader.sh - pip install --upgrade pip==19.3.1 - if [ "$run_pytest_xgboost" = "enable" ]; then pip install --upgrade pyYaml==5.1; else pip install -q pyYaml; fi - - pip install -q pytest==5.3.3 wheel pytest-html pre-commit awscli pytest-cov + - pip install -q pytest wheel pytest-html pre-commit awscli pytest-cov pre_build: commands: diff --git a/config/buildspec_build_wheel.yml b/config/buildspec_build_wheel.yml index 6d7320ae9..421ce8619 100644 --- a/config/buildspec_build_wheel.yml +++ b/config/buildspec_build_wheel.yml @@ -16,7 +16,7 @@ phases: - sudo apt-get install unzip -qq -o=Dpkg::Use-Pty=0 - cd $CODEBUILD_SRC_DIR && chmod +x config/protoc_downloader.sh && ./config/protoc_downloader.sh - pip install --upgrade pip==19.3.1 - - pip install -q pytest==5.3.3 wheel pyYaml pytest-html pre-commit pytest-cov + - pip install -q pytest wheel pyYaml pytest-html pre-commit pytest-cov - pip uninstall -y boto3 && pip uninstall -y aiobotocore && pip uninstall -y botocore build: diff --git a/config/buildspec_vanilla_framework_tests.yml b/config/buildspec_vanilla_framework_tests.yml index 09820ed51..03e1fb317 100644 --- a/config/buildspec_vanilla_framework_tests.yml +++ b/config/buildspec_vanilla_framework_tests.yml @@ -18,7 +18,7 @@ phases: - sudo apt-get install unzip -qq -o=Dpkg::Use-Pty=0 - cd $CODEBUILD_SRC_DIR && chmod +x config/protoc_downloader.sh && ./config/protoc_downloader.sh - pip install --upgrade pip==19.3.1 - - pip install -q pytest==5.3.3 pytest-cov wheel pyYaml pytest-html keras==2.3.1 mxnet torch xgboost pre-commit tensorflow_datasets torchvision + - pip install -q pytest pytest-cov wheel pyYaml pytest-html keras==2.3.1 mxnet torch xgboost pre-commit tensorflow_datasets torchvision - cd $CODEBUILD_SRC_DIR && chmod +x config/install_smdebug.sh && chmod +x config/check_smdebug_install.sh && ./config/install_smdebug.sh; build: diff --git a/config/buildspec_zero_code_change.yml b/config/buildspec_zero_code_change.yml index 4bdc941ab..9958ec3d3 100644 --- a/config/buildspec_zero_code_change.yml +++ b/config/buildspec_zero_code_change.yml @@ -25,7 +25,7 @@ phases: - sudo apt-get install unzip -qq -o=Dpkg::Use-Pty=0 - cd $CODEBUILD_SRC_DIR && chmod +x config/protoc_downloader.sh && ./config/protoc_downloader.sh - pip install --upgrade pip==19.3.1 - - pip install -q pytest==5.3.3 wheel pyYaml pytest-html pre-commit awscli pytest-cov + - pip install -q pytest wheel pyYaml pytest-html pre-commit awscli pytest-cov - cd $CODEBUILD_SRC_DIR && chmod +x config/install_smdebug.sh && chmod +x config/check_smdebug_install.sh && ./config/install_smdebug.sh; build: diff --git a/config/tests.sh b/config/tests.sh index fa4040bce..73e31f4e4 100644 --- a/config/tests.sh +++ b/config/tests.sh @@ -60,6 +60,7 @@ if [ "$run_pytest_xgboost" = "enable" ] ; then fi if [ "$run_pytest_tensorflow" = "enable" ] ; then + # tensorflow_datasets >= 4.0.0 requires tensorflow >= 2.1.0 pip install tensorflow_datasets==3.2.1 run_for_framework tensorflow fi