Closed synergy178 closed 4 years ago
this is #1070 - if you're going to mess with PYTHONPATH - prepend, don't overwrite. we're moving to 2.x by default on Friday so 1.15 has been moved to another location on disk and we (colab) are using PYTHONPATH to use it by default (for now)
I know that TF 2.x doesn't have tf.contrib module anymore. But it seems like tf.contrib has been removed from preinstalled TF1.15 version in Colab. I'm using object detection models and this module is needed for almost everything there(training, exports, etc.).
Until last Tuesday training and testing with preinstalled TF 1.15 and even TF 2.1 worked perfectly. I tried to uninstall the preinstalled versions of TF and use <1.14 but there were other issues like training stop after first evaluation, numpy issues with int and float64 formats and tons of deprecation warnings.
Traceback (most recent call last): File "object_detection/builders/model_builder_test.py", line 23, in <module> from object_detection.builders import model_builder File "/content/models/research/object_detection/builders/model_builder.py", line 22, in <module> from object_detection.builders import box_predictor_builder File "/content/models/research/object_detection/builders/box_predictor_builder.py", line 20, in <module> from object_detection.predictors import convolutional_box_predictor File "/content/models/research/object_detection/predictors/convolutional_box_predictor.py", line 23, in <module> slim = tf.contrib.slim AttributeError: module 'tensorflow' has no attribute 'contrib'
Describe the expected behavior: ``Running tests under Python 3.6.9: /usr/bin/python3 [ RUN ] ModelBuilderTest.test_create_experimental_model [ OK ] ModelBuilderTest.test_create_experimental_model [ RUN ] ModelBuilderTest.test_create_faster_rcnn_model_from_config_with_example_miner [ OK ] ModelBuilderTest.test_create_faster_rcnn_model_from_config_with_example_miner [ RUN ] ModelBuilderTest.test_create_faster_rcnn_models_from_config_faster_rcnn_with_matmul [ OK ] ModelBuilderTest.test_create_faster_rcnn_models_from_config_faster_rcnn_with_matmul [ RUN ] ModelBuilderTest.test_create_faster_rcnn_models_from_config_faster_rcnn_without_matmul [ OK ] ModelBuilderTest.test_create_faster_rcnn_models_from_config_faster_rcnn_without_matmul [ RUN ] ModelBuilderTest.test_create_faster_rcnn_models_from_config_mask_rcnn_with_matmul [ OK ] ModelBuilderTest.test_create_faster_rcnn_models_from_config_mask_rcnn_with_matmul [ RUN ] ModelBuilderTest.test_create_faster_rcnn_models_from_config_mask_rcnn_without_matmul [ OK ] ModelBuilderTest.test_create_faster_rcnn_models_from_config_mask_rcnn_without_matmul [ RUN ] ModelBuilderTest.test_create_rfcn_model_from_config [ OK ] ModelBuilderTest.test_create_rfcn_model_from_config [ RUN ] ModelBuilderTest.test_create_ssd_fpn_model_from_config [ OK ] ModelBuilderTest.test_create_ssd_fpn_model_from_config [ RUN ] ModelBuilderTest.test_create_ssd_models_from_config [ OK ] ModelBuilderTest.test_create_ssd_models_from_config [ RUN ] ModelBuilderTest.test_invalid_faster_rcnn_batchnorm_update [ OK ] ModelBuilderTest.test_invalid_faster_rcnn_batchnorm_update [ RUN ] ModelBuilderTest.test_invalid_first_stage_nms_iou_threshold [ OK ] ModelBuilderTest.test_invalid_first_stage_nms_iou_threshold [ RUN ] ModelBuilderTest.test_invalid_model_config_proto [ OK ] ModelBuilderTest.test_invalid_model_config_proto [ RUN ] ModelBuilderTest.test_invalid_second_stage_batch_size [ OK ] ModelBuilderTest.test_invalid_second_stage_batch_size [ RUN ] ModelBuilderTest.test_session [ SKIPPED ] ModelBuilderTest.test_session [ RUN ] ModelBuilderTest.test_unknown_faster_rcnn_feature_extractor [ OK ] ModelBuilderTest.test_unknown_faster_rcnn_feature_extractor [ RUN ] ModelBuilderTest.test_unknown_meta_architecture [ OK ] ModelBuilderTest.test_unknown_meta_architecture [ RUN ] ModelBuilderTest.test_unknown_ssd_feature_extractor [ OK ] ModelBuilderTest.test_unknown_ssd_feature_extractor
Ran 17 tests in 0.218s OK (skipped=1)``
The web browser you are using (Chrome, Firefox, Safari, etc.): Chrome v80.0.3987.149
Link to self-contained notebook that reproduces this issue https://colab.research.google.com/drive/1F4ggfg9_xnCcGSBKb5-ovYi_DQFZp-uV