-
Notifications
You must be signed in to change notification settings - Fork 330
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adds Kokoro GPU Tests (#2224) * Adds Kokoro tests * Add Kokoro Tests * Update random_cutout.py to be a subclass of VectorizedBaseImageAugmentationLayer (#2123) * Update random_cutout.py Make RandomCutout a subclass of VectorizedBaseImageAugmentationLayer * Fix RandomCutout for ragged inputs * Fix typo and style * Vectorized implementation of RandomColorDegeneration and Equalization preprocessing layers (#2214) * Vectorize RandomColorDegeneration * Vectorize Equalization * Vectorize Equalization * Fix Equalization for ragged input --------- Co-authored-by: Ramesh Sampath <[email protected]> Co-authored-by: SUPERGIU <[email protected]>
- Loading branch information
1 parent
cc084f8
commit dbfc8cc
Showing
14 changed files
with
490 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CI to run on PR and merge to Master. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
set -e | ||
set -x | ||
|
||
cd "${KOKORO_ROOT}/" | ||
|
||
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1 | ||
|
||
PYTHON_BINARY="/usr/bin/python3.9" | ||
|
||
"${PYTHON_BINARY}" -m venv venv | ||
source venv/bin/activate | ||
# Check the python version | ||
python --version | ||
python3 --version | ||
|
||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64:" | ||
# Check cuda | ||
nvidia-smi | ||
nvcc --version | ||
|
||
cd "src/github/keras-cv" | ||
pip install -U pip setuptools | ||
|
||
if [ "${KERAS2:-0}" == "1" ] | ||
then | ||
echo "Keras2 detected." | ||
pip install -r requirements-common.txt --progress-bar off | ||
pip install tensorflow~=2.14 | ||
pip install --extra-index-url https://download.pytorch.org/whl/cpu torch==2.1.0+cpu | ||
pip install torchvision~=0.16.0 | ||
pip install "jax[cpu]" | ||
|
||
elif [ "$KERAS_BACKEND" == "tensorflow" ] | ||
then | ||
echo "TensorFlow backend detected." | ||
pip install -r requirements-tensorflow-cuda.txt --progress-bar off | ||
|
||
elif [ "$KERAS_BACKEND" == "jax" ] | ||
then | ||
echo "JAX backend detected." | ||
pip install -r requirements-jax-cuda.txt --progress-bar off | ||
|
||
elif [ "$KERAS_BACKEND" == "torch" ] | ||
then | ||
echo "PyTorch backend detected." | ||
pip install -r requirements-torch-cuda.txt --progress-bar off | ||
fi | ||
|
||
pip install --no-deps -e "." --progress-bar off | ||
|
||
# Run Extra Large Tests for Continuous builds | ||
if [ "${RUN_XLARGE:-0}" == "1" ] | ||
then | ||
pytest --check_gpu --run_large --run_extra_large --durations 0 \ | ||
keras_cv/bounding_box \ | ||
keras_cv/callbacks \ | ||
keras_cv/losses \ | ||
keras_cv/layers/object_detection \ | ||
keras_cv/layers/preprocessing \ | ||
keras_cv/models/backbones \ | ||
keras_cv/models/classification \ | ||
keras_cv/models/object_detection/retinanet \ | ||
keras_cv/models/object_detection/yolo_v8 \ | ||
keras_cv/models/object_detection_3d \ | ||
keras_cv/models/segmentation \ | ||
keras_cv/models/stable_diffusion \ | ||
--cov=keras-cv | ||
else | ||
pytest --check_gpu --run_large --durations 0 \ | ||
keras_cv/bounding_box \ | ||
keras_cv/callbacks \ | ||
keras_cv/losses \ | ||
keras_cv/layers/object_detection \ | ||
keras_cv/layers/preprocessing \ | ||
keras_cv/models/backbones \ | ||
keras_cv/models/classification \ | ||
keras_cv/models/object_detection/retinanet \ | ||
keras_cv/models/object_detection/yolo_v8 \ | ||
keras_cv/models/object_detection_3d \ | ||
keras_cv/models/segmentation \ | ||
keras_cv/models/stable_diffusion \ | ||
--cov=keras-cv | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
build_file: "keras-cv/.kokoro/github/ubuntu/gpu/build.sh" | ||
|
||
action { | ||
define_artifacts { | ||
regex: "**/sponge_log.log" | ||
regex: "**/sponge_log.xml" | ||
} | ||
} | ||
|
||
env_vars: { | ||
key: "KERAS_BACKEND" | ||
value: "jax" | ||
} | ||
|
||
env_vars: { | ||
key: "RUN_XLARGE" | ||
value: "1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
build_file: "keras-cv/.kokoro/github/ubuntu/gpu/build.sh" | ||
|
||
action { | ||
define_artifacts { | ||
regex: "**/sponge_log.log" | ||
regex: "**/sponge_log.xml" | ||
} | ||
} | ||
|
||
env_vars: { | ||
key: "KERAS_BACKEND" | ||
value: "jax" | ||
} | ||
|
||
# Set timeout to 60 mins from default 180 mins | ||
timeout_mins: 60 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
build_file: "keras-cv/.kokoro/github/ubuntu/gpu/build.sh" | ||
|
||
action { | ||
define_artifacts { | ||
regex: "**/sponge_log.log" | ||
regex: "**/sponge_log.xml" | ||
} | ||
} | ||
|
||
env_vars: { | ||
key: "KERAS2" | ||
value: "1" | ||
} | ||
|
||
env_vars: { | ||
key: "RUN_XLARGE" | ||
value: "1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
build_file: "keras-cv/.kokoro/github/ubuntu/gpu/build.sh" | ||
|
||
action { | ||
define_artifacts { | ||
regex: "**/sponge_log.log" | ||
regex: "**/sponge_log.xml" | ||
} | ||
} | ||
|
||
env_vars: { | ||
key: "KERAS2" | ||
value: "1" | ||
} | ||
|
||
# Set timeout to 60 mins from default 180 mins | ||
timeout_mins: 60 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
build_file: "keras-cv/.kokoro/github/ubuntu/gpu/build.sh" | ||
|
||
action { | ||
define_artifacts { | ||
regex: "**/sponge_log.log" | ||
regex: "**/sponge_log.xml" | ||
} | ||
} | ||
|
||
env_vars: { | ||
key: "KERAS_BACKEND" | ||
value: "tensorflow" | ||
} | ||
|
||
env_vars: { | ||
key: "RUN_XLARGE" | ||
value: "1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
build_file: "keras-cv/.kokoro/github/ubuntu/gpu/build.sh" | ||
|
||
action { | ||
define_artifacts { | ||
regex: "**/sponge_log.log" | ||
regex: "**/sponge_log.xml" | ||
} | ||
} | ||
|
||
env_vars: { | ||
key: "KERAS_BACKEND" | ||
value: "tensorflow" | ||
} | ||
|
||
# Set timeout to 60 mins from default 180 mins | ||
timeout_mins: 60 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
build_file: "keras-cv/.kokoro/github/ubuntu/gpu/build.sh" | ||
|
||
action { | ||
define_artifacts { | ||
regex: "**/sponge_log.log" | ||
regex: "**/sponge_log.xml" | ||
} | ||
} | ||
|
||
env_vars: { | ||
key: "KERAS_BACKEND" | ||
value: "torch" | ||
} | ||
|
||
env_vars: { | ||
key: "RUN_XLARGE" | ||
value: "1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
build_file: "keras-cv/.kokoro/github/ubuntu/gpu/build.sh" | ||
|
||
action { | ||
define_artifacts { | ||
regex: "**/sponge_log.log" | ||
regex: "**/sponge_log.xml" | ||
} | ||
} | ||
|
||
env_vars: { | ||
key: "KERAS_BACKEND" | ||
value: "torch" | ||
} | ||
|
||
# Set timeout to 60 mins from default 180 mins | ||
timeout_mins: 60 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.