Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix non-float32 efficientnet calls #16402

Merged
merged 1 commit into from
Apr 20, 2022

Conversation

hctomkins
Copy link
Contributor

Fix #16401

No obvious way I could see to include a breaking example of the old pattern in tests, so left as-is given it's a one-liner.

Copy link
Member

@fchollet fchollet left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. Are you able to run the unit tests locally?

@hctomkins
Copy link
Contributor Author

Hey @fchollet !
I have indeed run test locally:

//keras/layers/rnn:bidirectional_test                                    FAILED in 1 out of 12 in 39.5s

Executed 366 out of 366 tests: 365 tests pass and 1 fails locally.
There were tests whose specified size is too big. Use the --test_verbose_timeout_warnings command line option to seeINFO: Build completed, 1 test FAILED, 2550 total actions

This one failing test also fails on my local setup on master:

//keras/layers/rnn:bidirectional_test                                    FAILED in 1 out of 12 in 39.5s

Executed 366 out of 366 tests: 365 tests pass and 1 fails locally.
There were tests whose specified size is too big. Use the --test_verbose_timeout_warnings command line option to seeINFO: Build completed, 1 test FAILED, 2550 total actions

So I'm confident it's not a regression introduced on my branch!

@fchollet
Copy link
Member

I'm actually concerned about "There were tests whose specified size is too big"

Can you try to run the test "keras/applications/applications_load_weight_test.py" manually?

@hctomkins
Copy link
Contributor Author

@fchollet this passes:

keras-vscode@11b39a2d6d36:/home/keras$ bazel test keras/applications:applications_load_weight_test_resnet
WARNING: The following configs were expanded more than once: [v2]. For repeatable flags, repeats are counted twice and may lead to unexpected behavior.
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=1 --terminal_columns=116
INFO: Reading rc options for 'test' from /home/keras/.bazelrc:
  Inherited 'build' options: --apple_platform_type=macos --define open_source_build=true --define=use_fast_cpp_protos=false --define=tensorflow_enable_mlir_generated_gpu_kernels=0 --define=allow_oversize_protos=true --spawn_strategy=standalone -c opt --announce_rc --define=grpc_no_ares=true --config=short_logs --config=v2
INFO: Reading rc options for 'test' from /home/keras/.bazelrc:
  'test' options: --define open_source_build=true --define=use_fast_cpp_protos=false --config=v2
INFO: Found applicable config definition build:short_logs in file /home/keras/.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:v2 in file /home/keras/.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
INFO: Found applicable config definition build:v2 in file /home/keras/.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
INFO: Analyzed target //keras/applications:applications_load_weight_test_resnet (0 packages loaded, 1 target configured).
INFO: Found 1 test target...
Target //keras/applications:applications_load_weight_test_resnet up-to-date:
  bazel-bin/keras/applications/applications_load_weight_test_resnet
INFO: Elapsed time: 50.240s, Critical Path: 49.71s
INFO: 5 processes: 4 internal, 1 local.
INFO: Build completed successfully, 5 total actions
//keras/applications:applications_load_weight_test_resnet                PASSED in 49.6s

INFO: Build completed successfully, 5 total actions

(fyi the test name has a suffix _resnet in the BUILD file - applications_load_weight_test.py is still the target)

Copy link
Member

@fchollet fchollet left a comment

Choose a reason for hiding this comment

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

Ok, thanks for checking. LGTM

@google-ml-butler google-ml-butler bot added kokoro:force-run ready to pull Ready to be merged into the codebase labels Apr 13, 2022
@copybara-service copybara-service bot merged commit 373aed7 into keras-team:master Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to pull Ready to be merged into the codebase size:XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EfficentNets no longer train on non-float32 inputs
4 participants