keras-team / keras-cv

Industry-strength Computer Vision workflows with Keras
Other
1.01k stars 331 forks source link

Getting 'Killed' while trying to run 'pytest keras_cv' #2381

Closed sartq333 closed 8 months ago

sartq333 commented 8 months ago

Followed each and every step as mentioned here https://github.com/keras-team/keras-cv/blob/c8efcd78c64fc67f2f5238b5107be581d3899286/CONTRIBUTING.md. I think the issue is probably related to CPU/memory usage (not sure though, but that’s the case most probably).

Here is the full output of ‘pytest keras_cv’:

========================================= test session starts =========================================
platform linux – Python 3.9.18, pytest-8.1.1, pluggy-1.4.0
rootdir: /home/computer/Desktop/keras_3/keras-cv
configfile: setup.cfg
plugins: timeout-2.3.1, xdist-3.5.0, requests-mock-1.10.0
collected 1940 items

keras_cv/bounding_box/converters_test.py s…sssssssssssssssssssssssssssssssssssssssssss… [ 2%]
…sssssssssssssssssss [ 7%]
sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 12%]
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssss…s. [ 15%]
keras_cv/bounding_box/ensure_tensor_test.py s…s [ 15%]
keras_cv/bounding_box/iou_test.py s…s. [ 16%]
keras_cv/bounding_box/mask_invalid_detections_test.py s.sss [ 16%]
keras_cv/bounding_box/to_dense_test.py sss [ 16%]
keras_cv/bounding_box/to_ragged_test.py s.sss [ 17%]
keras_cv/bounding_box/utils_test.py s…s [ 17%]
keras_cv/bounding_box/validate_format_test.py s…s [ 17%]
keras_cv/callbacks/pycoco_callback_test.py ssss [ 17%]
keras_cv/callbacks/waymo_evaluation_callback_test.py sss [ 18%]
keras_cv/core/factor_sampler/constant_factor_sampler_test.py s…s [ 18%]
keras_cv/core/factor_sampler/uniform_factor_sampler_test.py s…s [ 18%]
keras_cv/datasets/load_test.py s…s [ 18%]
keras_cv/datasets/pascal_voc/segmentation_test.py s…s. [ 19%]
keras_cv/datasets/waymo/load_test.py ssss [ 19%]
keras_cv/datasets/waymo/transformer_test.py sssss [ 19%]
keras_cv/keypoint/converters_test.py s…s [ 20%]
keras_cv/keypoint/utils_test.py s…s [ 20%]
keras_cv/layers/augmenter_test.py s…s [ 21%]
keras_cv/layers/feature_pyramid_test.py s…s. [ 21%]
keras_cv/layers/fusedmbconv_test.py s…s. [ 21%]
keras_cv/layers/mbconv_test.py s…s. [ 22%]
keras_cv/layers/object_detection/anchor_generator_test.py s…s [ 22%]
keras_cv/layers/object_detection/box_matcher_test.py s…s [ 23%]
keras_cv/layers/object_detection/multi_class_non_max_suppression_test.py sss [ 23%]
keras_cv/layers/object_detection/non_max_suppression_test.py s…s [ 23%]
keras_cv/layers/object_detection/roi_generator_test.py ssssssss [ 23%]
keras_cv/layers/object_detection/roi_pool_test.py s…s [ 24%]
keras_cv/layers/object_detection/roi_sampler_test.py s…s.s [ 25%]
keras_cv/layers/object_detection/rpn_label_encoder_test.py s…ss [ 25%]
keras_cv/layers/object_detection/sampling_test.py s…s [ 25%]
keras_cv/layers/object_detection_3d/centernet_label_encoder_test.py ss… [ 26%]
keras_cv/layers/object_detection_3d/voxel_utils_test.py s…s [ 26%]
keras_cv/layers/object_detection_3d/voxelization_test.py ss…Killed

Any help/advice would be appreciated! Thanks in advance!

tirthasheshpatel commented 8 months ago

This does seem like am OOM issue. It's unlikely any code in KerasCV is crashing the interpreter. I'd recommend trying out with a larger machine @SarthakJain333!

sartq333 commented 8 months ago

Okay @tirthasheshpatel , even I thought so. Thanks a lot for clarifying!

sartq333 commented 8 months ago

Also just one last question @tirthasheshpatel , any hacks or suggestions to run it on my machine, because I'd like to dive deeper into the codebase of keras_cv and maybe contribute to it. Thanks in advance!

tirthasheshpatel commented 8 months ago

I think you should be able to run all the tests with 16GB RAM. Last time I checked, the whole test suite was running with 16GB RAM and 2GB swap. Also, don't run with --run_large or --run_extra_large options, those tests will OOM even with 24GB RAM.

Also, no need to run all the tests even if you are developing, CI will take care of that when you submit the PR!